mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Remove UnboxedObjects ObjectGroup addendum
This commit is contained in:
parent
30b5b0a6da
commit
82e3eafecf
2 changed files with 7 additions and 36 deletions
|
|
@ -126,20 +126,14 @@ MacroAssembler::guardTypeSetMightBeIncomplete(TypeSet* types, Register obj, Regi
|
|||
{
|
||||
// Type set guards might miss when an object's group changes. In this case
|
||||
// either its old group's properties will become unknown, or it will change
|
||||
// to a native object with an original unboxed group. Jump to label if this
|
||||
// might have happened for the input object.
|
||||
// to a native object. 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 = types->getSingletonNoBarrier(i)) {
|
||||
movePtr(ImmGCPtr(singleton), scratch);
|
||||
|
|
|
|||
|
|
@ -153,11 +153,6 @@ class ObjectGroup : public gc::TenuredCell
|
|||
// 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
|
||||
};
|
||||
|
|
@ -219,16 +214,6 @@ class ObjectGroup : public gc::TenuredCell
|
|||
maybePreliminaryObjectsDontCheckGeneration();
|
||||
}
|
||||
|
||||
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.
|
||||
|
|
@ -289,9 +274,8 @@ class ObjectGroup : public gc::TenuredCell
|
|||
* that can be read out of that property in actual JS objects. In native
|
||||
* objects, property types account for plain data properties (those with a
|
||||
* slot and no getter or setter hook) and dense elements. In typed objects
|
||||
* and unboxed objects, property types account for object and value
|
||||
* properties and elements in the object, and expando properties in unboxed
|
||||
* objects.
|
||||
* property types account for object and value properties and elements in
|
||||
* the object.
|
||||
*
|
||||
* For accesses on these properties, the correspondence is as follows:
|
||||
*
|
||||
|
|
@ -314,10 +298,9 @@ class ObjectGroup : public gc::TenuredCell
|
|||
* 2. Array lengths are special cased by the compiler and VM and are not
|
||||
* reflected in property types.
|
||||
*
|
||||
* 3. In typed objects (but not unboxed objects), the initial values of
|
||||
* properties (null pointers and undefined values) are not reflected in
|
||||
* the property types. These values are always possible when reading the
|
||||
* property.
|
||||
* 3. In typed objects, the initial values of properties (null pointers and
|
||||
* undefined values) are not reflected in the property types. These
|
||||
* values are always possible when reading the property.
|
||||
*
|
||||
* We establish these by using write barriers on calls to setProperty and
|
||||
* defineProperty which are on native properties, and on any jitcode which
|
||||
|
|
@ -431,12 +414,6 @@ class ObjectGroup : public gc::TenuredCell
|
|||
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();
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue