1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:47:44 +00:00

LibJS: Remove Interpreter::declare_variable()

Since declarations are now hoisted and handled on scope entry, the job
of a VariableDeclaration becomes to actually initialize variables.

As such, we can remove the part where we insert variables into the
nearest relevant scope. Less work == more speed! :^)
This commit is contained in:
Andreas Kling 2020-04-13 16:45:51 +02:00
parent ac7459cb40
commit 062d6af16e
3 changed files with 0 additions and 23 deletions

View file

@ -96,7 +96,6 @@ public:
Optional<Value> get_variable(const FlyString& name);
void set_variable(const FlyString& name, Value, bool first_assignment = false);
void declare_variable(const FlyString& name, DeclarationKind);
void gather_roots(Badge<Heap>, HashTable<Cell*>&);