mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-31 07:23:06 +08:00
scr_js_wrapper.c constructs `new String/Number/Boolean` wrappers and ToObject of a primitive as ordinary dictionary-mode objects whose prototype is the unit's String, Number or Boolean prototype, with the [[PrimitiveValue]] slot on the object's source identity. The unit also answers instanceof, Object.prototype.toString, the util.types brands, the String method receiver, and the guard of the graph-walking consumers that cannot read the slot yet. A new `primitiveWrapper` runtime feature (any `wrapper.` libCall) links it, so a program that never creates a wrapper links no byte of the unit and the zero-cost gate keeps fully typed programs clean. The `wrapper.*` signatures, symbols and dispatch case are registered here; no frontend emits them yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>