Reshuffle code lines in the side-exit return path (do asserts closer to the GlobalFrame writeback.)
authorAndreas Gal <gal@mozilla.com>
Wed, 13 Aug 2008 17:47:18 -0700
changeset 18154 f8033bfacfbbab4a70cc0f5c616656a412c830df
parent 18148 e4548362fa74e5449c76dcda675959130cf8f863
child 18155 58d063dff82eadb93211cc48e054dec0acd5e4f6
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1a2pre
Reshuffle code lines in the side-exit return path (do asserts closer to the GlobalFrame writeback.)
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -1788,22 +1788,25 @@ js_ExecuteTree(JSContext* cx, Fragment* 
            fp->regs->pc - fp->script->code,
            lr->exit->exitType,
            state.sp, lr->jmp,
            (rdtsc() - start));
 #endif
 
     JS_ASSERT(lr->exit->exitType != NESTED_EXIT);
     
+    /* write back interned globals */
     FlushNativeGlobalFrame(cx, e->numGlobalSlots, ti->globalSlots.data(), e->typeMap, global);
-    FlushNativeStackFrame(cx, e->calldepth, e->typeMap + e->numGlobalSlots, stack);
     JS_ASSERT(ti->globalSlots.length() >= e->numGlobalSlots);
     JS_ASSERT(globalFrameSize == STOBJ_NSLOTS(globalObj));
     JS_ASSERT(*(uint64*)&global[globalFrameSize] == 0xdeadbeefdeadbeefLL);
-
+    
+    /* write back native stack frame */
+    FlushNativeStackFrame(cx, e->calldepth, e->typeMap + e->numGlobalSlots, stack);
+    
     AUDIT(sideExitIntoInterpreter);
 
     if (!lr) /* did the tree actually execute? */
         return NULL;
 
     inlineCallCount += lr->exit->calldepth;
 
     return lr;