Bug 1483183 - Complete coverage with AutoAssertNoPendingException in CacheIR stub attach code r=tcampbell
authorMatthew Gaudet <mgaudet@mozilla.com>
Sun, 19 Aug 2018 07:12:21 -0700
changeset 432431 a6c928f38da70047596a5933427166932a3540a3
parent 432430 79082cb95664b59e9507d7099854bae30caa4921
child 432432 407f1b80fd8ad10a75e8444fd002fbdf17084c46
push id106734
push usermgaudet@mozilla.com
push dateMon, 20 Aug 2018 17:37:49 +0000
treeherdermozilla-inbound@a6c928f38da7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1483183
milestone63.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 1483183 - Complete coverage with AutoAssertNoPendingException in CacheIR stub attach code r=tcampbell
js/src/jit/CacheIR.cpp
--- a/js/src/jit/CacheIR.cpp
+++ b/js/src/jit/CacheIR.cpp
@@ -4026,18 +4026,16 @@ SetPropIRGenerator::tryAttachWindowProxy
 
     trackAttached("WindowProxySlot");
     return true;
 }
 
 bool
 SetPropIRGenerator::tryAttachAddSlotStub(HandleObjectGroup oldGroup, HandleShape oldShape)
 {
-    AutoAssertNoPendingException aanpe(cx_);
-
     ValOperandId objValId(writer.setInputOperandId(0));
     ValOperandId rhsValId;
     if (cacheKind_ == CacheKind::SetProp) {
         rhsValId = ValOperandId(writer.setInputOperandId(1));
     } else {
         MOZ_ASSERT(cacheKind_ == CacheKind::SetElem);
         MOZ_ASSERT(setElemKeyValueId().id() == 1);
         writer.setInputOperandId(1);
@@ -4465,17 +4463,16 @@ CallIRGenerator::tryAttachStringSplit()
     if (args_[0].toString()->isAtom() && args_[1].toString()->isAtom())
         return false;
 
     // Get the object group to use for this location.
     RootedObjectGroup group(cx_, ObjectGroupRealm::getStringSplitStringGroup(cx_));
     if (!group)
         return false;
 
-    AutoAssertNoPendingException aanpe(cx_);
     Int32OperandId argcId(writer.setInputOperandId(0));
 
     // Ensure argc == 1.
     writer.guardSpecificInt32Immediate(argcId, 2);
 
     // 2 arguments.  Stack-layout here is (bottom to top):
     //
     //  3: Callee
@@ -4541,17 +4538,16 @@ CallIRGenerator::tryAttachArrayPush()
 
     MOZ_ASSERT(!thisarray->getElementsHeader()->isFrozen(),
                "Extensible arrays should not have frozen elements");
     MOZ_ASSERT(thisarray->lengthIsWritable());
 
     // After this point, we can generate code fine.
 
     // Generate code.
-    AutoAssertNoPendingException aanpe(cx_);
     Int32OperandId argcId(writer.setInputOperandId(0));
 
     // Ensure argc == 1.
     writer.guardSpecificInt32Immediate(argcId, 1);
 
     // 1 argument only.  Stack-layout here is (bottom to top):
     //
     //  2: Callee
@@ -4620,17 +4616,16 @@ CallIRGenerator::tryAttachArrayJoin()
     // And the array is packed.
     if (thisarray->getDenseInitializedLength() != thisarray->length())
         return false;
 
     // We don't need to worry about indexed properties because we can perform
     // hole check manually.
 
     // Generate code.
-    AutoAssertNoPendingException aanpe(cx_);
     Int32OperandId argcId(writer.setInputOperandId(0));
 
     // if 0 arguments:
     //  1: Callee
     //  0: ThisValue <-- Top of stack.
     //
     // if 1 argument:
     //  2: Callee
@@ -4669,16 +4664,18 @@ CallIRGenerator::tryAttachArrayJoin()
 
     trackAttached("ArrayJoin");
     return true;
 }
 
 bool
 CallIRGenerator::tryAttachStub()
 {
+    AutoAssertNoPendingException aanpe(cx_);
+
     // Only optimize on JSOP_CALL or JSOP_CALL_IGNORES_RV.  No fancy business for now.
     if ((op_ != JSOP_CALL) && (op_ != JSOP_CALL_IGNORES_RV))
         return false;
 
     // Only optimize when the mode is Specialized.
     if (mode_ != ICState::Mode::Specialized)
         return false;
 
@@ -5227,21 +5224,23 @@ GetIntrinsicIRGenerator::trackAttached(c
         sp.valueProperty("val", val_);
     }
 #endif
 }
 
 bool
 GetIntrinsicIRGenerator::tryAttachStub()
 {
+    AutoAssertNoPendingException aanpe(cx_);
     writer.loadValueResult(val_);
     writer.returnFromIC();
     trackAttached("GetIntrinsic");
     return true;
 }
+
 UnaryArithIRGenerator::UnaryArithIRGenerator(JSContext* cx, HandleScript script, jsbytecode* pc, ICState::Mode mode,
                                              JSOp op, HandleValue val, HandleValue res)
   : IRGenerator(cx, script, pc, CacheKind::UnaryArith, mode),
     op_(op),
     val_(val),
     res_(res)
 { }
 
@@ -5254,16 +5253,17 @@ UnaryArithIRGenerator::trackAttached(con
         sp.valueProperty("res", res_);
     }
 #endif
 }
 
 bool
 UnaryArithIRGenerator::tryAttachStub()
 {
+    AutoAssertNoPendingException aanpe(cx_);
     if (tryAttachInt32())
         return true;
     if (tryAttachNumber())
         return true;
 
     trackAttached(IRGenerator::NotAttached);
     return false;
 }
@@ -5340,17 +5340,17 @@ BinaryArithIRGenerator::trackAttached(co
         sp.valueProperty("lhs", lhs_);
     }
 #endif
 }
 
 bool
 BinaryArithIRGenerator::tryAttachStub()
 {
-
+    AutoAssertNoPendingException aanpe(cx_);
     // Attempt common case first
     if (tryAttachInt32())
         return true;
     if (tryAttachBooleanWithInt32())
         return true;
     if (tryAttachDoubleWithInt32())
         return true;
 
@@ -5688,16 +5688,17 @@ NewObjectIRGenerator::trackAttached(cons
         sp.opcodeProperty("op", op_);
     }
 #endif
 }
 
 bool
 NewObjectIRGenerator::tryAttachStub()
 {
+    AutoAssertNoPendingException aanpe(cx_);
     if (!templateObject_->is<UnboxedPlainObject>() &&
         templateObject_->as<PlainObject>().hasDynamicSlots())
     {
         trackAttached(IRGenerator::NotAttached);
         return false;
     }
 
     // Don't attach stub if group is pretenured, as the stub