Bug 1505574 - Remove UnboxedObjects ObjectGroup addendum r=iain
authorMatthew Gaudet <mgaudet@mozilla.com>
Fri, 22 Mar 2019 15:33:37 +0000
changeset 465721 164b081061064e897fb705b209fbe8c0187bfc53
parent 465720 140d92e854c10da2480cdc053b6588666e3b3490
child 465722 2f776fa2433d6c44e42040792742aea3656f9b98
push id35746
push usershindli@mozilla.com
push dateSat, 23 Mar 2019 09:46:24 +0000
treeherdermozilla-central@02b7484f316b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersiain
bugs1505574
milestone68.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 1505574 - Remove UnboxedObjects ObjectGroup addendum r=iain Differential Revision: https://phabricator.services.mozilla.com/D24093
js/src/jit/MacroAssembler.cpp
js/src/vm/ObjectGroup.h
--- a/js/src/jit/MacroAssembler.cpp
+++ b/js/src/jit/MacroAssembler.cpp
@@ -191,22 +191,16 @@ void MacroAssembler::guardTypeSetMightBe
   // to a native object with an original unboxed group. Jump to label if this
   // might have happened for the input object.
 
   if (types->unknownObject()) {
     jump(label);
     return;
   }
 
-  loadPtr(Address(obj, JSObject::offsetOfGroup()), scratch);
-  load32(Address(scratch, ObjectGroup::offsetOfFlags()), scratch);
-  and32(Imm32(OBJECT_FLAG_ADDENDUM_MASK), scratch);
-  branch32(Assembler::Equal, scratch,
-           Imm32(ObjectGroup::addendumOriginalUnboxedGroupValue()), label);
-
   for (size_t i = 0; i < types->getObjectCount(); i++) {
     if (JSObject* singleton = getSingletonAndDelayBarrier(types, i)) {
       movePtr(ImmGCPtr(singleton), scratch);
       loadPtr(Address(scratch, JSObject::offsetOfGroup()), scratch);
     } else if (ObjectGroup* group = getGroupAndDelayBarrier(types, i)) {
       movePtr(ImmGCPtr(group), scratch);
     } else {
       continue;
--- a/js/src/vm/ObjectGroup.h
+++ b/js/src/vm/ObjectGroup.h
@@ -243,21 +243,16 @@ class ObjectGroup : public gc::TenuredCe
     // When used by the 'new' group when constructing an interpreted
     // function, the addendum stores a TypeNewScript.
     Addendum_NewScript,
 
     // For some plain objects, the addendum stores a
     // PreliminaryObjectArrayWithTemplate.
     Addendum_PreliminaryObjects,
 
-    // If this group is used by objects that have been converted from an
-    // unboxed representation and/or have the same allocation kind as such
-    // objects, the addendum points to that unboxed group.
-    Addendum_OriginalUnboxedGroup,
-
     // When used by typed objects, the addendum stores a TypeDescr.
     Addendum_TypeDescr
   };
 
  private:
   void setAddendum(AddendumKind kind, void* addendum, bool writeBarrier = true);
 
   AddendumKind addendumKind() const {
@@ -307,27 +302,16 @@ class ObjectGroup : public gc::TenuredCe
 
   void detachPreliminaryObjects() {
     MOZ_ASSERT(maybePreliminaryObjectsDontCheckGeneration());
     setAddendum(Addendum_None, nullptr);
   }
 
   inline bool hasUnanalyzedPreliminaryObjects();
 
-  ObjectGroup* maybeOriginalUnboxedGroup() const {
-    if (addendumKind() == Addendum_OriginalUnboxedGroup) {
-      return reinterpret_cast<ObjectGroup*>(addendum_);
-    }
-    return nullptr;
-  }
-
-  void setOriginalUnboxedGroup(ObjectGroup* group) {
-    setAddendum(Addendum_OriginalUnboxedGroup, group);
-  }
-
   TypeDescr* maybeTypeDescr() {
     // Note: there is no need to sweep when accessing the type descriptor
     // of an object, as it is strongly held and immutable.
     if (addendumKind() == Addendum_TypeDescr) {
       return &typeDescr();
     }
     return nullptr;
   }
@@ -464,22 +448,16 @@ class ObjectGroup : public gc::TenuredCe
 
   void finalize(FreeOp* fop);
 
   static const JS::TraceKind TraceKind = JS::TraceKind::ObjectGroup;
 
  public:
   const ObjectGroupFlags* addressOfFlags() const { return &flags_; }
 
-  // Get the bit pattern stored in an object's addendum when it has an
-  // original unboxed group.
-  static inline int32_t addendumOriginalUnboxedGroupValue() {
-    return Addendum_OriginalUnboxedGroup << OBJECT_FLAG_ADDENDUM_SHIFT;
-  }
-
   inline uint32_t basePropertyCount(const AutoSweepObjectGroup& sweep);
   inline uint32_t basePropertyCountDontCheckGeneration();
 
  private:
   inline void setBasePropertyCount(const AutoSweepObjectGroup& sweep,
                                    uint32_t count);
 
   static void staticAsserts() {