Temporarily disable recursion to track down tgfx regression (bug 520321, r=sayrer).

This commit is contained in:
David Anderson 2009-10-06 18:49:35 -07:00
parent ece88979e2
commit 24d3120b6c
2 changed files with 13 additions and 3 deletions

View File

@ -321,6 +321,7 @@ BEGIN_CASE(JSOP_STOP)
traceOp == JSOP_TRACE || traceOp == JSOP_NOP);
#endif
TRACE_0(LeaveFrame);
#ifdef JS_TRACE_RECURSION
if (!TRACE_RECORDER(cx) && recursive) {
if (*(regs.pc + JSOP_CALL_LENGTH) == JSOP_TRACE) {
regs.pc += JSOP_CALL_LENGTH;
@ -329,6 +330,7 @@ BEGIN_CASE(JSOP_STOP)
DO_OP();
}
}
#endif
if (*(regs.pc + JSOP_CALL_LENGTH) == JSOP_TRACE ||
*(regs.pc + JSOP_CALL_LENGTH) == JSOP_NOP) {
JS_STATIC_ASSERT(JSOP_TRACE_LENGTH == JSOP_NOP_LENGTH);
@ -2225,16 +2227,18 @@ BEGIN_CASE(JSOP_APPLY)
if (TRACE_RECORDER(cx)) {
TRACE_1(EnterFrame, inlineCallCount);
RESTORE_INTERP_VARS();
# ifdef JS_TRACE_RECURSION
} else if (fp->script == fp->down->script &&
*fp->down->regs->pc == JSOP_CALL) {
#ifdef DEBUG
# ifdef DEBUG
JSOp traceOp = js_GetOpcode(cx, fp->script,
fp->regs->pc);
JS_ASSERT_IF(!fp->imacpc, traceOp == JSOP_TRACE ||
traceOp == JSOP_NOP);
#endif
# endif
if (*fp->regs->pc == JSOP_TRACE)
MONITOR_BRANCH(Monitor_EnterFrame);
# endif
}
#endif

View File

@ -9645,6 +9645,9 @@ TraceRecorder::putArguments()
static JS_REQUIRES_STACK inline bool
IsTraceableRecursion(JSContext *cx)
{
#ifndef JS_TRACE_RECURSION
return false;
#else
JSStackFrame *fp = cx->fp;
JSStackFrame *down = cx->fp->down;
if (!down)
@ -9660,6 +9663,7 @@ IsTraceableRecursion(JSContext *cx)
if ((fp->flags & JSFRAME_CONSTRUCTING) || (down->flags & JSFRAME_CONSTRUCTING))
return false;
return true;
#endif
}
JS_REQUIRES_STACK AbortableRecordingStatus
@ -9719,6 +9723,7 @@ TraceRecorder::record_EnterFrame(uintN& inlineCallCount)
RETURN_STOP_A("recursion started inlining");
}
#ifdef JS_TRACE_RECURSION
VMFragment* root = (VMFragment*)fragment->root;
VMFragment* first = getLoop(&JS_TRACE_MONITOR(cx), fp->regs->pc,
root->globalObj, root->globalShape, fp->argc);
@ -9769,8 +9774,9 @@ TraceRecorder::record_EnterFrame(uintN& inlineCallCount)
return ARECORD_ABORTED;
return attemptTreeCall(f, inlineCallCount);
}
#endif
return ARECORD_CONTINUE;
return ARECORD_CONTINUE;
}
JS_REQUIRES_STACK AbortableRecordingStatus