Implement object shapes (hidden classes) for JS engine
Replace HashMap<String, Property> object representation with a shape
(hidden class) system that tracks object layout transitions. Each shape
maps property names to fixed slot indices with attributes, enabling O(1)
indexed property access once the shape is known.
- Add Shape, ShapeId, ShapeTable, PropertyAttrs in new shape module
- ObjectData uses ObjectStorage enum: Shaped (shape + dense Vec<Value>
slots) or Dictionary (HashMap fallback after deletion/freeze/seal)
- Shape transitions cached by (name, attrs) so identical property
additions reuse shapes across objects
- Property deletion transitions object to dictionary mode
- All 701 existing JS tests pass unchanged
This is the foundation for inline caches and JIT property access.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>