Bug 625701: Fixed-width IC cmp/branch is required for x86. (r=dvander)
authorChris Leary <cdleary@mozilla.com>
Fri, 14 Jan 2011 02:57:21 -0800
changeset 60600 e8c8df3f17f2ba93a48cc67a084dca3bf0855430
parent 60599 8ee980212905235719218b3a08b312f74c6f154f
child 60601 fb2192c7b8c272818d7fbd9433538e6395bd876d
push idunknown
push userunknown
push dateunknown
reviewersdvander
bugs625701
milestone2.0b10pre
Bug 625701: Fixed-width IC cmp/branch is required for x86. (r=dvander)
js/src/jit-test/tests/jaeger/regress-bug625701.js
js/src/methodjit/PolyIC.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/jaeger/regress-bug625701.js
@@ -0,0 +1,10 @@
+gczeal(2);
+
+for(var i=0; i<20; i++) {
+    function f() {
+        for (var j = 0; j < 3; j++) {
+            (function() {})();
+        }
+    }
+    f();
+}
--- a/js/src/methodjit/PolyIC.cpp
+++ b/js/src/methodjit/PolyIC.cpp
@@ -282,20 +282,18 @@ class SetPropCompiler : public PICStubCo
 
         // Shape guard.
         if (pic.shapeNeedsRemat()) {
             masm.loadShape(pic.objReg, pic.shapeReg);
             pic.shapeRegHasBaseShape = true;
         }
 
         Label start = masm.label();
-        DataLabel32 unused;
-        Jump shapeGuard = masm.branch32WithPatch(Assembler::NotEqual, pic.shapeReg,
-                                                 Imm32(initialShape), unused);
-        (void) unused;
+        Jump shapeGuard = masm.branch32_force32(Assembler::NotEqual, pic.shapeReg,
+                                                Imm32(initialShape));
 
         Label stubShapeJumpLabel = masm.label();
 
         JS_ASSERT_IF(!shape->hasDefaultSetter(), obj->getClass() == &js_CallClass);
 
         MaybeJump skipOver;
 
         if (adding) {