summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Interpreter.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-06-27 22:15:58 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-27 22:36:04 +0200
commitc8270dbe2e9eac702a596709584a815f23a84e0f (patch)
treeb27c294d65db3a4fd17bdf4ab779bde6c587a875 /Userland/Libraries/LibJS/Interpreter.cpp
parentba9d5c4d54d2e58c14eafe1e8960c3832fac46c7 (diff)
downloadserenity-c8270dbe2e9eac702a596709584a815f23a84e0f.zip
LibJS: Rename ScriptFunction => OrdinaryFunctionObject
These are basically what the spec calls "ordinary function objects", so let's have the name reflect that. :^)
Diffstat (limited to 'Userland/Libraries/LibJS/Interpreter.cpp')
-rw-r--r--Userland/Libraries/LibJS/Interpreter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Interpreter.cpp b/Userland/Libraries/LibJS/Interpreter.cpp
index 01cc133c0c..6805cd6879 100644
--- a/Userland/Libraries/LibJS/Interpreter.cpp
+++ b/Userland/Libraries/LibJS/Interpreter.cpp
@@ -13,8 +13,8 @@
#include <LibJS/Runtime/GlobalEnvironmentRecord.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/Object.h>
+#include <LibJS/Runtime/OrdinaryFunctionObject.h>
#include <LibJS/Runtime/Reference.h>
-#include <LibJS/Runtime/ScriptFunction.h>
#include <LibJS/Runtime/Shape.h>
#include <LibJS/Runtime/Value.h>
@@ -85,7 +85,7 @@ void Interpreter::enter_scope(const ScopeNode& scope_node, ScopeType scope_type,
{
ScopeGuard guard([&] {
for (auto& declaration : scope_node.functions()) {
- auto* function = ScriptFunction::create(global_object, declaration.name(), declaration.body(), declaration.parameters(), declaration.function_length(), lexical_environment(), declaration.kind(), declaration.is_strict_mode());
+ auto* function = OrdinaryFunctionObject::create(global_object, declaration.name(), declaration.body(), declaration.parameters(), declaration.function_length(), lexical_environment(), declaration.kind(), declaration.is_strict_mode());
vm().set_variable(declaration.name(), function, global_object);
}
});