Bug 858655 - Add missing DebugScopes::onPopStrictEvalScope call for baseline frames. r=djvj
authorJan de Mooij <jdemooij@mozilla.com>
Fri, 12 Apr 2013 11:57:05 +0200
changeset 128574 006605c1ccc58c786b437d03869d52f18a81f53e
parent 128573 4078fd282b4ddffe82b945cbebd62cff6f965eb3
child 128575 a409636a0f32d89e16290d0692c61f78945245d0
push id24532
push userryanvm@gmail.com
push dateFri, 12 Apr 2013 19:06:49 +0000
treeherdermozilla-central@2aff2d574a1e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdjvj
bugs858655
milestone23.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
Bug 858655 - Add missing DebugScopes::onPopStrictEvalScope call for baseline frames. r=djvj
js/src/ion/BaselineJIT.cpp
js/src/ion/VMFunctions.cpp
--- a/js/src/ion/BaselineJIT.cpp
+++ b/js/src/ion/BaselineJIT.cpp
@@ -254,20 +254,25 @@ ion::CanEnterBaselineJIT(JSContext *cx, 
         return Method_CantCompile;
 
     if (!cx->compartment->ensureIonCompartmentExists(cx))
         return Method_Error;
 
     if (script->hasBaselineScript())
         return Method_Compiled;
 
-    // Eagerly compile scripts if JSD is enabled, so that we don't have to OSR
-    // and don't have to update the frame pointer stored in JSD's frames list.
-    if (scriptArg->incUseCount() <= js_IonOptions.baselineUsesBeforeCompile && !IsJSDEnabled(cx))
+    // Check script use count. However, always eagerly compile scripts if JSD
+    // is enabled, so that we don't have to OSR and don't have to update the
+    // frame pointer stored in JSD's frames list.
+    if (IsJSDEnabled(cx)) {
+        if (JSOp(*cx->regs().pc) == JSOP_LOOPENTRY) // No OSR.
+            return Method_Skipped;
+    } else if (scriptArg->incUseCount() <= js_IonOptions.baselineUsesBeforeCompile) {
         return Method_Skipped;
+    }
 
     if (script->isCallsiteClone) {
         // Ensure the original function is compiled too, so that bailouts from
         // Ion code have a BaselineScript to resume into.
         RootedScript original(cx, script->originalFunction()->nonLazyScript());
         JS_ASSERT(original != script);
 
         if (!original->canBaselineCompile())
--- a/js/src/ion/VMFunctions.cpp
+++ b/js/src/ion/VMFunctions.cpp
@@ -633,16 +633,19 @@ DebugEpilogue(JSContext *cx, BaselineFra
     // If ScriptDebugEpilogue returns |true| we have to return the frame's
     // return value. If it returns |false|, the debugger threw an exception.
     // In both cases we have to pop debug scopes.
     ok = ScriptDebugEpilogue(cx, frame, ok);
 
     if (frame->isNonEvalFunctionFrame()) {
         JS_ASSERT_IF(ok, frame->hasReturnValue());
         DebugScopes::onPopCall(frame, cx);
+    } else if (frame->isStrictEvalFrame()) {
+        JS_ASSERT_IF(frame->hasCallObj(), frame->scopeChain()->asCall().isForEval());
+        DebugScopes::onPopStrictEvalScope(frame);
     }
 
     if (!ok) {
         // Pop this frame by updating ionTop, so that the exception handling
         // code will start at the previous frame.
         IonJSFrameLayout *prefix = frame->framePrefix();
         EnsureExitFrame(prefix);
         cx->mainThread().ionTop = (uint8_t *)prefix;