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:
Bob Nystrom
2015-12-16 01:10:02 +00:00
parent 5d8ecad5a6
commit e929c7c997
3 changed files with 47 additions and 50 deletions
+2 -2
View File
@@ -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,