mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-02 07:43:42 +08:00
new String/Number/Boolean and Object(primitive) refused in JavaScript. A wrapper is now an ordinary dictionary-mode object whose prototype is the new gated unit's String, Number or Boolean prototype, with the [[PrimitiveValue]] slot on the object's source identity. Coercions, property reads, method calls, key order, identity and typeof reuse the dynamic tier; the prototype methods read the slot. Once a program creates wrappers, the boxed types map to the dynamic value, instanceof tests the prototype chain, Object.prototype.toString and util.types read the slot, and the consumers that cannot read it yet (JSON, inspect, structuredClone, deep equality) refuse a wrapper loudly. Programs without a wrapper site are unchanged. The npm suite's node24-text-utilities fixture builds wrappers, so that case now runs instead of refusing with SC2020; it records the divergence it now shows (the error formatter names a wrapper's class Object, and function values print without their source) instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>