ladybird/Libraries/LibJS/Bytecode
Andreas Kling c516715e62 LibJS: Fix AddOwnProperty IC cache applying to non-extensible objects
The AddOwnProperty inline cache would incorrectly apply to frozen,
sealed, or non-extensible objects because it only checked if the
object's shape matched the cached "from_shape", not whether the object
was actually extensible.

Since Object.freeze(), Object.seal(), and Object.preventExtensions()
don't change the object's shape, a normal empty object {} and a
frozen Object.freeze({}) would share the same shape. The IC cache
populated from adding a property to the normal object would then be
incorrectly used for the frozen object, allowing property addition
to what should be a non-extensible object.

The fix adds an extensibility check before applying the AddOwnProperty
cache. Also adds comprehensive tests for dictionary shapes and
non-extensible object IC behavior.
2026-01-06 00:11:28 +01:00
..
ASTCodegen.cpp LibJS: Avoid unnecessary NewArray in yield* iterator method calls 2025-12-28 19:12:15 +01:00
BasicBlock.cpp LibJS: Stop worrying about Instruction destructors 2025-11-21 09:46:03 +01:00
BasicBlock.h Everywhere: Slap some [[clang::lifetimebound]] where appropriate 2025-09-01 11:11:38 +02:00
BuiltinAbstractOperationsEnabled.h LibJS: Introduce NativeJavaScriptBackedFunction 2025-11-30 11:54:54 +01:00
Builtins.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Builtins.h LibJS: Skip generic call when using regexp builtins in StringPrototype 2025-12-13 13:51:12 -06:00
Bytecode.def LibJS: Add dedicated bytecode instruction for x|0 (ToInt32) 2025-12-15 08:57:00 -06:00
CodeGenerationError.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
CodeGenerationError.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
Executable.cpp LibJS: Cache fully-formed PropertyKeys in Executable 2025-12-11 14:34:45 -06:00
Executable.h LibJS: Shift PropertyLookupCache::types when finding a new slot 2025-12-21 13:00:35 -06:00
FormatOperand.h LibJS: Flatten Operand to 32-bit index in bytecode instruction stream 2025-12-09 21:44:13 -06:00
Generator.cpp LibJS: Don't set [[HomeObject]] for non-method object properties 2025-12-17 12:50:17 -06:00
Generator.h LibJS: Don't set [[HomeObject]] for non-method object properties 2025-12-17 12:50:17 -06:00
IdentifierTable.cpp LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
IdentifierTable.h LibJS: Give Interpreter a direct pointer to the identifier table 2025-10-07 23:50:51 +02:00
Instruction.cpp LibJS: Flatten Operand to 32-bit index in bytecode instruction stream 2025-12-09 21:44:13 -06:00
Instruction.h LibJS: Mark Not and Typeof as non-throwing instructions 2025-12-09 21:44:13 -06:00
Interpreter.cpp LibJS: Simplify how we know which builtin a FunctionObject represents 2025-12-25 23:59:21 +01:00
Interpreter.h LibJS: Cache fully-formed PropertyKeys in Executable 2025-12-11 14:34:45 -06:00
Label.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Label.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
Operand.h LibJS: Flatten Operand to 32-bit index in bytecode instruction stream 2025-12-09 21:44:13 -06:00
PropertyAccess.h LibJS: Fix AddOwnProperty IC cache applying to non-extensible objects 2026-01-06 00:11:28 +01:00
PropertyKeyTable.cpp LibJS: Cache fully-formed PropertyKeys in Executable 2025-12-11 14:34:45 -06:00
PropertyKeyTable.h LibJS: Cache fully-formed PropertyKeys in Executable 2025-12-11 14:34:45 -06:00
PutKind.h LibJS: Rename Bytecode::Op::PropertyKind => Bytecode::PutKind 2025-10-11 20:08:58 +02:00
RegexTable.cpp LibJS: Don't rerun regexp optimizer every time a regexp literal is used 2025-12-12 11:43:35 -06:00
RegexTable.h LibJS: Don't rerun regexp optimizer every time a regexp literal is used 2025-12-12 11:43:35 -06:00
Register.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
ScopedOperand.cpp LibJS: Flatten Operand to 32-bit index in bytecode instruction stream 2025-12-09 21:44:13 -06:00
ScopedOperand.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
StringTable.cpp LibJS+LibWeb: Port interned bytecode strings to UTF-16 2025-08-14 10:27:08 +02:00
StringTable.h LibJS+LibWeb: Port interned bytecode strings to UTF-16 2025-08-14 10:27:08 +02:00