Bug 700915: 64-bit RegExp domaeo_basics diagnostic. (r=billm)
authorChris Leary <cdleary@mozilla.com>
Thu, 10 Nov 2011 12:42:58 -0800
changeset 80148 fe41fa77e51aa361e3621f8d7a0646ff60df68fb
parent 80147 bd9c1c9707b0a0a61ac7b57578357bf7c4349514
child 80149 d88e2c0f27321475baabdbce4311f344bdbf4a53
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbillm
bugs700915
milestone11.0a1
Bug 700915: 64-bit RegExp domaeo_basics diagnostic. (r=billm)
js/src/methodjit/Compiler.cpp
js/src/methodjit/Compiler.h
--- a/js/src/methodjit/Compiler.cpp
+++ b/js/src/methodjit/Compiler.cpp
@@ -6913,36 +6913,45 @@ mjit::Compiler::jsop_newinit()
 
     frame.extra(frame.peek(-1)).initArray = (*PC == JSOP_NEWARRAY);
     frame.extra(frame.peek(-1)).initObject = baseobj;
 
     return true;
 }
 
 bool
+mjit::Compiler::jsop_regexp_stub(RegExpObject *reobj)
+{
+    prepareStubCall(Uses(0));
+    masm.move(ImmPtr(reobj), Registers::ArgReg1);
+    INLINE_STUBCALL(stubs::RegExp, REJOIN_FALLTHROUGH);
+    frame.pushSynced(JSVAL_TYPE_OBJECT);
+    return true;
+}
+
+bool
 mjit::Compiler::jsop_regexp()
 {
     JSObject *obj = script->getRegExp(fullAtomIndex(PC));
-    RegExpStatics *res = globalObj ? globalObj->getRegExpStatics() : NULL;
-
+    RegExpObject *reobj = obj->asRegExp();
+
+    return jsop_regexp_stub(reobj);
+
+    // FIXME diagnostic bug 700915.
+#if 0
     if (!globalObj ||
-        obj->getGlobal() != globalObj ||
+        reobj->getGlobal() != globalObj ||
         !cx->typeInferenceEnabled() ||
         analysis->localsAliasStack() ||
         types::TypeSet::HasObjectFlags(cx, globalObj->getType(cx),
                                        types::OBJECT_FLAG_REGEXP_FLAGS_SET)) {
-        prepareStubCall(Uses(0));
-        masm.move(ImmPtr(obj), Registers::ArgReg1);
-        INLINE_STUBCALL(stubs::RegExp, REJOIN_FALLTHROUGH);
-        frame.pushSynced(JSVAL_TYPE_OBJECT);
-        return true;
-    }
-
-    RegExpObject *reobj = obj->asRegExp();
-
+        return jsop_regexp_stub(reobj);
+    }
+
+    RegExpStatics *res = globalObj ? globalObj->getRegExpStatics() : NULL;
     DebugOnly<uint32> origFlags = reobj->getFlags();
     DebugOnly<uint32> staticsFlags = res->getFlags();
     JS_ASSERT((origFlags & staticsFlags) == staticsFlags);
 
     /*
      * JS semantics require regular expression literals to create different
      * objects every time they execute. We only need to do this cloning if the
      * script could actually observe the effect of such cloning, by getting
@@ -7001,16 +7010,17 @@ mjit::Compiler::jsop_regexp()
     /* Bump the refcount on the wrapped RegExp. */
     size_t *refcount = rep->addressOfRefCount();
     masm.add32(Imm32(1), AbsoluteAddress(refcount));
 
     frame.pushTypedPayload(JSVAL_TYPE_OBJECT, result);
 
     stubcc.rejoin(Changes(1));
     return true;
+#endif
 }
 
 bool
 mjit::Compiler::startLoop(jsbytecode *head, Jump entry, jsbytecode *entryTarget)
 {
     JS_ASSERT(cx->typeInferenceEnabled() && script == outerScript);
 
     if (loop) {
--- a/js/src/methodjit/Compiler.h
+++ b/js/src/methodjit/Compiler.h
@@ -702,16 +702,17 @@ private:
     void jsop_not();
     void jsop_typeof();
     bool booleanJumpScript(JSOp op, jsbytecode *target);
     bool jsop_ifneq(JSOp op, jsbytecode *target);
     bool jsop_andor(JSOp op, jsbytecode *target);
     bool jsop_arginc(JSOp op, uint32 slot);
     bool jsop_localinc(JSOp op, uint32 slot);
     bool jsop_newinit();
+    bool jsop_regexp_stub(RegExpObject *reobj);
     bool jsop_regexp();
     void jsop_initmethod();
     void jsop_initprop();
     void jsop_initelem();
     void jsop_setelem_dense();
 #ifdef JS_METHODJIT_TYPED_ARRAY
     void jsop_setelem_typed(int atype);
     void convertForTypedArray(int atype, ValueRemat *vr, bool *allocated);