summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Runtime/VM.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-09-27 17:24:14 +0200
committerAndreas Kling <kling@serenityos.org>2020-09-27 20:26:58 +0200
commit1ff9d33131921d97b5de99496f933bcebeb4faaa (patch)
tree4acdaf985eacab8d64820535272a6d50d7b3a0a7 /Libraries/LibJS/Runtime/VM.h
parentbe31805e8be783145c3b5909ea99144a7c737e32 (diff)
downloadserenity-1ff9d33131921d97b5de99496f933bcebeb4faaa.zip
LibJS: Make Function::call() not require an Interpreter&
This makes a difference inside ScriptFunction::call(), which will now instantiate a temporary Interpreter if one is not attached to the VM.
Diffstat (limited to 'Libraries/LibJS/Runtime/VM.h')
-rw-r--r--Libraries/LibJS/Runtime/VM.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibJS/Runtime/VM.h b/Libraries/LibJS/Runtime/VM.h
index b9470e56f4..a1ef23eaee 100644
--- a/Libraries/LibJS/Runtime/VM.h
+++ b/Libraries/LibJS/Runtime/VM.h
@@ -206,6 +206,8 @@ public:
const LexicalEnvironment* get_this_environment() const;
Value get_new_target() const;
+ [[nodiscard]] Value call(Function&, Value this_value, Optional<MarkedValueList> arguments);
+
private:
VM();