[INFER] Fix orange.
authorBrian Hackett <bhackett1024@gmail.com>
Fri, 26 Aug 2011 20:17:26 -0700
changeset 77466 36c307704c7853846ae073b6a49258fab2e01ae8
parent 77465 53e56c928eaddff935c672804606fb426a07acf6
child 77467 9a017236840241c0acd4367775a444db3bb7765e
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
[INFER] Fix orange.
js/src/methodjit/FrameState.cpp
js/src/methodjit/InvokeHelpers.cpp
--- a/js/src/methodjit/FrameState.cpp
+++ b/js/src/methodjit/FrameState.cpp
@@ -1319,17 +1319,19 @@ FrameState::sync(Assembler &masm, Uses u
 
     /*
      * Keep track of free registers using a bitmask. If we have to drop into
      * syncFancy(), then this mask will help avoid eviction.
      */
     Registers avail(freeRegs.freeMask & Registers::AvailRegs);
     Registers temp(Registers::TempAnyRegs);
 
-    FrameEntry *bottom = cx->typeInferenceEnabled() ? entries : a->sp - uses.nuses;
+    FrameEntry *bottom = (cx->typeInferenceEnabled() || cx->compartment->debugMode())
+        ? entries
+        : a->sp - uses.nuses;
 
     for (FrameEntry *fe = a->sp - 1; fe >= bottom; fe--) {
         if (!fe->isTracked())
             continue;
 
         if (fe->isType(JSVAL_TYPE_DOUBLE)) {
             /* Copies of in-memory doubles can be synced without spilling. */
             if (fe->isCopy() || !fe->data.inFPRegister())
@@ -1451,17 +1453,20 @@ FrameState::syncAndKill(Registers kill, 
         } else {
             JS_ASSERT(fe->type.reg() == reg.reg());
             syncType(fe);
         }
 #endif
     }
 
     uint32 maxvisits = tracker.nentries;
-    FrameEntry *bottom = cx->typeInferenceEnabled() ? entries : a->sp - uses.nuses;
+
+    FrameEntry *bottom = (cx->typeInferenceEnabled() || cx->compartment->debugMode())
+        ? entries
+        : a->sp - uses.nuses;
 
     for (FrameEntry *fe = a->sp - 1; fe >= bottom && maxvisits; fe--) {
         if (!fe->isTracked())
             continue;
 
         maxvisits--;
 
         if (deadEntry(fe, ignore.nuses))
--- a/js/src/methodjit/InvokeHelpers.cpp
+++ b/js/src/methodjit/InvokeHelpers.cpp
@@ -618,17 +618,17 @@ js_InternalThrow(VMFrame &f)
     JS_ASSERT(f.regs.sp == cx->regs().sp);
 
     if (!pc)
         return NULL;
 
     StackFrame *fp = cx->fp();
     JSScript *script = fp->script();
 
-    if (cx->typeInferenceEnabled()) {
+    if (cx->typeInferenceEnabled() || !fp->jit()) {
         /*
          * Fall back to EnterMethodJIT and finish the frame in the interpreter.
          * With type inference enabled, we may wipe out all JIT code on the
          * stack without patching ncode values to jump to the interpreter, and
          * thus can only enter JIT code via EnterMethodJIT (which overwrites
          * its entry frame's ncode). See ClearAllFrames.
          */
         cx->compartment->jaegerCompartment()->setLastUnfinished(Jaeger_Unfinished);