Bug 1603406 - Part 3: Unused GlobalObject functions. r=mgaudet
authorAndré Bargull <andre.bargull@gmail.com>
Thu, 12 Dec 2019 16:38:27 +0000
changeset 506871 d9e6ebe442ae15e0f5d14d46f7c5745a942f0416
parent 506870 79a20068a9da55448130337b19dfbe2e1bb024a6
child 506872 74f7f81c0a0a537de4c73d63e210c5eb6b15c380
push id36913
push useropoprus@mozilla.com
push dateFri, 13 Dec 2019 16:53:24 +0000
treeherdermozilla-central@1ed684598bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmgaudet
bugs1603406
milestone73.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 1603406 - Part 3: Unused GlobalObject functions. r=mgaudet Depends on D56891 Differential Revision: https://phabricator.services.mozilla.com/D56892
js/src/vm/GlobalObject.cpp
js/src/vm/GlobalObject.h
--- a/js/src/vm/GlobalObject.cpp
+++ b/js/src/vm/GlobalObject.cpp
@@ -850,20 +850,16 @@ NativeObject* GlobalObject::getOrCreateF
   forOfPIC = ForOfPIC::createForOfPICObject(cx, global);
   if (!forOfPIC) {
     return nullptr;
   }
   global->setReservedSlot(FOR_OF_PIC_CHAIN, ObjectValue(*forOfPIC));
   return forOfPIC;
 }
 
-bool GlobalObject::hasRegExpStatics() const {
-  return !getSlot(REGEXP_STATICS).isUndefined();
-}
-
 /* static */
 RegExpStatics* GlobalObject::getRegExpStatics(JSContext* cx,
                                               Handle<GlobalObject*> global) {
   MOZ_ASSERT(cx);
   RegExpStaticsObject* resObj = nullptr;
   const Value& val = global->getSlot(REGEXP_STATICS);
   if (!val.isObject()) {
     MOZ_ASSERT(val.isUndefined());
@@ -874,23 +870,16 @@ RegExpStatics* GlobalObject::getRegExpSt
 
     global->initSlot(REGEXP_STATICS, ObjectValue(*resObj));
   } else {
     resObj = &val.toObject().as<RegExpStaticsObject>();
   }
   return static_cast<RegExpStatics*>(resObj->getPrivate(/* nfixed = */ 1));
 }
 
-RegExpStatics* GlobalObject::getAlreadyCreatedRegExpStatics() const {
-  const Value& val = this->getSlot(REGEXP_STATICS);
-  MOZ_ASSERT(val.isObject());
-  return static_cast<RegExpStatics*>(
-      val.toObject().as<RegExpStaticsObject>().getPrivate(/* nfixed = */ 1));
-}
-
 /* static */
 NativeObject* GlobalObject::getIntrinsicsHolder(JSContext* cx,
                                                 Handle<GlobalObject*> global) {
   Value slot = global->getReservedSlot(INTRINSICS);
   MOZ_ASSERT(slot.isUndefined() || slot.isObject());
 
   if (slot.isObject()) {
     return &slot.toObject().as<NativeObject>();
--- a/js/src/vm/GlobalObject.h
+++ b/js/src/vm/GlobalObject.h
@@ -795,20 +795,18 @@ class GlobalObject : public NativeObject
                                        HandlePropertyName name,
                                        HandleValue value);
 
   static bool getSelfHostedFunction(JSContext* cx, Handle<GlobalObject*> global,
                                     HandlePropertyName selfHostedName,
                                     HandleAtom name, unsigned nargs,
                                     MutableHandleValue funVal);
 
-  bool hasRegExpStatics() const;
   static RegExpStatics* getRegExpStatics(JSContext* cx,
                                          Handle<GlobalObject*> global);
-  RegExpStatics* getAlreadyCreatedRegExpStatics() const;
 
   static JSObject* getOrCreateThrowTypeError(JSContext* cx,
                                              Handle<GlobalObject*> global);
 
   static bool isRuntimeCodeGenEnabled(JSContext* cx, HandleValue code,
                                       Handle<GlobalObject*> global);
 
   static bool getOrCreateEval(JSContext* cx, Handle<GlobalObject*> global,