1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00
serenity/Userland/Libraries/LibJS
Linus Groh 222e518a53 LibJS: Avoid pointless transitions and metadata lookups in storage_set()
- Replace the misleading abuse of the m_transitions_enabled flag for the
  fast path without lookup with a new m_initialized boolean that's set
  either by Heap::allocate() after calling the Object's initialize(), or
  by the GlobalObject in its special initialize_global_object(). This
  makes it work regardless of the shape's uniqueness.
- When we're adding a new property past the initialization phase,
  there's no need to do a second metadata lookup to retrieve the storage
  value offset - it's known to always be the shape's property count
  minus one. Also, instead of doing manual storage resizing and
  assignment via indexing, just use Vector::append().
- When we didn't add a new property but are overwriting an existing one,
  the property count and therefore storage value offset doesn't change,
  so we don't have to retrieve it either.

As a result, Object::set_shape() is now solely responsible for updating
the m_shape pointer and is not resizing storage anymore, so I moved it
into the header.
2021-08-28 23:17:01 +01:00
..
Bytecode LibJS: Change ExecutionContext's arguments list to a MarkedValueList 2021-08-10 23:07:50 +02:00
Heap LibJS: Avoid pointless transitions and metadata lookups in storage_set() 2021-08-28 23:17:01 +01:00
Runtime LibJS: Avoid pointless transitions and metadata lookups in storage_set() 2021-08-28 23:17:01 +01:00
Tests LibJS: Implement Temporal.ZonedDateTime.prototype.eraYear 2021-08-27 23:36:52 +01:00
AST.cpp LibJS: Parse and partially execute import and export statements 2021-08-15 23:51:47 +01:00
AST.h LibJS: Parse and partially execute import and export statements 2021-08-15 23:51:47 +01:00
CMakeLists.txt LibJS: Implement the Intl.DisplayNames constructor 2021-08-26 22:04:09 +01:00
Console.cpp LibJS: Rename CallFrame => ExecutionContext 2021-06-24 19:28:00 +02:00
Console.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Forward.h LibJS: Implement a nearly empty Intl.DisplayNames object 2021-08-26 22:04:09 +01:00
Interpreter.cpp LibJS: Change ExecutionContext's arguments list to a MarkedValueList 2021-08-10 23:07:50 +02:00
Interpreter.h LibJS: Drop "Record" suffix from all the *Environment record classes 2021-07-01 12:28:57 +02:00
Lexer.cpp LibJS: Fix incorrect Lexer VERIFY when parsing Unicode characters 2021-08-25 09:21:23 +01:00
Lexer.h LibJS: Fix some small remaining issues with parsing unicode escapes 2021-08-24 07:42:37 +01:00
MarkupGenerator.cpp LibJS: Remove unused includes out of Cell.h, move to the users 2021-08-01 08:10:16 +02:00
MarkupGenerator.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Parser.cpp LibJS: Disallow yield expression correctly in formal parameters 2021-08-24 07:42:37 +01:00
Parser.h LibJS: Disallow yield expression correctly in formal parameters 2021-08-24 07:42:37 +01:00
SourceRange.h LibJS: Implement parsing and evaluation for AssignmentPatterns 2021-07-11 21:41:54 +01:00
SyntaxHighlighter.cpp LibJS: Remove unused header includes 2021-08-01 08:10:16 +02:00
SyntaxHighlighter.h LibWeb+LibSyntax: Implement nested syntax highlighters 2021-06-07 14:45:49 +04:30
Token.cpp LibJS: Fix some small remaining issues with parsing unicode escapes 2021-08-24 07:42:37 +01:00
Token.h LibJS: Disallow yield expression correctly in formal parameters 2021-08-24 07:42:37 +01:00