mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-30 22:28:22 +00:00
LibJS: Add vector of local variables in ExecutionContext
Now ExecutionContext has vector of values that will represent values of local variables. This vector is initialized in ECMAScriptFunctionObject::internal_call() or ECMAScriptFunctionObject::internal_const() using number of local variables provided to ECMAScriptFunctionObject by the parser.
This commit is contained in:
parent
7765ebb5f2
commit
0daff637e2
Notes:
sideshowbarker
2024-07-17 09:49:33 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 0daff637e2
Pull-request: https://github.com/SerenityOS/serenity/pull/19719
Reviewed-by: https://github.com/awesomekling
3 changed files with 10 additions and 3 deletions
|
@ -29,7 +29,7 @@ struct ExecutionContext {
|
|||
void visit_edges(Cell::Visitor&);
|
||||
|
||||
private:
|
||||
explicit ExecutionContext(MarkedVector<Value> existing_arguments);
|
||||
explicit ExecutionContext(MarkedVector<Value> existing_arguments, MarkedVector<Value> existing_local_variables);
|
||||
|
||||
public:
|
||||
GCPtr<FunctionObject> function; // [[Function]]
|
||||
|
@ -46,6 +46,7 @@ public:
|
|||
DeprecatedFlyString function_name;
|
||||
Value this_value;
|
||||
MarkedVector<Value> arguments;
|
||||
MarkedVector<Value> local_variables;
|
||||
bool is_strict_mode { false };
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#skip-when-determining-incumbent-counter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue