Call a more generic function when inlining array natives.

This simplifies the code a bit because
ElementAccessHasExtraIndexedProperty checks for length-overflow
(directly) and sparse-indexes (through TypeCanHaveExtraIndexedProperties)
so the callers don't have to do that anymore.
This commit is contained in:
wolfbeast 2019-06-20 12:56:32 +02:00 committed by Roy Tam
commit aae7584fdd
3 changed files with 5 additions and 26 deletions

View file

@ -6221,15 +6221,6 @@ PrototypeHasIndexedProperty(IonBuilder* builder, JSObject* obj)
return false;
}
// Whether Array.prototype, or an object on its proto chain, has an indexed property.
bool
jit::ArrayPrototypeHasIndexedProperty(IonBuilder* builder, JSScript* script)
{
if (JSObject* proto = script->global().maybeGetArrayPrototype())
return PrototypeHasIndexedProperty(builder, proto);
return true;
}
// Whether obj or any of its prototypes have an indexed property.
bool
jit::TypeCanHaveExtraIndexedProperties(IonBuilder* builder, TemporaryTypeSet* types)