mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +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:
@@ -32,7 +32,7 @@ namespace JS {
|
||||
|
||||
ConsoleObject::ConsoleObject()
|
||||
{
|
||||
put_native_function("log", [](Object*, Vector<Value> arguments) -> Value {
|
||||
put_native_function("log", [](Object*, const Vector<Value>& arguments) -> Value {
|
||||
for (auto& argument : arguments)
|
||||
printf("%s ", argument.to_string().characters());
|
||||
return js_undefined();
|
||||
|
||||
Reference in New Issue
Block a user