mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 08:59:50 +00:00
|
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This change implements a part responsible for this invariant in a more efficient way: "Enumerating the properties of the target object includes enumerating properties of its prototype, and the prototype of the prototype, and so on, recursively; but a property of a prototype is not processed if it has the same name as a property that has already been processed by the iterator's next method." Previously we inserted `(key, enumerable)` pairs into an `OrderedHashTable`. That always built and maintained a hash table, even when no prototype-level filtering was needed. Now we: - Collect only enumerable keys into `Vector<PropertyKey>`. - Track `seen_non_enumerable_properties` so a non-enumerable own property still shadows prototype properties with the same name. - Lazily materialize `HashTable<PropertyKey>` only if we encounter an enumerable property on a prototype and must check for duplicates. In the common case materialization is avoided, because default Object or Array prototype properties are non-enumerable. |
||
|---|---|---|
| .. | ||
| ASTCodegen.cpp | ||
| BasicBlock.cpp | ||
| BasicBlock.h | ||
| Builtins.cpp | ||
| Builtins.h | ||
| CodeGenerationError.cpp | ||
| CodeGenerationError.h | ||
| Executable.cpp | ||
| Executable.h | ||
| Generator.cpp | ||
| Generator.h | ||
| IdentifierTable.cpp | ||
| IdentifierTable.h | ||
| Instruction.cpp | ||
| Instruction.h | ||
| Interpreter.cpp | ||
| Interpreter.h | ||
| Label.cpp | ||
| Label.h | ||
| Op.h | ||
| Operand.h | ||
| RegexTable.cpp | ||
| RegexTable.h | ||
| Register.h | ||
| ScopedOperand.cpp | ||
| ScopedOperand.h | ||
| StringTable.cpp | ||
| StringTable.h | ||