Closed Bug 1422851 Opened 7 years ago Closed 4 years ago

Add CacheIR instruction GuardIsTypedArray

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox59 --- wontfix
firefox83 --- fixed

People

(Reporter: mgaudet, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

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

Add GuardIsTypedArray CacheIR instruction and transpile it for Warp. The
implementation follows existing guard instructions like
MGuardIsNotArrayBufferMaybeShared.

Assignee: nobody → andrebargull
Status: NEW → ASSIGNED

Split LoadTypedArrayElementExistsResult into TypedArray and TypedObject specific
instructions in preparation for part 3, which will transpile the TypedArray
instruction.

Depends on D91107

Transpile LoadTypedArrayElementExistsResult to make use of the transpiled
GuardIsTypedArray instruction from part 1.

Depends on D91108

Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5cf1e63bb834
Part 1: Add GuardIsTypedArray CacheIR instruction. r=jandem
https://hg.mozilla.org/integration/autoland/rev/f3e8c7058df6
Part 2: Split LoadTypedArrayElementExistsResult CacheIR instruction. r=jandem
https://hg.mozilla.org/integration/autoland/rev/828cb455bafd
Part 3: Transpile LoadTypedArrayElementExistsResult. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: