mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibJS: Pass argument value vectors as const Vector<Value>&
Now that Interpreter keeps all arguments in the CallFrame stack, we can just pass a const-reference to the CallFrame's argument vector to each function handler (instead of copying it.)
This commit is contained in:
@@ -33,10 +33,10 @@ namespace JS {
|
||||
|
||||
class NativeFunction final : public Function {
|
||||
public:
|
||||
explicit NativeFunction(AK::Function<Value(Object*, Vector<Value>)>);
|
||||
explicit NativeFunction(AK::Function<Value(Object*, const Vector<Value>&)>);
|
||||
virtual ~NativeFunction() override;
|
||||
|
||||
virtual Value call(Interpreter&, Vector<Value>) override;
|
||||
virtual Value call(Interpreter&, const Vector<Value>&) override;
|
||||
|
||||
private:
|
||||
virtual bool is_native_function() const override { return true; }
|
||||
|
||||
Reference in New Issue
Block a user