mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 05:08:56 +00:00
LibJS: Put Bytecode::CallFrame + register slots in a single allocation
The number of registers in a call frame never changes, so we can allocate it at the end of the CallFrame object and save ourselves the cost of allocating separate Vector storage for every call frame.
This commit is contained in:
@@ -708,7 +708,7 @@ ThrowCompletionOr<void> SourceTextModule::execute_module(VM& vm, GCPtr<PromiseCa
|
||||
result = value_and_frame.value.release_error();
|
||||
} else {
|
||||
// Resulting value is in the accumulator.
|
||||
result = value_and_frame.frame->registers.at(0).value_or(js_undefined());
|
||||
result = value_and_frame.frame->registers()[0].value_or(js_undefined());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user