Bug 910782 - SpiderMonkey: Inline check_backedge, which is only used in one place. r=luke
authorDan Gohman <sunfish@google.com>
Wed, 04 Sep 2013 20:06:07 -0700
changeset 145624 d09951d9e0c01f9c92890100b364ded52c1c328c
parent 145623 6df80a4fdb06a24ba5b83c71d2e49731c7598e51
child 145625 7792dc26b3e1c71c02072295966d88c9c4b24e2e
push id25216
push useremorley@mozilla.com
push dateThu, 05 Sep 2013 10:06:42 +0000
treeherdermozilla-central@676322e0166c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs910782
milestone26.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 910782 - SpiderMonkey: Inline check_backedge, which is only used in one place. r=luke
js/src/vm/Interpreter.cpp
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -1302,17 +1302,17 @@ Interpret(JSContext *cx, RunState &state
     JS_END_MACRO
 
 #define BRANCH(n)                                                             \
     JS_BEGIN_MACRO                                                            \
         int32_t nlen = (n);                                                   \
         regs.pc += nlen;                                                      \
         op = (JSOp) *regs.pc;                                                 \
         if (nlen <= 0)                                                        \
-            goto check_backedge;                                              \
+            CHECK_BRANCH();                                                   \
         DO_OP();                                                              \
     JS_END_MACRO
 
 #define SET_SCRIPT(s)                                                         \
     JS_BEGIN_MACRO                                                            \
         script = (s);                                                         \
         if (script->hasAnyBreakpointsOrStepMode() || script->hasScriptCounts) \
             switchMask = -1; /* Enable interrupts. */                         \
@@ -1549,22 +1549,16 @@ BEGIN_CASE(JSOP_TRY)
 }
 
 BEGIN_CASE(JSOP_LOOPHEAD)
 END_CASE(JSOP_LOOPHEAD)
 
 BEGIN_CASE(JSOP_LABEL)
 END_CASE(JSOP_LABEL)
 
-check_backedge:
-{
-    CHECK_BRANCH();
-    DO_OP();
-}
-
 BEGIN_CASE(JSOP_LOOPENTRY)
 
 #ifdef JS_ION
     // Attempt on-stack replacement with Baseline code.
     if (jit::IsBaselineEnabled(cx)) {
         jit::MethodStatus status = jit::CanEnterBaselineAtBranch(cx, regs.fp(), false);
         if (status == jit::Method_Error)
             goto error;