mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibJS: Stop using execute_ast_node() for class property evaluation
Instead, generate bytecode to execute their AST nodes and save the resulting operands inside the NewClass instruction. Moving property expression evaluation to happen before NewClass execution also moves along creation of new private environment and its population with private members (private members should be visible during property evaluation). Before: - NewClass After: - CreatePrivateEnvironment - AddPrivateName - ... - AddPrivateName - NewClass - LeavePrivateEnvironment
This commit is contained in:
parent
b46fc47bf7
commit
6fb1d9e516
Notes:
sideshowbarker
2024-07-17 03:10:07 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 6fb1d9e516
Pull-request: https://github.com/SerenityOS/serenity/pull/24290
9 changed files with 153 additions and 36 deletions
|
@ -15,6 +15,7 @@
|
|||
|
||||
#define ENUMERATE_BYTECODE_OPS(O) \
|
||||
O(Add) \
|
||||
O(AddPrivateName) \
|
||||
O(ArrayAppend) \
|
||||
O(AsyncIteratorClose) \
|
||||
O(Await) \
|
||||
|
@ -31,6 +32,7 @@
|
|||
O(CopyObjectExcludingProperties) \
|
||||
O(CreateLexicalEnvironment) \
|
||||
O(CreateVariableEnvironment) \
|
||||
O(CreatePrivateEnvironment) \
|
||||
O(CreateVariable) \
|
||||
O(CreateRestParams) \
|
||||
O(CreateArguments) \
|
||||
|
@ -88,6 +90,7 @@
|
|||
O(JumpUndefined) \
|
||||
O(LeaveFinally) \
|
||||
O(LeaveLexicalEnvironment) \
|
||||
O(LeavePrivateEnvironment) \
|
||||
O(LeaveUnwindContext) \
|
||||
O(LeftShift) \
|
||||
O(LessThan) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue