Commit b5a6353a authored by Ed Morley's avatar Ed Morley
Browse files

Backout b176f299c52c (bug 794286), 0401e945059d (bug 787848), 95c4704589e1...

Backout b176f299c52c (bug 794286), 0401e945059d (bug 787848), 95c4704589e1 (bug 787309) for make check jit_test failures on a CLOSED TREE
parent e81997b9
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
try {
    h
} catch (x
if gc()) {} finally {
    this.z.z
}
+0 −7
Original line number Diff line number Diff line
try {
    i
}
catch (x if (function() {})()) {}
catch (d) {
    this.z.z
}
+0 −5
Original line number Diff line number Diff line
for (var i = 0; i < 1; i++) {
    let y
    if (undefined) continue
    undefined.e
}
+0 −36
Original line number Diff line number Diff line
@@ -6431,48 +6431,12 @@ ReconstructPCStack(JSContext *cx, JSScript *script, jsbytecode *target,
            if (0 < jmpoff && pc + jmpoff <= target) {
                pc += jmpoff;
                oplen = 0;
                /* Use the Hidden pc count if we follow the goto */
                if (hpcdepth != unsigned(-1)) {
                    pcdepth = hpcdepth;
                    hpcdepth = unsigned(-1);
                }
                continue;
            }

            if (!script->hasTrynotes()) {
                /* Use the normal pc count if continue after the goto */
                hpcdepth = unsigned(-1);
                continue;
            }

            /*
             * If we do not follow a goto we look for another mean to continue
             * at the next PC.
             */
            JSTryNote *tn = script->trynotes()->vector;
            JSTryNote *tnEnd = tn + script->trynotes()->length;
            for (; tn != tnEnd; tn++) {
                jsbytecode *start = script->main() + tn->start;
                jsbytecode *end = start + tn->length;
                if (start < pc && pc <= end && end <= target)
                    break;
            }

            if (tn != tnEnd) {
                pcdepth = tn->stackDepth;
                hpcdepth = unsigned(-1);
                oplen = 0;
                pc = script->main() + tn->start + tn->length;
                continue;
            }

            /*
             * JSOP_THROWING compensates for hidden JSOP_DUP at the start of the
             * previous guarded catch (see EmitTry in BytecodeEmitter.cpp).
             */
            if (JSOp(*(pc + oplen)) == JSOP_THROWING)
                hpcdepth = pcdepth + 2;
            continue;
        }

        /*