Bug 1603406 - Part 10: Unused Shape functions. r=mgaudet
authorAndré Bargull <andre.bargull@gmail.com>
Thu, 12 Dec 2019 16:43:13 +0000
changeset 506878 f9b19065b5a7b325ad3389b9734d498ccdf23697
parent 506877 bd9d0faeab8263790ab8073ada9d32c4f50925b0
child 506879 4d34599c5b9973980ff9128c8b65045414314bb0
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 10: Unused Shape functions. r=mgaudet Depends on D56898 Differential Revision: https://phabricator.services.mozilla.com/D56899
js/src/vm/Shape.h
--- a/js/src/vm/Shape.h
+++ b/js/src/vm/Shape.h
@@ -1435,20 +1435,16 @@ class Shape : public gc::TenuredCell {
   }
   static inline uint32_t fixedSlotsMask() { return FIXED_SLOTS_MASK; }
 #endif
 
  private:
   void fixupDictionaryShapeAfterMovingGC();
   void fixupShapeTreeAfterMovingGC();
 
-  static Shape* fromParentFieldPointer(uintptr_t p) {
-    return reinterpret_cast<Shape*>(p - offsetof(Shape, parent));
-  }
-
   static void staticAsserts() {
     JS_STATIC_ASSERT(offsetof(Shape, base_) ==
                      offsetof(js::shadow::Shape, base));
     JS_STATIC_ASSERT(offsetof(Shape, immutableFlags) ==
                      offsetof(js::shadow::Shape, immutableFlags));
     JS_STATIC_ASSERT(FIXED_SLOTS_SHIFT == js::shadow::Shape::FIXED_SLOTS_SHIFT);
     JS_STATIC_ASSERT(FIXED_SLOTS_MASK == js::shadow::Shape::FIXED_SLOTS_MASK);
   }
@@ -1564,24 +1560,16 @@ struct InitialShapeEntry {
     const JSClass* clasp;
     TaggedProto proto;
     uint32_t nfixed;
     uint32_t baseFlags;
 
     Lookup(const JSClass* clasp, const TaggedProto& proto, uint32_t nfixed,
            uint32_t baseFlags)
         : clasp(clasp), proto(proto), nfixed(nfixed), baseFlags(baseFlags) {}
-
-    explicit Lookup(const InitialShapeEntry& entry)
-        : proto(entry.proto.unbarrieredGet()) {
-      const Shape* shape = entry.shape.unbarrieredGet();
-      clasp = shape->getObjectClass();
-      nfixed = shape->numFixedSlots();
-      baseFlags = shape->getObjectFlags();
-    }
   };
 
   inline InitialShapeEntry();
   inline InitialShapeEntry(Shape* shape, const TaggedProto& proto);
 
   static HashNumber hash(const Lookup& lookup) {
     HashNumber hash = MovableCellHasher<TaggedProto>::hash(lookup.proto);
     return mozilla::AddToHash(