diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-13 16:45:51 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-13 17:22:24 +0200 |
commit | 062d6af16edffa180eba55f6ff2c774c04242963 (patch) | |
tree | e467410ffe8fee3059b1a642785947c232d27182 /Libraries/LibJS/Interpreter.h | |
parent | ac7459cb400125c952255da46ec5b2bb98d5d711 (diff) | |
download | serenity-062d6af16edffa180eba55f6ff2c774c04242963.zip |
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! :^)
Diffstat (limited to 'Libraries/LibJS/Interpreter.h')
-rw-r--r-- | Libraries/LibJS/Interpreter.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Libraries/LibJS/Interpreter.h b/Libraries/LibJS/Interpreter.h index c5427fe135..b25df3352a 100644 --- a/Libraries/LibJS/Interpreter.h +++ b/Libraries/LibJS/Interpreter.h @@ -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*>&); |