Add Map, Set, WeakMap, and WeakSet constructors with prototype
methods to the JavaScript engine:
- Map: constructor (from iterable), set/get/has/delete/clear,
size property, forEach, keys/values/entries iterators.
SameValueZero key equality, insertion order preserved.
- Set: constructor (from iterable), add/has/delete/clear,
size property, forEach, keys/values/entries iterators.
SameValueZero value equality, insertion order preserved.
- WeakMap: constructor, set/get/has/delete. Keys must be objects.
- WeakSet: constructor, add/has/delete. Values must be objects.
Internal storage uses indexed entry objects on the GC heap with
deleted-slot markers for stable insertion-order iteration.
30 new integration tests covering all methods and edge cases
(NaN keys, object keys, chaining, uniqueness, constructor from
arrays, insertion order preservation).
Also removes Map/Set from test262 unsupported features list.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>