mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibJS: Emit GetById instead of GetByValue when key is string literal
Basically convert o["foo"] into o.foo when emitting bytecode. These are effectively the same thing, and the latter format opts into using an inline cache for the property lookups.
This commit is contained in:
parent
976ccb9224
commit
4426c50a18
Notes:
github-actions[bot]
2025-04-03 16:48:37 +00:00
Author: https://github.com/awesomekling
Commit: 4426c50a18
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4208
3 changed files with 33 additions and 6 deletions
|
@ -324,6 +324,9 @@ public:
|
|||
|
||||
void emit_get_by_id_with_this(ScopedOperand dst, ScopedOperand base, IdentifierTableIndex, ScopedOperand this_value);
|
||||
|
||||
void emit_get_by_value(ScopedOperand dst, ScopedOperand base, ScopedOperand property, Optional<IdentifierTableIndex> base_identifier = {});
|
||||
void emit_get_by_value_with_this(ScopedOperand dst, ScopedOperand base, ScopedOperand property, ScopedOperand this_value);
|
||||
|
||||
void emit_iterator_value(ScopedOperand dst, ScopedOperand result);
|
||||
void emit_iterator_complete(ScopedOperand dst, ScopedOperand result);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue