[INFER] Fix bug in previous fix for bug 673341. r=bhackett
authorShu-yu Guo <shu@rfrn.org>
Fri, 22 Jul 2011 12:47:16 -0700
changeset 77371 d90e0b3a8bb9c83a40954058d035f6665bb1ff75
parent 77370 771034eb1f9d121175a1d81b12b5191467ca79d5
child 77372 4fbb36c1c9a3ad2aa3cdc7aec0841faf13886a74
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)
reviewersbhackett
bugs673341
milestone8.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 bug in previous fix for bug 673341. r=bhackett
js/src/jsanalyze.cpp
--- a/js/src/jsanalyze.cpp
+++ b/js/src/jsanalyze.cpp
@@ -859,36 +859,36 @@ ScriptAnalysis::analyzeLifetimes(JSConte
             JS_ASSERT_IF(loop, loop->head < offset);
         }
 
         /* Find the last jump target in the loop, other than the initial entry point. */
         if (loop && code->jumpTarget && offset != loop->entry && offset > loop->lastBlock)
             loop->lastBlock = offset;
 
         if (code->exceptionEntry) {
-            unsigned tryOffset = 0;
+            bool found = false;
             JSTryNote *tn = script->trynotes()->vector;
             JSTryNote *tnlimit = tn + script->trynotes()->length;
             for (; tn < tnlimit; tn++) {
                 unsigned startOffset = script->main - script->code + tn->start;
                 if (startOffset + tn->length == offset) {
-                    tryOffset = startOffset - 1;
+                    /*
+                     * Extend all live variables at exception entry to the start of
+                     * the try block.
+                     */
+                    for (unsigned i = 0; i < numSlots; i++) {
+                        if (lifetimes[i].lifetime)
+                            ensureVariable(lifetimes[i], startOffset - 1);
+                    }
+
+                    found = true;
                     break;
                 }
-                JS_NOT_REACHED("Start of try block not found");
             }
-
-            /*
-             * Extend all live variables at exception entry to the start of
-             * the try block.
-             */
-            for (unsigned i = 0; i < numSlots; i++) {
-                if (lifetimes[i].lifetime)
-                    ensureVariable(lifetimes[i], tryOffset);
-            }
+            JS_ASSERT(found);
         }
 
         switch (op) {
           case JSOP_GETARG:
           case JSOP_CALLARG:
           case JSOP_GETLOCAL:
           case JSOP_CALLLOCAL:
           case JSOP_THIS: {