fix: invalidate unique shape when property attributes change in place
Closed
BE
1d ago+31+31+01234567890123456789-2-2-0123456789
Fork PR for bot review. Refs boa-dev/boa#5706
Summary by cubic
Fixes the Boa engine retaining stale inline caches when a property's attributes change in place, such as when Object.freeze changes writability. Instead of reusing the existing unique shape, a new unique shape is created so cached writes invalidate correctly.
Adds a regression test verifying that a previously cached write throws a TypeError after freezing.
Summary by Gitar
- Shape invalidation:
- Recreate
UniqueShapewhen property attributes change in place, so stale inline caches are invalidated
- Recreate
- Tests:
- Added
freeze_invalidates_cached_unique_shape_writeregression test for issue 5706
- Added
This will update automatically on new commits.