mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
LibJS: Implement a very hackish "arguments" object
We now lazily create an "arguments" array inside functions when code tries to access it. This doesn't follow the spec at all but still covers a lot of the basic uses of arguments, i.e "arguments.length" and "arguments[n]"
This commit is contained in:
parent
e6dadd9e5b
commit
cc14b5a6d7
4 changed files with 39 additions and 0 deletions
|
@ -59,6 +59,7 @@ struct CallFrame {
|
|||
FlyString function_name;
|
||||
Value this_value;
|
||||
Vector<Value> arguments;
|
||||
Array* arguments_object { nullptr };
|
||||
ScopeObject* scope { nullptr };
|
||||
bool is_strict_mode { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue