Simplify the foreign call preamble a bit.
We don't need to store the number of arguments since we can calculate it from the start and top of the stack.
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