mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibJS/Bytecode: Only emit ResolveThisBinding once per basic block
Once executed, this instruction will always produce the same result in subsequent executions, so it's okay to cache it. Unfortunately it may throw, so we can't just hoist it to the top of every executable, since that would break observable execution order.
This commit is contained in:
parent
a447b9bffd
commit
0f70ff9a67
Notes:
sideshowbarker
2024-07-17 08:43:11 +09:00
Author: https://github.com/awesomekling
Commit: 0f70ff9a67
Pull-request: https://github.com/SerenityOS/serenity/pull/24260
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/mattco98
4 changed files with 21 additions and 7 deletions
|
@ -257,6 +257,8 @@ public:
|
|||
m_boundaries.take_last();
|
||||
}
|
||||
|
||||
[[nodiscard]] Operand get_this(Optional<Operand> preferred_dst = {});
|
||||
|
||||
void emit_get_by_id(Operand dst, Operand base, IdentifierTableIndex property_identifier, Optional<IdentifierTableIndex> base_identifier = {});
|
||||
|
||||
void emit_get_by_id_with_this(Operand dst, Operand base, IdentifierTableIndex, Operand this_value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue