IonMonkey: constant fold length/elements accesses on singleton typed arrays

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bhackett, Unassigned)

Tracking

(Blocks: 1 bug)

Other Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 639517 [details] [diff] [review]
patch (171cc91d4c18)

Once created, typed array lengths and elements pointers are immutable.  Now that typed arrays can be singletons, these values can be baked in for accesses on these arrays.  This reduces register pressure / instruction counts for length accesses, makes a tiny difference for elements too (elements currently need to be in a register).  This also simplifies things for further optimizations towards bug 771106.
Attachment #639517 - Flags: review?(dvander)
Comment on attachment 639517 [details] [diff] [review]
patch (171cc91d4c18)

Review of attachment 639517 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/ion/shared/Lowering-shared.cpp
@@ +72,5 @@
>      return true;
>  }
>  
>  bool
> +LIRGeneratorShared::visitConstantElements(MConstantElements *ins)

This should go in Lowering.cpp nowadays (the file name is confusing but shared is for utility functions).
Attachment #639517 - Flags: review?(dvander) → review+
(Reporter)

Comment 2

5 years ago
https://hg.mozilla.org/projects/ionmonkey/rev/c565755644e0
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.