mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
LibJS/Bytecode: Invalidate inline caches on unique shape mutation
Since we can't rely on shape identity (i.e its pointer address) for unique shapes, give them a serial number that increments whenever a mutation occurs. Inline caches can then compare this serial number against what they have seen before.
This commit is contained in:
parent
17d23e76e5
commit
cf6792ec40
6 changed files with 38 additions and 5 deletions
|
@ -18,6 +18,7 @@ namespace JS::Bytecode {
|
|||
struct PropertyLookupCache {
|
||||
WeakPtr<Shape> shape;
|
||||
Optional<u32> property_offset;
|
||||
u64 unique_shape_serial_number { 0 };
|
||||
};
|
||||
|
||||
struct Executable {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue