Add three foundational ES2015 features to the JS engine: - Symbol: unique identity values, well-known symbols (iterator, toPrimitive, hasInstance, toStringTag, species, isConcatSpreadable), Symbol.for/keyFor registry, symbol-keyed properties, coercion guards, and computed member access support. - WeakMap: object-keyed map with get/set/has/delete, TypeError for non-object keys, and proper prototype chain setup. - Proxy: get/set/has/deleteProperty/ownKeys/apply/construct traps, Proxy.revocable with internal revoke slot, and function proxy support. Also fixes 14 code review issues including: template literal Symbol TypeError propagation, abstract equality for symbols, comparison/arithmetic TypeError guards, delete on symbol-keyed properties, Symbol.iterator support in destructuring and for-of, and replacement of __proxy__/__target_fn__ sentinel properties with proper internal slots. Box JsFunction inside JsValue enum to reduce enum size from ~200 to ~48 bytes, fixing stack overflow in deep recursion tests caused by accumulated frame bloat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 KiB
Executable File
18 KiB
Executable File