Bug 656555 - Handle JSOP_TRAP inside JSOP_LAMBDA (r=dmandelin)
authorBill McCloskey <wmccloskey@mozilla.com>
Wed, 18 May 2011 10:30:47 -0700
changeset 69932 deccd0dc4a41baf80626c62eb7232a1326cdbe0e
parent 69931 0619ebfaed3d55d402c1fb091f0905251974f67c
child 69933 848855c35e27345bae5b9105d59ebc5c1eb529b2
push id20142
push usercleary@mozilla.com
push dateMon, 23 May 2011 07:31:35 +0000
treeherdermozilla-central@0f9347d40121 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmandelin
bugs656555
milestone6.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 656555 - Handle JSOP_TRAP inside JSOP_LAMBDA (r=dmandelin)
js/src/jit-test/tests/basic/bug656555.js
js/src/jsinterp.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug656555.js
@@ -0,0 +1,5 @@
+// |jit-test| debug
+function f() { ({}).m = function(){}; }
+dis(f);
+trap(f, 11, '');
+f();
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -5500,17 +5500,17 @@ BEGIN_CASE(JSOP_LAMBDA)
 
                     fun->setMethodAtom(script->getAtom(GET_FULL_INDEX(pc2 - regs.pc)));
                     JS_FUNCTION_METER(cx, joinedinitmethod);
                     break;
                 }
 
                 if (op2 == JSOP_SETMETHOD) {
 #ifdef DEBUG
-                    op2 = JSOp(pc2[JSOP_SETMETHOD_LENGTH]);
+                    op2 = js_GetOpcode(cx, script, pc2 + JSOP_SETMETHOD_LENGTH);
                     JS_ASSERT(op2 == JSOP_POP || op2 == JSOP_POPV);
 #endif
                     const Value &lref = regs.sp[-1];
                     if (lref.isObject() && lref.toObject().canHaveMethodBarrier()) {
                         fun->setMethodAtom(script->getAtom(GET_FULL_INDEX(pc2 - regs.pc)));
                         JS_FUNCTION_METER(cx, joinedsetmethod);
                         break;
                     }