mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:38:11 +00:00
LibJS: Support o.f++ :^)
This patch teaches UpdateExpression how to use a Reference. Some other changes were necessary to keep tests working: A Reference can now also refer to a local or global variable. This is not fully aligned with the spec since we don't have a Record concept.
This commit is contained in:
parent
ee0bf55127
commit
24cce3674b
5 changed files with 101 additions and 12 deletions
|
@ -173,7 +173,7 @@ Reference Interpreter::get_reference(const FlyString& name)
|
|||
return { Reference::LocalVariable, name };
|
||||
}
|
||||
}
|
||||
return { &global_object(), PropertyName(name) };
|
||||
return { Reference::GlobalVariable, name };
|
||||
}
|
||||
|
||||
void Interpreter::gather_roots(Badge<Heap>, HashTable<Cell*>& roots)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue