Bug 1599416 - Part 3: Remove unused ObjectIsOpaqueTypedObject function. r=mgaudet
authorAndré Bargull <andre.bargull@gmail.com>
Wed, 27 Nov 2019 13:54:15 +0000
changeset 504053 ca3152f19e29658490445939940c4cd288e1620f
parent 504052 ade7361b947cc69d2b4f530082b851aa8fbb99f3
child 504054 10f7acca7244341a84f8f307bc7f0317fc7810d0
push id101711
push useraciure@mozilla.com
push dateWed, 27 Nov 2019 14:49:56 +0000
treeherderautoland@7a5a3cbc9b5b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmgaudet
bugs1599416
milestone72.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 1599416 - Part 3: Remove unused ObjectIsOpaqueTypedObject function. r=mgaudet Differential Revision: https://phabricator.services.mozilla.com/D54707
js/src/builtin/TypedObject.cpp
js/src/builtin/TypedObject.h
js/src/jit/InlinableNatives.h
js/src/jit/MCallOptimize.cpp
js/src/vm/SelfHosting.cpp
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -2450,25 +2450,16 @@ bool js::ObjectIsTypeDescr(JSContext*, u
 bool js::ObjectIsTypedObject(JSContext*, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
   MOZ_ASSERT(args.length() == 1);
   MOZ_ASSERT(args[0].isObject());
   args.rval().setBoolean(args[0].toObject().is<TypedObject>());
   return true;
 }
 
-bool js::ObjectIsOpaqueTypedObject(JSContext*, unsigned argc, Value* vp) {
-  CallArgs args = CallArgsFromVp(argc, vp);
-  MOZ_ASSERT(args.length() == 1);
-  JSObject& obj = args[0].toObject();
-  args.rval().setBoolean(obj.is<TypedObject>() &&
-                         obj.as<TypedObject>().opaque());
-  return true;
-}
-
 bool js::ObjectIsTransparentTypedObject(JSContext*, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
   MOZ_ASSERT(args.length() == 1);
   JSObject& obj = args[0].toObject();
   args.rval().setBoolean(obj.is<TypedObject>() &&
                          !obj.as<TypedObject>().opaque());
   return true;
 }
--- a/js/src/builtin/TypedObject.h
+++ b/js/src/builtin/TypedObject.h
@@ -814,24 +814,16 @@ MOZ_MUST_USE bool ObjectIsTypeDescr(JSCo
 /*
  * Usage: ObjectIsTypedObject(obj)
  *
  * True if `obj` is a transparent or opaque typed object.
  */
 MOZ_MUST_USE bool ObjectIsTypedObject(JSContext* cx, unsigned argc, Value* vp);
 
 /*
- * Usage: ObjectIsOpaqueTypedObject(obj)
- *
- * True if `obj` is an opaque typed object.
- */
-MOZ_MUST_USE bool ObjectIsOpaqueTypedObject(JSContext* cx, unsigned argc,
-                                            Value* vp);
-
-/*
  * Usage: ObjectIsTransparentTypedObject(obj)
  *
  * True if `obj` is a transparent typed object.
  */
 MOZ_MUST_USE bool ObjectIsTransparentTypedObject(JSContext* cx, unsigned argc,
                                                  Value* vp);
 
 // Predicates on type descriptor objects.  In all cases, 'obj' must be a type
--- a/js/src/jit/InlinableNatives.h
+++ b/js/src/jit/InlinableNatives.h
@@ -152,17 +152,16 @@
   _(IntrinsicIsPossiblyWrappedTypedArray)          \
   _(IntrinsicTypedArrayLength)                     \
   _(IntrinsicPossiblyWrappedTypedArrayLength)      \
   _(IntrinsicTypedArrayByteOffset)                 \
   _(IntrinsicTypedArrayElementShift)               \
                                                    \
   _(IntrinsicObjectIsTypedObject)                  \
   _(IntrinsicObjectIsTransparentTypedObject)       \
-  _(IntrinsicObjectIsOpaqueTypedObject)            \
   _(IntrinsicObjectIsTypeDescr)                    \
   _(IntrinsicTypeDescrIsSimpleType)                \
   _(IntrinsicTypeDescrIsArrayType)
 
 struct JSJitInfo;
 
 namespace js {
 namespace jit {
--- a/js/src/jit/MCallOptimize.cpp
+++ b/js/src/jit/MCallOptimize.cpp
@@ -163,17 +163,16 @@ static bool CanInlineCrossRealm(Inlinabl
     case InlinableNative::IntrinsicIsTypedArray:
     case InlinableNative::IntrinsicIsPossiblyWrappedTypedArray:
     case InlinableNative::IntrinsicPossiblyWrappedTypedArrayLength:
     case InlinableNative::IntrinsicTypedArrayLength:
     case InlinableNative::IntrinsicTypedArrayByteOffset:
     case InlinableNative::IntrinsicTypedArrayElementShift:
     case InlinableNative::IntrinsicObjectIsTypedObject:
     case InlinableNative::IntrinsicObjectIsTransparentTypedObject:
-    case InlinableNative::IntrinsicObjectIsOpaqueTypedObject:
     case InlinableNative::IntrinsicObjectIsTypeDescr:
     case InlinableNative::IntrinsicTypeDescrIsSimpleType:
     case InlinableNative::IntrinsicTypeDescrIsArrayType:
     case InlinableNative::IntrinsicArrayIteratorPrototypeOptimizable:
       MOZ_CRASH("Unexpected cross-realm intrinsic call");
 
     case InlinableNative::TestBailout:
     case InlinableNative::TestAssertFloat32:
@@ -573,19 +572,16 @@ IonBuilder::InliningResult IonBuilder::i
     case InlinableNative::IntrinsicObjectIsTypedObject:
       return inlineHasClass(callInfo, &OutlineTransparentTypedObject::class_,
                             &OutlineOpaqueTypedObject::class_,
                             &InlineTransparentTypedObject::class_,
                             &InlineOpaqueTypedObject::class_);
     case InlinableNative::IntrinsicObjectIsTransparentTypedObject:
       return inlineHasClass(callInfo, &OutlineTransparentTypedObject::class_,
                             &InlineTransparentTypedObject::class_);
-    case InlinableNative::IntrinsicObjectIsOpaqueTypedObject:
-      return inlineHasClass(callInfo, &OutlineOpaqueTypedObject::class_,
-                            &InlineOpaqueTypedObject::class_);
     case InlinableNative::IntrinsicObjectIsTypeDescr:
       return inlineObjectIsTypeDescr(callInfo);
     case InlinableNative::IntrinsicTypeDescrIsSimpleType:
       return inlineHasClass(callInfo, &ScalarTypeDescr::class_,
                             &ReferenceTypeDescr::class_);
     case InlinableNative::IntrinsicTypeDescrIsArrayType:
       return inlineHasClass(callInfo, &ArrayTypeDescr::class_);
     case InlinableNative::Limit:
--- a/js/src/vm/SelfHosting.cpp
+++ b/js/src/vm/SelfHosting.cpp
@@ -2382,18 +2382,16 @@ static const JSFunctionSpec intrinsic_fu
     JS_FN("TypedObjectTypeDescr", js::TypedObjectTypeDescr, 1, 0),
     JS_FN("ClampToUint8", js::ClampToUint8, 1, 0),
     JS_FN("GetTypedObjectModule", js::GetTypedObjectModule, 0, 0),
 
     JS_INLINABLE_FN("ObjectIsTypeDescr", js::ObjectIsTypeDescr, 1, 0,
                     IntrinsicObjectIsTypeDescr),
     JS_INLINABLE_FN("ObjectIsTypedObject", js::ObjectIsTypedObject, 1, 0,
                     IntrinsicObjectIsTypedObject),
-    JS_INLINABLE_FN("ObjectIsOpaqueTypedObject", js::ObjectIsOpaqueTypedObject,
-                    1, 0, IntrinsicObjectIsOpaqueTypedObject),
     JS_INLINABLE_FN("ObjectIsTransparentTypedObject",
                     js::ObjectIsTransparentTypedObject, 1, 0,
                     IntrinsicObjectIsTransparentTypedObject),
     JS_INLINABLE_FN("TypeDescrIsArrayType", js::TypeDescrIsArrayType, 1, 0,
                     IntrinsicTypeDescrIsArrayType),
     JS_INLINABLE_FN("TypeDescrIsSimpleType", js::TypeDescrIsSimpleType, 1, 0,
                     IntrinsicTypeDescrIsSimpleType),
     JS_FN("IsBoxedWasmAnyRef", js::IsBoxedWasmAnyRef, 1, 0),