1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 10:14:58 +00:00
serenity/Userland/Libraries/LibJS/Tests/builtins/Object
Andreas Kling 1e90379008 LibJS: Introduce "dictionary" mode for object shapes
This is similar to "unique" shapes, which were removed in commit
3d92c26445.

The key difference is that dictionary shapes don't have a serial number,
but instead have a "cacheable" flag.

Shapes become dictionaries after 64 transitions have occurred, at which
point no further transitions occur.

As long as properties are only added to a dictionary shape, it remains
cacheable. (Since if we've cached the shape pointer in an IC somewhere,
we know the IC is still valid.)

Deleting a property from a dictionary shape causes it to become an
uncacheable dictionary.

Note that deleting a property from a non-dictionary shape still performs
a delete transition.

This fixes an issue on Discord where Object.freeze() would eventually
OOM us, since they add more than 16000 properties to a single object
before freezing it.

It also yields a 15% speedup on Octane/pdfjs.js :^)
2023-12-16 14:25:58 +01:00
..
Object.assign.js
Object.create.js
Object.defineProperties.js
Object.defineProperty.js
Object.entries.js
Object.freeze.js LibJS: Introduce "dictionary" mode for object shapes 2023-12-16 14:25:58 +01:00
Object.getOwnPropertyDescriptor.js
Object.getOwnPropertyNames.js
Object.getOwnPropertySymbols.js
Object.getPrototypeOf.js
Object.groupBy.js LibJS: Re-implement the Array Grouping proposal as static methods 2023-07-12 00:03:54 +02:00
Object.hasOwn.js
Object.is.js
Object.isExtensible.js
Object.isFrozen.js
Object.isSealed.js
Object.js
Object.keys.js
Object.preventExtensions.js
Object.prototype.constructor.js
Object.prototype.hasOwnProperty.js
Object.prototype.isPrototypeOf.js
Object.prototype.js
Object.prototype.propertyIsEnumerable.js
Object.prototype.toLocaleString.js
Object.prototype.toString.js
Object.prototype.valueOf.js
Object.seal.js
Object.setPrototypeOf.js
Object.values.js