Add CacheIR instruction GuardIsTypedArray

NEW
Unassigned

Status

()

enhancement
P3
normal
a year ago
a year ago

People

(Reporter: mgaudet, Unassigned)

Tracking

(Blocks 1 bug)

unspecified
Points:
---

Firefox Tracking Flags

(firefox59 fix-optional)

Details

From Bug 1419372: 

> This is fine, but for typed arrays we could consider adding a GuardIsTypedArray
> CacheIR instruction (that does something like [0]) and emitting it instead of
> GuardShape.
> 
> The idea is this: typed array objects with different element types (say 
> Int32Array and Int8Array) have a different js::Class* and therefore get a 
> different Shape, but this IC stub works exactly the same for each
> TypedArrayObject. So GuardIsTypedArray would be a more generic guard that 
> would accept all typed arrays.
> 
> [0] https://searchfox.org/mozilla-central/rev/477ac066b565ae0eb3519875581a62dfb1430e98/js/src/jit/CodeGenerator.cpp#12029-12034


Follow up is to of course use the guard in HasPropIRGenerator::tryAttachTypedArray.
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.