1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00
serenity/Userland/Libraries/LibJS/JIT
Andreas Kling 3d92c26445 LibJS: Stop making shapes unique
We previously had a concept of unique shapes, which meant that they
couldn't be shared between multiple objects.

Object shapes became unique in three situations:

- They were the shape of the global object.
- They had more than 100 properties added to them.
- They had one or more properties deleted from them.

Unfortunately, unique shapes presented an annoying problem for inline
caches, and we added a "unique shape serial number" for being able to
tell that a unique shape had been mutated.

This patch gets rid of the concept of unique shapes, simplifying all
the caching code, since inline caches can now simply perform a shape
check and then we're good.

To make this possible, we now have the concept of delete transitions,
which occur when a property is deleted from a shape.

Note that this patch by itself introduces a performance regression in
some situtations, since we now create a lot more shapes, and marking
their property keys can be very heavy. This will be addressed in a
subsequent patch.
2023-12-11 20:36:15 +01:00
..
Compiler.cpp LibJS: Stop making shapes unique 2023-12-11 20:36:15 +01:00
Compiler.h LibJS: Remove dedicated iterator result instructions in favor of GetById 2023-12-07 18:12:24 +01:00
NativeExecutable.cpp LibJS/JIT: Produce & register an ELF image for GDB JIT Interface 2023-12-07 15:34:38 -07:00
NativeExecutable.h LibJS/JIT: Produce & register an ELF image for GDB JIT Interface 2023-12-07 15:34:38 -07:00