Files
scriptc/tests/diagnostics/object-create-fences.ts
Chris Tate 6b6445ab90 Retire the "DOM" nickname in comments, internal docs, and message prose: the checked-dynamic tree / dyn values
- The ratified rename rider (world-unification §7 lane 5): "DOM" collided with the browser DOM and, post-lane-1, the structure is no longer a document tree. Comments and doc prose now say "the checked-dynamic tree" for the noun and "dyn" adjectivally; runtime symbol names (scr_dyn_*), the error.domClone libCall, and the real web DOMException family are unchanged.
- The few user-facing strings carrying the nickname move with it (the structuredClone cyclic message, the dc subscriber/publish fences, two emitter ICE texts); diagnostics snapshots regenerated (96 pass). One private compiler constant (DOM_PROTO_METHOD_NAMES -> DYN_PROTO_METHOD_NAMES) rides along.
- Mechanical sweep, 142 files, comments/prose only — no behavior change.
2026-07-24 11:14:58 -05:00

18 lines
761 B
TypeScript

// Object.create's fence battery: only the null-prototype dictionary
// lowers in a static build (Object.create(null) — corpus 2581/2582).
// Every other prototype is a NAMED fence, not an own-copy stand-in: Node
// lists NO own keys on the created object (Object.keys/inspect/JSON all
// answer empty) and mutating the prototype afterwards shows through it
// LIVE — observations a copy answers wrong silently.
// A static record prototype.
const base = { indent: 2 };
const viaRecord = Object.create(base);
// A checked-dynamic (dyn) prototype.
const dynProto: object = JSON.parse('{"a":1}');
const viaDyn = Object.create(dynProto);
// The properties-descriptor form.
const withDescriptors = Object.create(null, { a: { value: 1, enumerable: true } });