diff options
author | Moonchild <moonchild@palemoon.org> | 2019-06-28 11:25:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-28 11:25:09 +0000 |
commit | 31a02a022e1e3f01463672af71a5c4296f672bfb (patch) | |
tree | 041ebdd049d68aaa30caaee6c53260fe9116755b /js/src/vm/ReceiverGuard.cpp | |
parent | 610c5fc6cee6346b5333077c29029e3e90e0c4cb (diff) | |
parent | b8ff1df2c96270c481a645947390c4cdae93e3cc (diff) | |
download | UXP-31a02a022e1e3f01463672af71a5c4296f672bfb.tar UXP-31a02a022e1e3f01463672af71a5c4296f672bfb.tar.gz UXP-31a02a022e1e3f01463672af71a5c4296f672bfb.tar.lz UXP-31a02a022e1e3f01463672af71a5c4296f672bfb.tar.xz UXP-31a02a022e1e3f01463672af71a5c4296f672bfb.zip |
Merge pull request #1142 from MoonchildProductions/remove-unboxed
Remove unboxed objects
Diffstat (limited to 'js/src/vm/ReceiverGuard.cpp')
-rw-r--r-- | js/src/vm/ReceiverGuard.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/js/src/vm/ReceiverGuard.cpp b/js/src/vm/ReceiverGuard.cpp index e37bf8ee5..e95e8a208 100644 --- a/js/src/vm/ReceiverGuard.cpp +++ b/js/src/vm/ReceiverGuard.cpp @@ -15,11 +15,7 @@ ReceiverGuard::ReceiverGuard(JSObject* obj) : group(nullptr), shape(nullptr) { if (obj) { - if (obj->is<UnboxedPlainObject>()) { - group = obj->group(); - if (UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando()) - shape = expando->lastProperty(); - } else if (obj->is<TypedObject>()) { + if (obj->is<TypedObject>()) { group = obj->group(); } else { shape = obj->maybeShape(); @@ -32,9 +28,7 @@ ReceiverGuard::ReceiverGuard(ObjectGroup* group, Shape* shape) { if (group) { const Class* clasp = group->clasp(); - if (clasp == &UnboxedPlainObject::class_) { - // Keep both group and shape. - } else if (IsTypedObjectClass(clasp)) { + if (IsTypedObjectClass(clasp)) { this->shape = nullptr; } else { this->group = nullptr; @@ -45,10 +39,6 @@ ReceiverGuard::ReceiverGuard(ObjectGroup* group, Shape* shape) /* static */ int32_t HeapReceiverGuard::keyBits(JSObject* obj) { - if (obj->is<UnboxedPlainObject>()) { - // Both the group and shape need to be guarded for unboxed plain objects. - return obj->as<UnboxedPlainObject>().maybeExpando() ? 0 : 1; - } if (obj->is<TypedObject>()) { // Only the group needs to be guarded for typed objects. return 2; |