feat: Add stack size to runtime metadata
Store the pre-calculated stack size of lambda bodies in the RuntimeMetadata. This allows the VM to directly access this information without recalculating it.
This commit is contained in:
+1
-1
@@ -508,7 +508,7 @@ impl VM {
|
||||
for addr in upvalues {
|
||||
captured.push(self.capture_upvalue(*addr)?);
|
||||
}
|
||||
let stack_size = body.calculate_stack_size();
|
||||
let stack_size = node.ty.stack_size;
|
||||
let closure = Closure::new(
|
||||
params.ty.original.clone(),
|
||||
body.ty.original.clone(),
|
||||
|
||||
Reference in New Issue
Block a user