ported change from tenfourfox:

- chemspill: M1537924 M1538006 (backported to ESR45) (b22dfbd77)
This commit is contained in:
Roy Tam 2019-03-25 22:08:42 +08:00
commit 7c42464249
2 changed files with 7 additions and 6 deletions

View file

@ -6556,8 +6556,10 @@ jit::PropertyWriteNeedsTypeBarrier(TempAllocator& alloc, CompilerConstraintList*
bool success = true;
for (size_t i = 0; i < types->getObjectCount(); i++) {
TypeSet::ObjectKey* key = types->getObject(i);
if (!key || key->unknownProperties())
if (!key)
continue;
if (!key->hasStableClassAndProto(constraints))
return true;
// TI doesn't track TypedArray indexes and should never insert a type
// barrier for them.
@ -6609,8 +6611,11 @@ jit::PropertyWriteNeedsTypeBarrier(TempAllocator& alloc, CompilerConstraintList*
TypeSet::ObjectKey* excluded = nullptr;
for (size_t i = 0; i < types->getObjectCount(); i++) {
TypeSet::ObjectKey* key = types->getObject(i);
if (!key || key->unknownProperties())
if (!key)
continue;
if (!key->hasStableClassAndProto(constraints))
return true;
if (!name && IsTypedArrayClass(key->clasp()))
continue;