Make CallFrame and Method use Obj* for functions.
There's no point in packing it in a Value since it will always be an ObjFn or ObjClosure. Leaving it an Obj* is a bit faster. Also fixed a bug where it was freeing the closure's flexible array of upvalues.
This commit is contained in:
+1
-1
@@ -275,7 +275,7 @@ Value findGlobal(WrenVM* vm, const char* name);
|
||||
// Pushes [function] onto [fiber]'s callstack and invokes it. Expects [numArgs]
|
||||
// arguments (including the receiver) to be on the top of the stack already.
|
||||
// [function] can be an `ObjFn` or `ObjClosure`.
|
||||
void wrenCallFunction(ObjFiber* fiber, Value function, int numArgs);
|
||||
void wrenCallFunction(ObjFiber* fiber, Obj* function, int numArgs);
|
||||
|
||||
// Mark [obj] as a GC root so that it doesn't get collected. Initializes
|
||||
// [pinned], which must be then passed to [unpinObj].
|
||||
|
||||
Reference in New Issue
Block a user