refactor: remove foreignCallNumArgs and rename foreignCallSlot to foreignStackStart
The number of arguments can be derived from the stack pointer difference, eliminating the need to store it separately. Rename the slot pointer to better reflect its purpose as the start of the foreign call's stack region.
This commit is contained in:
@@ -23,8 +23,8 @@ void metaCompile(WrenVM* vm)
|
||||
|
||||
// Return the result. We can't use the public API for this since we have a
|
||||
// bare ObjFn.
|
||||
*vm->foreignCallSlot = OBJ_VAL(fn);
|
||||
vm->foreignCallSlot = NULL;
|
||||
*vm->foreignStackStart = OBJ_VAL(fn);
|
||||
vm->foreignStackStart = NULL;
|
||||
}
|
||||
|
||||
static WrenForeignMethodFn bindMetaForeignMethods(WrenVM* vm,
|
||||
|
||||
Reference in New Issue
Block a user