Eagerly release frame marks during recursion (bug 521476, r=brendan).

This commit is contained in:
David Anderson 2009-10-13 15:14:46 -07:00
parent f7049fba87
commit f7c7c124a8
3 changed files with 1 additions and 8 deletions

View File

@ -458,8 +458,7 @@ js_PopInterpFrame(JSContext* cx, InterpState* state)
JS_ASSERT(cx->fp->regs == &ifp->callerRegs);
cx->fp->regs = ifp->frame.regs;
/* Don't release |ifp->mark| yet, since ExecuteTree uses |cx->stackPool|. */
state->stackMark = ifp->mark;
JS_ARENA_RELEASE(&cx->stackPool, ifp->mark);
/* Update the inline call count. */
*state->inlineCallCountp = *state->inlineCallCountp - 1;

View File

@ -6375,8 +6375,6 @@ ExecuteTree(JSContext* cx, Fragment* f, uintN& inlineCallCount,
state->eor = callstack_buffer + MAX_CALL_STACK_ENTRIES;
state->sor = state->rp;
state->stackMark = NULL;
#ifdef DEBUG
memset(stack_buffer, 0xCD, sizeof(stack_buffer));
memset(global, 0xCD, (globalFrameSize+1)*sizeof(double));
@ -6603,9 +6601,6 @@ LeaveTree(InterpState& state, VMSideExit* lr)
JS_ASSERT_IF(innermost->exitType == RECURSIVE_SLURP_FAIL_EXIT,
innermost->calldepth == 0 && callstack == rp);
if (state.stackMark)
JS_ARENA_RELEASE(&cx->stackPool, state.stackMark);
while (callstack < rp) {
FrameInfo* fi = *callstack;
/* Peek at the callee native slot in the not-yet-synthesized down frame. */

View File

@ -717,7 +717,6 @@ struct InterpState
FrameInfo** callstackBase; // call stack base
uintN* inlineCallCountp; // inline call count counter
VMSideExit** innermostNestedGuardp;
void* stackMark;
VMSideExit* innermost;
#ifdef EXECUTE_TREE_TIMER
uint64 startTime;