mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1030083 - IonMonkey: Eliminate 'index in array' checks for packed arrays, r=jandem
This commit is contained in:
parent
59a8c1f0c5
commit
df11430899
@ -10146,6 +10146,12 @@ IonBuilder::jsop_in_dense()
|
||||
MInitializedLength *initLength = MInitializedLength::New(alloc(), elements);
|
||||
current->add(initLength);
|
||||
|
||||
// If there are no holes, speculate the InArray check will not fail.
|
||||
if (!needsHoleCheck && !failedBoundsCheck_) {
|
||||
addBoundsCheck(idInt32, initLength);
|
||||
return pushConstant(BooleanValue(true));
|
||||
}
|
||||
|
||||
// Check if id < initLength and elem[id] not a hole.
|
||||
MInArray *ins = MInArray::New(alloc(), elements, id, initLength, obj, needsHoleCheck);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user