1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:47:45 +00:00

LibJS: Remove VM::call()

This commit is contained in:
mjz19910 2022-01-23 02:12:56 -07:00 committed by Linus Groh
parent 1ef633472b
commit 61cf1c066e
2 changed files with 0 additions and 33 deletions

View file

@ -200,18 +200,6 @@ public:
Value get_new_target();
template<typename... Args>
[[nodiscard]] ALWAYS_INLINE ThrowCompletionOr<Value> call(FunctionObject& function, Value this_value, Args... args)
{
if constexpr (sizeof...(Args) > 0) {
MarkedValueList arguments_list { heap() };
(..., arguments_list.append(move(args)));
return call(function, this_value, move(arguments_list));
}
return call(function, this_value);
}
CommonPropertyNames names;
void run_queued_promise_jobs();
@ -256,8 +244,6 @@ public:
private:
explicit VM(OwnPtr<CustomData>);
[[nodiscard]] ThrowCompletionOr<Value> call_internal(FunctionObject&, Value this_value, Optional<MarkedValueList> arguments);
ThrowCompletionOr<void> property_binding_initialization(BindingPattern const& binding, Value value, Environment* environment, GlobalObject& global_object);
ThrowCompletionOr<void> iterator_binding_initialization(BindingPattern const& binding, Iterator& iterator_record, Environment* environment, GlobalObject& global_object);
@ -310,15 +296,6 @@ private:
OwnPtr<CustomData> m_custom_data;
};
template<>
[[nodiscard]] ALWAYS_INLINE ThrowCompletionOr<Value> VM::call(FunctionObject& function, Value this_value, MarkedValueList arguments) { return call_internal(function, this_value, move(arguments)); }
template<>
[[nodiscard]] ALWAYS_INLINE ThrowCompletionOr<Value> VM::call(FunctionObject& function, Value this_value, Optional<MarkedValueList> arguments) { return call_internal(function, this_value, move(arguments)); }
template<>
[[nodiscard]] ALWAYS_INLINE ThrowCompletionOr<Value> VM::call(FunctionObject& function, Value this_value) { return call(function, this_value, Optional<MarkedValueList> {}); }
ALWAYS_INLINE Heap& Cell::heap() const
{
return HeapBlock::from_cell(this)->heap();