Bug 1546786 - Renames converting guard cacheIR ops. r=mgaudet
authorAdam Holm <asorholm@email.arizona.edu>
Wed, 10 Jul 2019 18:08:21 +0000
changeset 482266 4d8a44b52bb6773ba7bf346efe44afc3056ef4d5
parent 482265 8149efc1f8131d09db617e82c9e6fbde25cccd0c
child 482267 118cd41584b5f4a66eda0d4bf491b749f2e5ca71
push id89661
push usercsabou@mozilla.com
push dateWed, 10 Jul 2019 19:47:32 +0000
treeherderautoland@4d8a44b52bb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmgaudet
bugs1546786
milestone70.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 1546786 - Renames converting guard cacheIR ops. r=mgaudet Differential Revision: https://phabricator.services.mozilla.com/D37454
js/src/jit/BaselineInspector.cpp
js/src/jit/CacheIR.cpp
js/src/jit/CacheIR.h
js/src/jit/CacheIRCompiler.cpp
js/src/jit/CacheIRCompiler.h
--- a/js/src/jit/BaselineInspector.cpp
+++ b/js/src/jit/BaselineInspector.cpp
@@ -63,25 +63,25 @@ static bool AddReceiver(const ReceiverGu
                         BaselineInspector::ReceiverVector& receivers) {
   return VectorAppendNoDuplicate(receivers, receiver);
 }
 
 static bool GetCacheIRReceiverForNativeReadSlot(ICCacheIR_Monitored* stub,
                                                 ReceiverGuard* receiver) {
   // We match:
   //
-  //   GuardIsObject 0
+  //   GuardToObject 0
   //   GuardShape 0
   //   LoadFixedSlotResult 0 or LoadDynamicSlotResult 0
 
   *receiver = ReceiverGuard();
   CacheIRReader reader(stub->stubInfo());
 
   ObjOperandId objId = ObjOperandId(0);
-  if (!reader.matchOp(CacheOp::GuardIsObject, objId)) {
+  if (!reader.matchOp(CacheOp::GuardToObject, objId)) {
     return false;
   }
 
   if (reader.matchOp(CacheOp::GuardShape, objId)) {
     receiver->setShape(
         stub->stubInfo()->getStubField<Shape*>(stub, reader.stubOffset()));
     return reader.matchOpEither(CacheOp::LoadFixedSlotResult,
                                 CacheOp::LoadDynamicSlotResult);
@@ -89,25 +89,25 @@ static bool GetCacheIRReceiverForNativeR
 
   return false;
 }
 
 static bool GetCacheIRReceiverForNativeSetSlot(ICCacheIR_Updated* stub,
                                                ReceiverGuard* receiver) {
   // We match:
   //
-  //   GuardIsObject 0
+  //   GuardToObject 0
   //   GuardGroup 0
   //   GuardShape 0
   //   StoreFixedSlot 0 or StoreDynamicSlot 0
   *receiver = ReceiverGuard();
   CacheIRReader reader(stub->stubInfo());
 
   ObjOperandId objId = ObjOperandId(0);
-  if (!reader.matchOp(CacheOp::GuardIsObject, objId)) {
+  if (!reader.matchOp(CacheOp::GuardToObject, objId)) {
     return false;
   }
 
   if (!reader.matchOp(CacheOp::GuardGroup, objId)) {
     return false;
   }
   ObjectGroup* group =
       stub->stubInfo()->getStubField<ObjectGroup*>(stub, reader.stubOffset());
@@ -236,29 +236,29 @@ bool BaselineInspector::dimorphicStub(js
   return true;
 }
 
 // Process the type guards in the stub in order to reveal the
 // underlying operation.
 static void SkipBinaryGuards(CacheIRReader& reader) {
   while (true) {
     // Two skip opcodes
-    if (reader.matchOp(CacheOp::GuardIsInt32) ||
+    if (reader.matchOp(CacheOp::GuardToInt32) ||
         reader.matchOp(CacheOp::GuardType) ||
         reader.matchOp(CacheOp::TruncateDoubleToUInt32) ||
-        reader.matchOp(CacheOp::GuardIsBoolean)) {
+        reader.matchOp(CacheOp::GuardToBoolean)) {
       reader.skip();  // Skip over operandId
       reader.skip();  // Skip over result/type.
       continue;
     }
 
     // One skip
     if (reader.matchOp(CacheOp::GuardIsNumber) ||
-        reader.matchOp(CacheOp::GuardIsString) ||
-        reader.matchOp(CacheOp::GuardIsObject)) {
+        reader.matchOp(CacheOp::GuardToString) ||
+        reader.matchOp(CacheOp::GuardToObject)) {
       reader.skip();  // Skip over operandId
       continue;
     }
     return;
   }
 }
 
 static MIRType ParseCacheIRStub(ICStub* stub) {
@@ -352,38 +352,38 @@ static bool GuardType(CacheIRReader& rea
 
   // Already assigned this guard a type, fail.
   if (guardType[guardOperand] != MIRType::None) {
     return false;
   }
 
   switch (op) {
     // 0 Skip cases
-    case CacheOp::GuardIsString:
+    case CacheOp::GuardToString:
       guardType[guardOperand] = MIRType::String;
       break;
-    case CacheOp::GuardIsSymbol:
+    case CacheOp::GuardToSymbol:
       guardType[guardOperand] = MIRType::Symbol;
       break;
-    case CacheOp::GuardIsBigInt:
+    case CacheOp::GuardToBigInt:
       guardType[guardOperand] = MIRType::BigInt;
       break;
     case CacheOp::GuardIsNumber:
       guardType[guardOperand] = MIRType::Double;
       break;
     case CacheOp::GuardIsUndefined:
       guardType[guardOperand] = MIRType::Undefined;
       break;
     // 1 skip
-    case CacheOp::GuardIsInt32:
+    case CacheOp::GuardToInt32:
       guardType[guardOperand] = MIRType::Int32;
       // Skip over result
       reader.skip();
       break;
-    case CacheOp::GuardIsBoolean:
+    case CacheOp::GuardToBoolean:
       guardType[guardOperand] = MIRType::Boolean;
       // Skip over result
       reader.skip();
       break;
     // Unknown op --
     default:
       return false;
   }
@@ -943,30 +943,30 @@ static bool AddCacheIRGlobalGetter(ICCac
   return true;
 }
 
 static bool GuardSpecificAtomOrSymbol(CacheIRReader& reader, ICStub* stub,
                                       const CacheIRStubInfo* stubInfo,
                                       ValOperandId keyId, jsid id) {
   // Try to match an id guard emitted by IRGenerator::emitIdGuard.
   if (JSID_IS_ATOM(id)) {
-    if (!reader.matchOp(CacheOp::GuardIsString, keyId)) {
+    if (!reader.matchOp(CacheOp::GuardToString, keyId)) {
       return false;
     }
     if (!reader.matchOp(CacheOp::GuardSpecificAtom, keyId)) {
       return false;
     }
     JSString* str =
         stubInfo->getStubField<JSString*>(stub, reader.stubOffset()).get();
     if (AtomToId(&str->asAtom()) != id) {
       return false;
     }
   } else {
     MOZ_ASSERT(JSID_IS_SYMBOL(id));
-    if (!reader.matchOp(CacheOp::GuardIsSymbol, keyId)) {
+    if (!reader.matchOp(CacheOp::GuardToSymbol, keyId)) {
       return false;
     }
     if (!reader.matchOp(CacheOp::GuardSpecificSymbol, keyId)) {
       return false;
     }
     Symbol* sym =
         stubInfo->getStubField<Symbol*>(stub, reader.stubOffset()).get();
     if (SYMBOL_TO_JSID(sym) != id) {
@@ -979,25 +979,25 @@ static bool GuardSpecificAtomOrSymbol(Ca
 
 static bool AddCacheIRGetPropFunction(
     ICCacheIR_Monitored* stub, jsid id, bool innerized, JSObject** holder,
     Shape** holderShape, JSFunction** commonGetter, Shape** globalShape,
     bool* isOwnProperty, BaselineInspector::ReceiverVector& receivers,
     JSScript* script) {
   // We match either an own getter:
   //
-  //   GuardIsObject objId
+  //   GuardToObject objId
   //   [..Id Guard..]
   //   [..WindowProxy innerization..]
   //   <GuardReceiver objId>
   //   Call(Scripted|Native)GetterResult objId
   //
   // Or a getter on the prototype:
   //
-  //   GuardIsObject objId
+  //   GuardToObject objId
   //   [..Id Guard..]
   //   [..WindowProxy innerization..]
   //   <GuardReceiver objId>
   //   LoadObject holderId
   //   GuardShape holderId
   //   Call(Scripted|Native)GetterResult objId
   //
   // If |innerized| is true, we replaced a WindowProxy with the Window
@@ -1011,17 +1011,17 @@ static bool AddCacheIRGetPropFunction(
   //
   // If we test for a specific jsid, [..Id Guard..] is implemented through:
   //   GuardIs(String|Symbol) keyId
   //   GuardSpecific(Atom|Symbol) keyId, <atom|symbol>
 
   CacheIRReader reader(stub->stubInfo());
 
   ObjOperandId objId = ObjOperandId(0);
-  if (!reader.matchOp(CacheOp::GuardIsObject, objId)) {
+  if (!reader.matchOp(CacheOp::GuardToObject, objId)) {
     return AddCacheIRGlobalGetter(stub, innerized, holder, holderShape,
                                   commonGetter, globalShape, isOwnProperty,
                                   receivers, script);
   }
 
   if (!JSID_IS_EMPTY(id)) {
     ValOperandId keyId = ValOperandId(1);
     if (!GuardSpecificAtomOrSymbol(reader, stub, stub->stubInfo(), keyId, id)) {
@@ -1174,30 +1174,30 @@ bool BaselineInspector::commonGetPropFun
   MOZ_ASSERT(*isOwnProperty == receivers.empty());
   return true;
 }
 
 static JSFunction* GetMegamorphicGetterSetterFunction(
     ICStub* stub, const CacheIRStubInfo* stubInfo, jsid id, bool isGetter) {
   // We match:
   //
-  //   GuardIsObject objId
+  //   GuardToObject objId
   //   [..Id Guard..]
   //   GuardHasGetterSetter objId propShape
   //
   // propShape has the getter/setter we're interested in.
   //
   // If we test for a specific jsid, [..Id Guard..] is implemented through:
   //   GuardIs(String|Symbol) keyId
   //   GuardSpecific(Atom|Symbol) keyId, <atom|symbol>
 
   CacheIRReader reader(stubInfo);
 
   ObjOperandId objId = ObjOperandId(0);
-  if (!reader.matchOp(CacheOp::GuardIsObject, objId)) {
+  if (!reader.matchOp(CacheOp::GuardToObject, objId)) {
     return nullptr;
   }
 
   if (!JSID_IS_EMPTY(id)) {
     ValOperandId keyId = ValOperandId(1);
     if (!GuardSpecificAtomOrSymbol(reader, stub, stubInfo, keyId, id)) {
       return nullptr;
     }
@@ -1271,32 +1271,32 @@ bool BaselineInspector::megamorphicGette
 }
 
 static bool AddCacheIRSetPropFunction(
     ICCacheIR_Updated* stub, JSObject** holder, Shape** holderShape,
     JSFunction** commonSetter, bool* isOwnProperty,
     BaselineInspector::ReceiverVector& receivers) {
   // We match either an own setter:
   //
-  //   GuardIsObject objId
+  //   GuardToObject objId
   //   <GuardReceiver objId>
   //   Call(Scripted|Native)Setter objId
   //
   // Or a setter on the prototype:
   //
-  //   GuardIsObject objId
+  //   GuardToObject objId
   //   <GuardReceiver objId>
   //   LoadObject holderId
   //   GuardShape holderId
   //   Call(Scripted|Native)Setter objId
 
   CacheIRReader reader(stub->stubInfo());
 
   ObjOperandId objId = ObjOperandId(0);
-  if (!reader.matchOp(CacheOp::GuardIsObject, objId)) {
+  if (!reader.matchOp(CacheOp::GuardToObject, objId)) {
     return false;
   }
 
   ReceiverGuard receiver;
   if (!MatchCacheIRReceiverGuard(reader, stub, stub->stubInfo(), objId,
                                  &receiver)) {
     return false;
   }
@@ -1406,27 +1406,27 @@ bool BaselineInspector::commonSetPropFun
   return true;
 }
 
 static bool GetCacheIRReceiverForProtoReadSlot(ICCacheIR_Monitored* stub,
                                                ReceiverGuard* receiver,
                                                JSObject** holderResult) {
   // We match:
   //
-  //   GuardIsObject 0
+  //   GuardToObject 0
   //   <ReceiverGuard>
   //   1: LoadObject holder
   //   GuardShape 1
   //   LoadFixedSlotResult 1 or LoadDynamicSlotResult 1
 
   *receiver = ReceiverGuard();
   CacheIRReader reader(stub->stubInfo());
 
   ObjOperandId objId = ObjOperandId(0);
-  if (!reader.matchOp(CacheOp::GuardIsObject, objId)) {
+  if (!reader.matchOp(CacheOp::GuardToObject, objId)) {
     return false;
   }
 
   if (!MatchCacheIRReceiverGuard(reader, stub, stub->stubInfo(), objId,
                                  receiver)) {
     return false;
   }
 
@@ -1507,20 +1507,20 @@ bool BaselineInspector::maybeInfoForProt
 
   MOZ_ASSERT_IF(!receivers.empty(), *holder);
   return true;
 }
 
 static MIRType GetCacheIRExpectedInputType(ICCacheIR_Monitored* stub) {
   CacheIRReader reader(stub->stubInfo());
 
-  if (reader.matchOp(CacheOp::GuardIsObject, ValOperandId(0))) {
+  if (reader.matchOp(CacheOp::GuardToObject, ValOperandId(0))) {
     return MIRType::Object;
   }
-  if (reader.matchOp(CacheOp::GuardIsString, ValOperandId(0))) {
+  if (reader.matchOp(CacheOp::GuardToString, ValOperandId(0))) {
     return MIRType::String;
   }
   if (reader.matchOp(CacheOp::GuardIsNumber, ValOperandId(0))) {
     return MIRType::Double;
   }
   if (reader.matchOp(CacheOp::GuardType, ValOperandId(0))) {
     ValueType type = reader.valueType();
     return MIRTypeFromValueType(JSValueType(type));
@@ -1578,17 +1578,17 @@ bool BaselineInspector::instanceOfData(j
   }
 
   ICCacheIR_Regular* stub = entry.firstStub()->toCacheIR_Regular();
   CacheIRReader reader(stub->stubInfo());
 
   ObjOperandId rhsId = ObjOperandId(1);
   ObjOperandId resId = ObjOperandId(2);
 
-  if (!reader.matchOp(CacheOp::GuardIsObject, rhsId)) {
+  if (!reader.matchOp(CacheOp::GuardToObject, rhsId)) {
     return false;
   }
 
   if (!reader.matchOp(CacheOp::GuardShape, rhsId)) {
     return false;
   }
 
   *shape = stub->stubInfo()->getStubField<Shape*>(stub, reader.stubOffset());
--- a/js/src/jit/CacheIR.cpp
+++ b/js/src/jit/CacheIR.cpp
@@ -255,17 +255,17 @@ AttachDecision GetPropIRGenerator::tryAt
   bool nameOrSymbol;
   if (!ValueToNameOrSymbolId(cx_, idVal_, &id, &nameOrSymbol)) {
     cx_->clearPendingException();
     return AttachDecision::NoAction;
   }
 
   if (val_.isObject()) {
     RootedObject obj(cx_, &val_.toObject());
-    ObjOperandId objId = writer.guardIsObject(valId);
+    ObjOperandId objId = writer.guardToObject(valId);
     if (nameOrSymbol) {
       TRY_ATTACH(tryAttachObjectLength(obj, objId, id));
       TRY_ATTACH(tryAttachNative(obj, objId, id));
       TRY_ATTACH(tryAttachTypedObject(obj, objId, id));
       TRY_ATTACH(tryAttachModuleNamespace(obj, objId, id));
       TRY_ATTACH(tryAttachWindowProxy(obj, objId, id));
       TRY_ATTACH(tryAttachCrossCompartmentWrapper(obj, objId, id));
       TRY_ATTACH(tryAttachXrayCrossCompartmentWrapper(obj, objId, id));
@@ -327,17 +327,17 @@ AttachDecision GetPropIRGenerator::tryAt
   // to handle, since we do not have a pc to explicitly monitor the result.
 
   MOZ_ASSERT(idempotent());
 
   RootedObject obj(cx_, &val_.toObject());
   RootedId id(cx_, NameToId(idVal_.toString()->asAtom().asPropertyName()));
 
   ValOperandId valId(writer.setInputOperandId(0));
-  ObjOperandId objId = writer.guardIsObject(valId);
+  ObjOperandId objId = writer.guardToObject(valId);
 
   TRY_ATTACH(tryAttachNative(obj, objId, id));
 
   // Object lengths are supported only if int32 results are allowed.
   TRY_ATTACH(tryAttachObjectLength(obj, objId, id));
 
   // Also support native data properties on DOMProxy prototypes.
   if (GetProxyStubType(cx_, obj, id) == ProxyStubType::DOMUnshadowed) {
@@ -1061,17 +1061,17 @@ AttachDecision GetPropIRGenerator::tryAt
       trackAttached("NativeSlot");
       return AttachDecision::Attach;
     case CanAttachScriptedGetter:
     case CanAttachNativeGetter: {
       // |super.prop| accesses use a |this| value that differs from lookup
       // object
       MOZ_ASSERT(!idempotent());
       ObjOperandId receiverId =
-          isSuper() ? writer.guardIsObject(getSuperReceiverValueId()) : objId;
+          isSuper() ? writer.guardToObject(getSuperReceiverValueId()) : objId;
       maybeEmitIdGuard(id);
       EmitCallGetterResult(writer, obj, holder, shape, objId, receiverId,
                            mode_);
 
       trackAttached("NativeGetter");
       return AttachDecision::Attach;
     }
   }
@@ -1440,17 +1440,17 @@ ObjOperandId IRGenerator::guardDOMProxyE
   ValOperandId expandoValId;
   if (expandoVal.isObject()) {
     expandoValId = writer.loadDOMExpandoValue(objId);
   } else {
     expandoValId = writer.loadDOMExpandoValueIgnoreGeneration(objId);
   }
 
   // Guard the expando is an object and shape guard.
-  ObjOperandId expandoObjId = writer.guardIsObject(expandoValId);
+  ObjOperandId expandoObjId = writer.guardToObject(expandoValId);
   TestMatchingHolder(writer, expandoObj, expandoObjId);
   return expandoObjId;
 }
 
 AttachDecision GetPropIRGenerator::tryAttachDOMProxyExpando(HandleObject obj,
                                                             ObjOperandId objId,
                                                             HandleId id) {
   MOZ_ASSERT(IsCacheableDOMProxy(obj));
@@ -1945,17 +1945,17 @@ AttachDecision GetPropIRGenerator::tryAt
 }
 
 AttachDecision GetPropIRGenerator::tryAttachStringLength(ValOperandId valId,
                                                          HandleId id) {
   if (!val_.isString() || !JSID_IS_ATOM(id, cx_->names().length)) {
     return AttachDecision::NoAction;
   }
 
-  StringOperandId strId = writer.guardIsString(valId);
+  StringOperandId strId = writer.guardToString(valId);
   maybeEmitIdGuard(id);
   writer.loadStringLengthResult(strId);
   writer.returnFromIC();
 
   trackAttached("StringLength");
   return AttachDecision::Attach;
 }
 
@@ -1990,18 +1990,18 @@ AttachDecision GetPropIRGenerator::tryAt
     str = rope->leftChild();
   }
 
   if (!str->isLinear() || str->asLinear().latin1OrTwoByteChar(index) >=
                               StaticStrings::UNIT_STATIC_LIMIT) {
     return AttachDecision::NoAction;
   }
 
-  StringOperandId strId = writer.guardIsString(valId);
-  Int32OperandId int32IndexId = writer.guardIsInt32Index(indexId);
+  StringOperandId strId = writer.guardToString(valId);
+  Int32OperandId int32IndexId = writer.guardToInt32Index(indexId);
   writer.loadStringCharResult(strId, int32IndexId);
   writer.returnFromIC();
 
   trackAttached("StringChar");
   return AttachDecision::Attach;
 }
 
 AttachDecision GetPropIRGenerator::tryAttachMagicArgumentsName(
@@ -2038,17 +2038,17 @@ AttachDecision GetPropIRGenerator::tryAt
 
   if (!val_.isMagic(JS_OPTIMIZED_ARGUMENTS)) {
     return AttachDecision::NoAction;
   }
 
   writer.guardMagicValue(valId, JS_OPTIMIZED_ARGUMENTS);
   writer.guardFrameHasNoArgumentsObject();
 
-  Int32OperandId int32IndexId = writer.guardIsInt32Index(indexId);
+  Int32OperandId int32IndexId = writer.guardToInt32Index(indexId);
   writer.loadFrameArgumentResult(int32IndexId);
   writer.typeMonitorResult();
 
   trackAttached("MagicArgument");
   return AttachDecision::Attach;
 }
 
 AttachDecision GetPropIRGenerator::tryAttachArgumentsObjectArg(
@@ -2355,21 +2355,21 @@ void GetPropIRGenerator::trackAttached(c
     sp.valueProperty("base", val_);
     sp.valueProperty("property", idVal_);
   }
 #endif
 }
 
 void IRGenerator::emitIdGuard(ValOperandId valId, jsid id) {
   if (JSID_IS_SYMBOL(id)) {
-    SymbolOperandId symId = writer.guardIsSymbol(valId);
+    SymbolOperandId symId = writer.guardToSymbol(valId);
     writer.guardSpecificSymbol(symId, JSID_TO_SYMBOL(id));
   } else {
     MOZ_ASSERT(JSID_IS_ATOM(id));
-    StringOperandId strId = writer.guardIsString(valId);
+    StringOperandId strId = writer.guardToString(valId);
     writer.guardSpecificAtom(strId, JSID_TO_ATOM(id));
   }
 }
 
 void GetPropIRGenerator::maybeEmitIdGuard(jsid id) {
   if (cacheKind_ == CacheKind::GetProp ||
       cacheKind_ == CacheKind::GetPropSuper) {
     // Constant PropertyName, no guards necessary.
@@ -3089,17 +3089,17 @@ AttachDecision HasPropIRGenerator::tryAt
   ValOperandId keyId(writer.setInputOperandId(0));
   ValOperandId valId(writer.setInputOperandId(1));
 
   if (!val_.isObject()) {
     trackAttached(IRGenerator::NotAttached);
     return AttachDecision::NoAction;
   }
   RootedObject obj(cx_, &val_.toObject());
-  ObjOperandId objId = writer.guardIsObject(valId);
+  ObjOperandId objId = writer.guardToObject(valId);
 
   // Optimize Proxies
   TRY_ATTACH(tryAttachProxyElement(obj, objId, keyId));
 
   RootedId id(cx_);
   bool nameOrSymbol;
   if (!ValueToNameOrSymbolId(cx_, idVal_, &id, &nameOrSymbol)) {
     cx_->clearPendingException();
@@ -3153,27 +3153,27 @@ bool IRGenerator::maybeGuardInt32Index(c
       }
     }
 
     if (indexSigned < 0) {
       return false;
     }
 
     *int32Index = uint32_t(indexSigned);
-    *int32IndexId = writer.guardIsInt32Index(indexId);
+    *int32IndexId = writer.guardToInt32Index(indexId);
     return true;
   }
 
   if (index.isString()) {
     int32_t indexSigned = GetIndexFromString(index.toString());
     if (indexSigned < 0) {
       return false;
     }
 
-    StringOperandId strId = writer.guardIsString(indexId);
+    StringOperandId strId = writer.guardToString(indexId);
     *int32Index = uint32_t(indexSigned);
     *int32IndexId = writer.guardAndGetIndexFromString(strId);
     return true;
   }
 
   return false;
 }
 
@@ -3211,17 +3211,17 @@ AttachDecision SetPropIRGenerator::tryAt
   if (!ValueToNameOrSymbolId(cx_, idVal_, &id, &nameOrSymbol)) {
     cx_->clearPendingException();
     return AttachDecision::NoAction;
   }
 
   if (lhsVal_.isObject()) {
     RootedObject obj(cx_, &lhsVal_.toObject());
 
-    ObjOperandId objId = writer.guardIsObject(objValId);
+    ObjOperandId objId = writer.guardToObject(objValId);
     if (IsPropertySetOp(JSOp(*pc_))) {
       TRY_ATTACH(tryAttachMegamorphicSetElement(obj, objId, rhsValId));
     }
     if (nameOrSymbol) {
       TRY_ATTACH(tryAttachNativeSetSlot(obj, objId, id, rhsValId));
       TRY_ATTACH(tryAttachTypedObjectProperty(obj, objId, id, rhsValId));
       if (IsPropertySetOp(JSOp(*pc_))) {
         TRY_ATTACH(tryAttachSetArrayLength(obj, objId, id, rhsValId));
@@ -4324,17 +4324,17 @@ AttachDecision SetPropIRGenerator::tryAt
   }
 
   // Basic shape checks.
   if (propShape->inDictionary() || !propShape->isDataProperty() ||
       !propShape->writable()) {
     return AttachDecision::NoAction;
   }
 
-  ObjOperandId objId = writer.guardIsObject(objValId);
+  ObjOperandId objId = writer.guardToObject(objValId);
   maybeEmitIdGuard(id);
 
   // In addition to guarding for type barrier, we need this group guard (or
   // shape guard below) to ensure class is unchanged. This group guard may also
   // imply maybeInterpretedFunction() for the special-case of function
   // prototype property set.
   writer.guardGroup(objId, oldGroup);
 
@@ -4452,17 +4452,17 @@ AttachDecision InstanceOfIRGenerator::tr
   }
 
   JSObject* prototypeObject = &fun->getSlot(slot).toObject();
 
   // Abstract Objects
   ValOperandId lhs(writer.setInputOperandId(0));
   ValOperandId rhs(writer.setInputOperandId(1));
 
-  ObjOperandId rhsId = writer.guardIsObject(rhs);
+  ObjOperandId rhsId = writer.guardToObject(rhs);
   writer.guardShape(rhsId, fun->lastProperty());
 
   // Load prototypeObject into the cache -- consumed twice in the IC
   ObjOperandId protoId = writer.loadObject(prototypeObject);
   // Ensure that rhs[slot] == prototypeObject.
   writer.guardFunctionPrototype(rhsId, slot, protoId);
 
   // Needn't guard LHS is object, because the actual stub can handle that
@@ -4526,17 +4526,17 @@ AttachDecision TypeOfIRGenerator::tryAtt
   return AttachDecision::Attach;
 }
 
 AttachDecision TypeOfIRGenerator::tryAttachObject(ValOperandId valId) {
   if (!val_.isObject()) {
     return AttachDecision::NoAction;
   }
 
-  ObjOperandId objId = writer.guardIsObject(valId);
+  ObjOperandId objId = writer.guardToObject(valId);
   writer.loadTypeOfObjectResult(objId);
   writer.returnFromIC();
   trackAttached("Object");
   return AttachDecision::Attach;
 }
 
 GetIteratorIRGenerator::GetIteratorIRGenerator(JSContext* cx,
                                                HandleScript script,
@@ -4556,17 +4556,17 @@ AttachDecision GetIteratorIRGenerator::t
 
   ValOperandId valId(writer.setInputOperandId(0));
   if (!val_.isObject()) {
     return AttachDecision::NoAction;
   }
 
   RootedObject obj(cx_, &val_.toObject());
 
-  ObjOperandId objId = writer.guardIsObject(valId);
+  ObjOperandId objId = writer.guardToObject(valId);
   TRY_ATTACH(tryAttachNativeIterator(objId, obj));
 
   trackAttached(IRGenerator::NotAttached);
   return AttachDecision::NoAction;
 }
 
 AttachDecision GetIteratorIRGenerator::tryAttachNativeIterator(
     ObjOperandId objId, HandleObject obj) {
@@ -4664,23 +4664,23 @@ AttachDecision CallIRGenerator::tryAttac
   Int32OperandId argcId(writer.setInputOperandId(0));
 
   // Ensure argc == 1.
   writer.guardSpecificInt32Immediate(argcId, 1);
 
   // Guard callee is the |js::array_push| native function.
   ValOperandId calleeValId =
       writer.loadArgumentFixedSlot(ArgumentKind::Callee, argc_);
-  ObjOperandId calleeObjId = writer.guardIsObject(calleeValId);
+  ObjOperandId calleeObjId = writer.guardToObject(calleeValId);
   writer.guardSpecificNativeFunction(calleeObjId, js::array_push);
 
   // Guard this is an array object.
   ValOperandId thisValId =
       writer.loadArgumentFixedSlot(ArgumentKind::This, argc_);
-  ObjOperandId thisObjId = writer.guardIsObject(thisValId);
+  ObjOperandId thisObjId = writer.guardToObject(thisValId);
 
   // This is a soft assert, documenting the fact that we pass 'true'
   // for needsTypeBarrier when constructing typeCheckInfo_ for CallIRGenerator.
   // Can be removed safely if the assumption becomes false.
   MOZ_ASSERT(typeCheckInfo_.needsTypeBarrier());
 
   // Guard that the group and shape matches.
   if (typeCheckInfo_.needsTypeBarrier()) {
@@ -4744,30 +4744,30 @@ AttachDecision CallIRGenerator::tryAttac
   // hole check manually.
 
   // Generate code.
   Int32OperandId argcId(writer.setInputOperandId(0));
 
   // Guard callee is the |js::array_join| native function.
   ValOperandId calleeValId =
       writer.loadArgumentFixedSlot(ArgumentKind::Callee, argc_);
-  ObjOperandId calleeObjId = writer.guardIsObject(calleeValId);
+  ObjOperandId calleeObjId = writer.guardToObject(calleeValId);
   writer.guardSpecificNativeFunction(calleeObjId, js::array_join);
 
   if (argc_ == 1) {
     // If argcount is 1, guard that the argument is a string.
     ValOperandId argValId =
         writer.loadArgumentFixedSlot(ArgumentKind::Arg0, argc_);
-    writer.guardIsString(argValId);
+    writer.guardToString(argValId);
   }
 
   // Guard this is an array object.
   ValOperandId thisValId =
       writer.loadArgumentFixedSlot(ArgumentKind::This, argc_);
-  ObjOperandId thisObjId = writer.guardIsObject(thisValId);
+  ObjOperandId thisObjId = writer.guardToObject(thisValId);
   writer.guardClass(thisObjId, GuardClassKind::Array);
 
   // Do the join.
   writer.arrayJoinResult(thisObjId);
 
   writer.returnFromIC();
 
   // The result of this stub does not need to be monitored because it will
@@ -4824,23 +4824,23 @@ AttachDecision CallIRGenerator::tryAttac
   if (target->isClassConstructor()) {
     return AttachDecision::NoAction;
   }
   Int32OperandId argcId(writer.setInputOperandId(0));
 
   // Guard that callee is the |fun_call| native function.
   ValOperandId calleeValId =
       writer.loadArgumentDynamicSlot(ArgumentKind::Callee, argcId);
-  ObjOperandId calleeObjId = writer.guardIsObject(calleeValId);
+  ObjOperandId calleeObjId = writer.guardToObject(calleeValId);
   writer.guardSpecificNativeFunction(calleeObjId, fun_call);
 
   // Guard that |this| is a function.
   ValOperandId thisValId =
       writer.loadArgumentDynamicSlot(ArgumentKind::This, argcId);
-  ObjOperandId thisObjId = writer.guardIsObject(thisValId);
+  ObjOperandId thisObjId = writer.guardToObject(thisValId);
   writer.guardClass(thisObjId, GuardClassKind::JSFunction);
 
   // Guard that function is not a class constructor.
   writer.guardNotClassConstructor(thisObjId);
 
   CallFlags targetFlags(CallFlags::FunCall);
   if (isScripted) {
     writer.guardFunctionHasJitEntry(thisObjId, /*isConstructing =*/false);
@@ -4890,23 +4890,23 @@ AttachDecision CallIRGenerator::tryAttac
     return AttachDecision::NoAction;
   }
 
   Int32OperandId argcId(writer.setInputOperandId(0));
 
   // Guard that callee is the |fun_apply| native function.
   ValOperandId calleeValId =
       writer.loadArgumentDynamicSlot(ArgumentKind::Callee, argcId);
-  ObjOperandId calleeObjId = writer.guardIsObject(calleeValId);
+  ObjOperandId calleeObjId = writer.guardToObject(calleeValId);
   writer.guardSpecificNativeFunction(calleeObjId, fun_apply);
 
   // Guard that |this| is a function.
   ValOperandId thisValId =
       writer.loadArgumentDynamicSlot(ArgumentKind::This, argcId);
-  ObjOperandId thisObjId = writer.guardIsObject(thisValId);
+  ObjOperandId thisObjId = writer.guardToObject(thisValId);
   writer.guardClass(thisObjId, GuardClassKind::JSFunction);
 
   // Guard that function is not a class constructor.
   writer.guardNotClassConstructor(thisObjId);
 
   CallFlags targetFlags(format);
   writer.guardFunApply(argcId, targetFlags);
 
@@ -5080,17 +5080,17 @@ AttachDecision CallIRGenerator::tryAttac
   }
 
   // Load argc.
   Int32OperandId argcId(writer.setInputOperandId(0));
 
   // Load the callee and ensure it is an object
   ValOperandId calleeValId =
       writer.loadArgumentDynamicSlot(ArgumentKind::Callee, argcId, flags);
-  ObjOperandId calleeObjId = writer.guardIsObject(calleeValId);
+  ObjOperandId calleeObjId = writer.guardToObject(calleeValId);
 
   FieldOffset calleeOffset = 0;
   if (isSpecialized) {
     // Ensure callee matches this stub's callee
     calleeOffset = writer.guardSpecificFunction(calleeObjId, calleeFunc);
     // Guard against relazification
     writer.guardFunctionHasJitEntry(calleeObjId, isConstructing);
   } else {
@@ -5249,17 +5249,17 @@ AttachDecision CallIRGenerator::tryAttac
   }
 
   // Load argc.
   Int32OperandId argcId(writer.setInputOperandId(0));
 
   // Load the callee and ensure it is an object
   ValOperandId calleeValId =
       writer.loadArgumentDynamicSlot(ArgumentKind::Callee, argcId, flags);
-  ObjOperandId calleeObjId = writer.guardIsObject(calleeValId);
+  ObjOperandId calleeObjId = writer.guardToObject(calleeValId);
 
   FieldOffset calleeOffset = 0;
   if (isSpecialized) {
     // Ensure callee matches this stub's callee
     calleeOffset = writer.guardSpecificFunction(calleeObjId, calleeFunc);
     writer.callNativeFunction(calleeObjId, argcId, op_, calleeFunc, flags);
   } else {
     // Guard that object is a native function
@@ -5350,17 +5350,17 @@ AttachDecision CallIRGenerator::tryAttac
   }
 
   // Load argc.
   Int32OperandId argcId(writer.setInputOperandId(0));
 
   // Load the callee and ensure it is an object
   ValOperandId calleeValId =
       writer.loadArgumentDynamicSlot(ArgumentKind::Callee, argcId, flags);
-  ObjOperandId calleeObjId = writer.guardIsObject(calleeValId);
+  ObjOperandId calleeObjId = writer.guardToObject(calleeValId);
 
   // Ensure the callee's class matches the one in this stub.
   FieldOffset classOffset =
       writer.guardAnyClass(calleeObjId, calleeObj->getClass());
 
   writer.callClassHook(calleeObjId, argcId, hook, flags);
   writer.typeMonitorResult();
 
@@ -5493,52 +5493,52 @@ CompareIRGenerator::CompareIRGenerator(J
       rhsVal_(rhsVal) {}
 
 AttachDecision CompareIRGenerator::tryAttachString(ValOperandId lhsId,
                                                    ValOperandId rhsId) {
   if (!lhsVal_.isString() || !rhsVal_.isString()) {
     return AttachDecision::NoAction;
   }
 
-  StringOperandId lhsStrId = writer.guardIsString(lhsId);
-  StringOperandId rhsStrId = writer.guardIsString(rhsId);
+  StringOperandId lhsStrId = writer.guardToString(lhsId);
+  StringOperandId rhsStrId = writer.guardToString(rhsId);
   writer.compareStringResult(op_, lhsStrId, rhsStrId);
   writer.returnFromIC();
 
   trackAttached("String");
   return AttachDecision::Attach;
 }
 
 AttachDecision CompareIRGenerator::tryAttachObject(ValOperandId lhsId,
                                                    ValOperandId rhsId) {
   MOZ_ASSERT(IsEqualityOp(op_));
 
   if (!lhsVal_.isObject() || !rhsVal_.isObject()) {
     return AttachDecision::NoAction;
   }
 
-  ObjOperandId lhsObjId = writer.guardIsObject(lhsId);
-  ObjOperandId rhsObjId = writer.guardIsObject(rhsId);
+  ObjOperandId lhsObjId = writer.guardToObject(lhsId);
+  ObjOperandId rhsObjId = writer.guardToObject(rhsId);
   writer.compareObjectResult(op_, lhsObjId, rhsObjId);
   writer.returnFromIC();
 
   trackAttached("Object");
   return AttachDecision::Attach;
 }
 
 AttachDecision CompareIRGenerator::tryAttachSymbol(ValOperandId lhsId,
                                                    ValOperandId rhsId) {
   MOZ_ASSERT(IsEqualityOp(op_));
 
   if (!lhsVal_.isSymbol() || !rhsVal_.isSymbol()) {
     return AttachDecision::NoAction;
   }
 
-  SymbolOperandId lhsSymId = writer.guardIsSymbol(lhsId);
-  SymbolOperandId rhsSymId = writer.guardIsSymbol(rhsId);
+  SymbolOperandId lhsSymId = writer.guardToSymbol(lhsId);
+  SymbolOperandId rhsSymId = writer.guardToSymbol(rhsId);
   writer.compareSymbolResult(op_, lhsSymId, rhsSymId);
   writer.returnFromIC();
 
   trackAttached("Symbol");
   return AttachDecision::Attach;
 }
 
 AttachDecision CompareIRGenerator::tryAttachStrictDifferentTypes(
@@ -5571,20 +5571,20 @@ AttachDecision CompareIRGenerator::tryAt
 
 AttachDecision CompareIRGenerator::tryAttachInt32(ValOperandId lhsId,
                                                   ValOperandId rhsId) {
   if ((!lhsVal_.isInt32() && !lhsVal_.isBoolean()) ||
       (!rhsVal_.isInt32() && !rhsVal_.isBoolean())) {
     return AttachDecision::NoAction;
   }
 
-  Int32OperandId lhsIntId = lhsVal_.isBoolean() ? writer.guardIsBoolean(lhsId)
-                                                : writer.guardIsInt32(lhsId);
-  Int32OperandId rhsIntId = rhsVal_.isBoolean() ? writer.guardIsBoolean(rhsId)
-                                                : writer.guardIsInt32(rhsId);
+  Int32OperandId lhsIntId = lhsVal_.isBoolean() ? writer.guardToBoolean(lhsId)
+                                                : writer.guardToInt32(lhsId);
+  Int32OperandId rhsIntId = rhsVal_.isBoolean() ? writer.guardToBoolean(rhsId)
+                                                : writer.guardToInt32(rhsId);
 
   // Strictly different types should have been handed by
   // tryAttachStrictDifferentTypes
   MOZ_ASSERT_IF(op_ == JSOP_STRICTEQ || op_ == JSOP_STRICTNE,
                 lhsVal_.isInt32() == rhsVal_.isInt32());
 
   writer.compareInt32Result(op_, lhsIntId, rhsIntId);
   writer.returnFromIC();
@@ -5617,17 +5617,17 @@ AttachDecision CompareIRGenerator::tryAt
   if (op_ != JSOP_EQ && op_ != JSOP_NE) {
     return AttachDecision::NoAction;
   }
 
   ValOperandId obj = rhsVal_.isObject() ? rhsId : lhsId;
   ValOperandId undefOrNull = rhsVal_.isObject() ? lhsId : rhsId;
 
   writer.guardIsNullOrUndefined(undefOrNull);
-  ObjOperandId objOperand = writer.guardIsObject(obj);
+  ObjOperandId objOperand = writer.guardToObject(obj);
   writer.compareObjectUndefinedNullResult(op_, objOperand);
   writer.returnFromIC();
 
   trackAttached("ObjectUndefined");
   return AttachDecision::Attach;
 }
 
 // Handle NumberUndefined comparisons
@@ -5671,26 +5671,26 @@ AttachDecision CompareIRGenerator::tryAt
 
   auto guardPrimitive = [&](HandleValue v, ValOperandId id) {
     if (v.isNumber()) {
       writer.guardIsNumber(id);
       return;
     }
     switch (v.extractNonDoubleType()) {
       case JSVAL_TYPE_BOOLEAN:
-        writer.guardIsBoolean(id);
+        writer.guardToBoolean(id);
         return;
       case JSVAL_TYPE_SYMBOL:
-        writer.guardIsSymbol(id);
+        writer.guardToSymbol(id);
         return;
       case JSVAL_TYPE_BIGINT:
-        writer.guardIsBigInt(id);
+        writer.guardToBigInt(id);
         return;
       case JSVAL_TYPE_STRING:
-        writer.guardIsString(id);
+        writer.guardToString(id);
         return;
       default:
         MOZ_CRASH("unexpected type");
         return;
     }
   };
 
   isPrimitive(lhsVal_) ? guardPrimitive(lhsVal_, lhsId)
@@ -5745,17 +5745,17 @@ AttachDecision CompareIRGenerator::tryAt
     return AttachDecision::NoAction;
   }
 
   // Case should have been handled by tryAttachStrictlDifferentTypes
   MOZ_ASSERT(op_ != JSOP_STRICTEQ && op_ != JSOP_STRICTNE);
 
   auto createGuards = [&](HandleValue v, ValOperandId vId) {
     if (v.isString()) {
-      StringOperandId strId = writer.guardIsString(vId);
+      StringOperandId strId = writer.guardToString(vId);
       return writer.guardAndGetNumberFromString(strId);
     }
     MOZ_ASSERT(v.isNumber());
     writer.guardIsNumber(vId);
     return vId;
   };
 
   ValOperandId lhsGuardedId = createGuards(lhsVal_, lhsId);
@@ -5901,17 +5901,17 @@ AttachDecision ToBoolIRGenerator::tryAtt
 }
 
 AttachDecision ToBoolIRGenerator::tryAttachString() {
   if (!val_.isString()) {
     return AttachDecision::NoAction;
   }
 
   ValOperandId valId(writer.setInputOperandId(0));
-  StringOperandId strId = writer.guardIsString(valId);
+  StringOperandId strId = writer.guardToString(valId);
   writer.loadStringTruthyResult(strId);
   writer.returnFromIC();
   trackAttached("ToBoolString");
   return AttachDecision::Attach;
 }
 
 AttachDecision ToBoolIRGenerator::tryAttachNullOrUndefined() {
   if (!val_.isNullOrUndefined()) {
@@ -5927,17 +5927,17 @@ AttachDecision ToBoolIRGenerator::tryAtt
 }
 
 AttachDecision ToBoolIRGenerator::tryAttachObject() {
   if (!val_.isObject()) {
     return AttachDecision::NoAction;
   }
 
   ValOperandId valId(writer.setInputOperandId(0));
-  ObjOperandId objId = writer.guardIsObject(valId);
+  ObjOperandId objId = writer.guardToObject(valId);
   writer.loadObjectTruthyResult(objId);
   writer.returnFromIC();
   trackAttached("ToBoolObject");
   return AttachDecision::Attach;
 }
 
 GetIntrinsicIRGenerator::GetIntrinsicIRGenerator(JSContext* cx,
                                                  HandleScript script,
@@ -5991,17 +5991,17 @@ AttachDecision UnaryArithIRGenerator::tr
 
 AttachDecision UnaryArithIRGenerator::tryAttachInt32() {
   if (!val_.isInt32() || !res_.isInt32()) {
     return AttachDecision::NoAction;
   }
 
   ValOperandId valId(writer.setInputOperandId(0));
 
-  Int32OperandId intId = writer.guardIsInt32(valId);
+  Int32OperandId intId = writer.guardToInt32(valId);
   switch (op_) {
     case JSOP_BITNOT:
       writer.int32NotResult(intId);
       trackAttached("UnaryArith.Int32Not");
       break;
     case JSOP_NEG:
       writer.int32NegationResult(intId);
       trackAttached("UnaryArith.Int32Neg");
@@ -6120,20 +6120,20 @@ AttachDecision BinaryArithIRGenerator::t
   MOZ_ASSERT_IF(op_ != JSOP_URSH, res_.isInt32());
 
   ValOperandId lhsId(writer.setInputOperandId(0));
   ValOperandId rhsId(writer.setInputOperandId(1));
 
   // Convert type into int32 for the bitwise/shift operands.
   auto guardToInt32 = [&](ValOperandId id, HandleValue val) {
     if (val.isInt32()) {
-      return writer.guardIsInt32(id);
+      return writer.guardToInt32(id);
     }
     if (val.isBoolean()) {
-      return writer.guardIsBoolean(id);
+      return writer.guardToBoolean(id);
     }
     MOZ_ASSERT(val.isDouble());
     writer.guardType(id, ValueType::Double);
     return writer.truncateDoubleToUInt32(id);
   };
 
   Int32OperandId lhsIntId = guardToInt32(lhsId, lhs_);
   Int32OperandId rhsIntId = guardToInt32(rhsId, rhs_);
@@ -6235,20 +6235,20 @@ AttachDecision BinaryArithIRGenerator::t
     return AttachDecision::NoAction;
   }
 
   ValOperandId lhsId(writer.setInputOperandId(0));
   ValOperandId rhsId(writer.setInputOperandId(1));
 
   auto guardToInt32 = [&](ValOperandId id, HandleValue v) {
     if (v.isInt32()) {
-      return writer.guardIsInt32(id);
+      return writer.guardToInt32(id);
     }
     MOZ_ASSERT(v.isBoolean());
-    return writer.guardIsBoolean(id);
+    return writer.guardToBoolean(id);
   };
 
   Int32OperandId lhsIntId = guardToInt32(lhsId, lhs_);
   Int32OperandId rhsIntId = guardToInt32(rhsId, rhs_);
 
   switch (op_) {
     case JSOP_ADD:
       writer.int32AddResult(lhsIntId, rhsIntId);
@@ -6289,20 +6289,20 @@ AttachDecision BinaryArithIRGenerator::t
     return AttachDecision::NoAction;
   }
 
   ValOperandId lhsId(writer.setInputOperandId(0));
   ValOperandId rhsId(writer.setInputOperandId(1));
 
   auto guardToString = [&](ValOperandId id, HandleValue v) {
     if (v.isString()) {
-      return writer.guardIsString(id);
+      return writer.guardToString(id);
     }
     if (v.isInt32()) {
-      Int32OperandId intId = writer.guardIsInt32(id);
+      Int32OperandId intId = writer.guardToInt32(id);
       return writer.callInt32ToString(intId);
     }
     // At this point we are creating an IC that will handle
     // both Int32 and Double cases.
     MOZ_ASSERT(v.isNumber());
     writer.guardIsNumber(id);
     return writer.callNumberToString(id);
   };
@@ -6328,20 +6328,20 @@ AttachDecision BinaryArithIRGenerator::t
     return AttachDecision::NoAction;
   }
 
   ValOperandId lhsId(writer.setInputOperandId(0));
   ValOperandId rhsId(writer.setInputOperandId(1));
 
   auto guardToString = [&](ValOperandId id, HandleValue v) {
     if (v.isString()) {
-      return writer.guardIsString(id);
+      return writer.guardToString(id);
     }
     MOZ_ASSERT(v.isBoolean());
-    Int32OperandId intId = writer.guardIsBoolean(id);
+    Int32OperandId intId = writer.guardToBoolean(id);
     return writer.booleanToString(intId);
   };
 
   StringOperandId lhsStrId = guardToString(lhsId, lhs_);
   StringOperandId rhsStrId = guardToString(rhsId, rhs_);
 
   writer.callStringConcatResult(lhsStrId, rhsStrId);
 
@@ -6359,18 +6359,18 @@ AttachDecision BinaryArithIRGenerator::t
   // Check guards
   if (!lhs_.isString() || !rhs_.isString()) {
     return AttachDecision::NoAction;
   }
 
   ValOperandId lhsId(writer.setInputOperandId(0));
   ValOperandId rhsId(writer.setInputOperandId(1));
 
-  StringOperandId lhsStrId = writer.guardIsString(lhsId);
-  StringOperandId rhsStrId = writer.guardIsString(rhsId);
+  StringOperandId lhsStrId = writer.guardToString(lhsId);
+  StringOperandId rhsStrId = writer.guardToString(rhsId);
 
   writer.callStringConcatResult(lhsStrId, rhsStrId);
 
   writer.returnFromIC();
   trackAttached("BinaryArith.StringConcat");
   return AttachDecision::Attach;
 }
 
@@ -6387,21 +6387,21 @@ AttachDecision BinaryArithIRGenerator::t
 
   ValOperandId lhsId(writer.setInputOperandId(0));
   ValOperandId rhsId(writer.setInputOperandId(1));
 
   // This guard is actually overly tight, as the runtime
   // helper can handle lhs or rhs being a string, so long
   // as the other is an object.
   if (lhs_.isString()) {
-    writer.guardIsString(lhsId);
-    writer.guardIsObject(rhsId);
+    writer.guardToString(lhsId);
+    writer.guardToObject(rhsId);
   } else {
-    writer.guardIsObject(lhsId);
-    writer.guardIsString(rhsId);
+    writer.guardToObject(lhsId);
+    writer.guardToString(rhsId);
   }
 
   writer.callStringObjectConcatResult(lhsId, rhsId);
 
   writer.returnFromIC();
   trackAttached("BinaryArith.StringObjectConcat");
   return AttachDecision::Attach;
 }
--- a/js/src/jit/CacheIR.h
+++ b/js/src/jit/CacheIR.h
@@ -193,29 +193,29 @@ extern const uint32_t ArgLengths[];
 
 #ifdef JS_SIMULATOR
 #  define IF_SIMULATOR(x, y) x
 #else
 #  define IF_SIMULATOR(x, y) y
 #endif
 
 #define CACHE_IR_OPS(_) /****************************************************/ \
-  _(GuardIsObject, Id)                                                         \
+  _(GuardToObject, Id)                                                         \
   _(GuardIsObjectOrNull, Id)                                                   \
   _(GuardIsNullOrUndefined, Id)                                                \
   _(GuardIsNotNullOrUndefined, Id)                                             \
   _(GuardIsNull, Id)                                                           \
   _(GuardIsUndefined, Id)                                                      \
-  _(GuardIsBoolean, Id, Id)                                                    \
-  _(GuardIsString, Id)                                                         \
-  _(GuardIsSymbol, Id)                                                         \
-  _(GuardIsBigInt, Id)                                                         \
+  _(GuardToBoolean, Id, Id)                                                    \
+  _(GuardToString, Id)                                                         \
+  _(GuardToSymbol, Id)                                                         \
+  _(GuardToBigInt, Id)                                                         \
   _(GuardIsNumber, Id)                                                         \
-  _(GuardIsInt32, Id, Id)                                                      \
-  _(GuardIsInt32Index, Id, Id)                                                 \
+  _(GuardToInt32, Id, Id)                                                      \
+  _(GuardToInt32Index, Id, Id)                                                 \
   _(GuardType, Id, Byte)                                                       \
   _(GuardShape, Id, Field)                                                     \
   _(GuardGroup, Id, Field)                                                     \
   _(GuardProto, Id, Field)                                                     \
   _(GuardClass, Id, Byte)     /* Guard per GuardClassKind */                   \
   _(GuardAnyClass, Id, Field) /* Guard an arbitrary class */                   \
   _(GuardCompartment, Id, Field, Field)                                        \
   _(GuardIsExtensible, Id)                                                     \
@@ -797,53 +797,53 @@ class MOZ_RAII CacheIRWriter : public JS
     MOZ_ASSERT(!failed());
     return buffer_.length();
   }
 
   // This should not be used when compiling Baseline code, as Baseline code
   // shouldn't bake in stub values.
   StubField readStubFieldForIon(uint32_t offset, StubField::Type type) const;
 
-  ObjOperandId guardIsObject(ValOperandId val) {
-    writeOpWithOperandId(CacheOp::GuardIsObject, val);
+  ObjOperandId guardToObject(ValOperandId val) {
+    writeOpWithOperandId(CacheOp::GuardToObject, val);
     return ObjOperandId(val.id());
   }
 
-  Int32OperandId guardIsBoolean(ValOperandId val) {
+  Int32OperandId guardToBoolean(ValOperandId val) {
     Int32OperandId res(nextOperandId_++);
-    writeOpWithOperandId(CacheOp::GuardIsBoolean, val);
+    writeOpWithOperandId(CacheOp::GuardToBoolean, val);
     writeOperandId(res);
     return res;
   }
 
-  StringOperandId guardIsString(ValOperandId val) {
-    writeOpWithOperandId(CacheOp::GuardIsString, val);
+  StringOperandId guardToString(ValOperandId val) {
+    writeOpWithOperandId(CacheOp::GuardToString, val);
     return StringOperandId(val.id());
   }
 
-  SymbolOperandId guardIsSymbol(ValOperandId val) {
-    writeOpWithOperandId(CacheOp::GuardIsSymbol, val);
+  SymbolOperandId guardToSymbol(ValOperandId val) {
+    writeOpWithOperandId(CacheOp::GuardToSymbol, val);
     return SymbolOperandId(val.id());
   }
 
-  BigIntOperandId guardIsBigInt(ValOperandId val) {
-    writeOpWithOperandId(CacheOp::GuardIsBigInt, val);
+  BigIntOperandId guardToBigInt(ValOperandId val) {
+    writeOpWithOperandId(CacheOp::GuardToBigInt, val);
     return BigIntOperandId(val.id());
   }
 
-  Int32OperandId guardIsInt32(ValOperandId val) {
+  Int32OperandId guardToInt32(ValOperandId val) {
     Int32OperandId res(nextOperandId_++);
-    writeOpWithOperandId(CacheOp::GuardIsInt32, val);
+    writeOpWithOperandId(CacheOp::GuardToInt32, val);
     writeOperandId(res);
     return res;
   }
 
-  Int32OperandId guardIsInt32Index(ValOperandId val) {
+  Int32OperandId guardToInt32Index(ValOperandId val) {
     Int32OperandId res(nextOperandId_++);
-    writeOpWithOperandId(CacheOp::GuardIsInt32Index, val);
+    writeOpWithOperandId(CacheOp::GuardToInt32Index, val);
     writeOperandId(res);
     return res;
   }
 
   void guardIsNumber(ValOperandId val) {
     writeOpWithOperandId(CacheOp::GuardIsNumber, val);
   }
 
--- a/js/src/jit/CacheIRCompiler.cpp
+++ b/js/src/jit/CacheIRCompiler.cpp
@@ -1313,17 +1313,17 @@ bool CacheIRCompiler::emitGuardIsNumber(
   if (!addFailurePath(&failure)) {
     return false;
   }
 
   masm.branchTestNumber(Assembler::NotEqual, input, failure->label());
   return true;
 }
 
-bool CacheIRCompiler::emitGuardIsObject() {
+bool CacheIRCompiler::emitGuardToObject() {
   JitSpew(JitSpew_Codegen, __FUNCTION__);
   ValOperandId inputId = reader.valOperandId();
   if (allocator.knownType(inputId) == JSVAL_TYPE_OBJECT) {
     return true;
   }
 
   ValueOperand input = allocator.useValueRegister(masm, inputId);
   FailurePath* failure;
@@ -1429,17 +1429,17 @@ bool CacheIRCompiler::emitGuardIsObjectO
 
   Label done;
   masm.branchTestObject(Assembler::Equal, input, &done);
   masm.branchTestNull(Assembler::NotEqual, input, failure->label());
   masm.bind(&done);
   return true;
 }
 
-bool CacheIRCompiler::emitGuardIsBoolean() {
+bool CacheIRCompiler::emitGuardToBoolean() {
   JitSpew(JitSpew_Codegen, __FUNCTION__);
   ValOperandId inputId = reader.valOperandId();
   Register output = allocator.defineRegister(masm, reader.int32OperandId());
 
   if (allocator.knownType(inputId) == JSVAL_TYPE_BOOLEAN) {
     Register input = allocator.useRegister(masm, Int32OperandId(inputId.id()));
     masm.move32(input, output);
     return true;
@@ -1451,65 +1451,65 @@ bool CacheIRCompiler::emitGuardIsBoolean
     return false;
   }
 
   masm.branchTestBoolean(Assembler::NotEqual, input, failure->label());
   masm.unboxBoolean(input, output);
   return true;
 }
 
-bool CacheIRCompiler::emitGuardIsString() {
+bool CacheIRCompiler::emitGuardToString() {
   JitSpew(JitSpew_Codegen, __FUNCTION__);
   ValOperandId inputId = reader.valOperandId();
   if (allocator.knownType(inputId) == JSVAL_TYPE_STRING) {
     return true;
   }
 
   ValueOperand input = allocator.useValueRegister(masm, inputId);
   FailurePath* failure;
   if (!addFailurePath(&failure)) {
     return false;
   }
   masm.branchTestString(Assembler::NotEqual, input, failure->label());
   return true;
 }
 
-bool CacheIRCompiler::emitGuardIsSymbol() {
+bool CacheIRCompiler::emitGuardToSymbol() {
   JitSpew(JitSpew_Codegen, __FUNCTION__);
   ValOperandId inputId = reader.valOperandId();
   if (allocator.knownType(inputId) == JSVAL_TYPE_SYMBOL) {
     return true;
   }
 
   ValueOperand input = allocator.useValueRegister(masm, inputId);
   FailurePath* failure;
   if (!addFailurePath(&failure)) {
     return false;
   }
   masm.branchTestSymbol(Assembler::NotEqual, input, failure->label());
   return true;
 }
 
-bool CacheIRCompiler::emitGuardIsBigInt() {
+bool CacheIRCompiler::emitGuardToBigInt() {
   JitSpew(JitSpew_Codegen, __FUNCTION__);
   ValOperandId inputId = reader.valOperandId();
   if (allocator.knownType(inputId) == JSVAL_TYPE_BIGINT) {
     return true;
   }
 
   ValueOperand input = allocator.useValueRegister(masm, inputId);
   FailurePath* failure;
   if (!addFailurePath(&failure)) {
     return false;
   }
   masm.branchTestBigInt(Assembler::NotEqual, input, failure->label());
   return true;
 }
 
-bool CacheIRCompiler::emitGuardIsInt32() {
+bool CacheIRCompiler::emitGuardToInt32() {
   JitSpew(JitSpew_Codegen, __FUNCTION__);
   ValOperandId inputId = reader.valOperandId();
   Register output = allocator.defineRegister(masm, reader.int32OperandId());
 
   if (allocator.knownType(inputId) == JSVAL_TYPE_INT32) {
     Register input = allocator.useRegister(masm, Int32OperandId(inputId.id()));
     masm.move32(input, output);
     return true;
@@ -1521,17 +1521,17 @@ bool CacheIRCompiler::emitGuardIsInt32()
     return false;
   }
 
   masm.branchTestInt32(Assembler::NotEqual, input, failure->label());
   masm.unboxInt32(input, output);
   return true;
 }
 
-bool CacheIRCompiler::emitGuardIsInt32Index() {
+bool CacheIRCompiler::emitGuardToInt32Index() {
   JitSpew(JitSpew_Codegen, __FUNCTION__);
   ValOperandId inputId = reader.valOperandId();
   Register output = allocator.defineRegister(masm, reader.int32OperandId());
 
   if (allocator.knownType(inputId) == JSVAL_TYPE_INT32) {
     Register input = allocator.useRegister(masm, Int32OperandId(inputId.id()));
     masm.move32(input, output);
     return true;
--- a/js/src/jit/CacheIRCompiler.h
+++ b/js/src/jit/CacheIRCompiler.h
@@ -15,29 +15,29 @@ namespace js {
 namespace jit {
 
 class BaselineCacheIRCompiler;
 class IonCacheIRCompiler;
 
 // The ops below are defined in CacheIRCompiler and codegen is shared between
 // BaselineCacheIRCompiler and IonCacheIRCompiler.
 #define CACHE_IR_SHARED_OPS(_)            \
-  _(GuardIsObject)                        \
+  _(GuardToObject)                        \
   _(GuardIsNullOrUndefined)               \
   _(GuardIsNotNullOrUndefined)            \
   _(GuardIsNull)                          \
   _(GuardIsUndefined)                     \
   _(GuardIsObjectOrNull)                  \
-  _(GuardIsBoolean)                       \
-  _(GuardIsString)                        \
-  _(GuardIsSymbol)                        \
-  _(GuardIsBigInt)                        \
+  _(GuardToBoolean)                       \
+  _(GuardToString)                        \
+  _(GuardToSymbol)                        \
+  _(GuardToBigInt)                        \
   _(GuardIsNumber)                        \
-  _(GuardIsInt32)                         \
-  _(GuardIsInt32Index)                    \
+  _(GuardToInt32)                         \
+  _(GuardToInt32Index)                    \
   _(GuardType)                            \
   _(GuardClass)                           \
   _(GuardGroupHasUnanalyzedNewScript)     \
   _(GuardIsExtensible)                    \
   _(GuardFunctionIsNative)                \
   _(GuardFunctionIsConstructor)           \
   _(GuardSpecificNativeFunction)          \
   _(GuardFunctionPrototype)               \