Fix GC interaction. The "me" reference to a method call was being

popped off the stack in a situation where it could be garbage
collected.  I believe this is the source of the spurious "non-object
have no members" bug that has been reported.
This commit is contained in:
andy
2004-03-23 00:42:56 +00:00
parent 71770eb92e
commit 05b9166c25

View File

@@ -454,6 +454,7 @@ static void run1(struct Context* ctx, struct Frame* f, naRef code)
break;
case OP_MCALL:
c = POP(ctx); b = POP(ctx); a = POP(ctx); // a,b,c = obj, func, args
naVec_append(ctx->temps, a);
setupFuncall(ctx, b, c);
naHash_set(ctx->fStack[ctx->fTop-1].locals, ctx->meRef, a);
break;