IonMonkey: GETELEM: Add a dense array IC

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
SS 3d-raytrace adds properties to some arrays, so these arrays are no longer dense (bug 586842). This means we can't use our dense array fast paths in some of the vector functions, even though most of the arrays are dense. We should add a dense array IC to handle these cases.

This IC should also help Kraken crypto-aes.
(Assignee)

Comment 1

6 years ago
Created attachment 606269 [details] [diff] [review]
Patch

Applies on top of bug 734383. This does not yet handle the out-of-bounds or hole cases, but we can support these later.
Attachment #606269 - Flags: review?(dvander)
(Assignee)

Comment 2

6 years ago
Created attachment 606283 [details] [diff] [review]
Patch

Forgot to qref.
Attachment #606269 - Attachment is obsolete: true
Attachment #606269 - Flags: review?(dvander)
Attachment #606283 - Flags: review?(dvander)
Comment on attachment 606283 [details] [diff] [review]
Patch

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

::: js/src/ion/IonCaches.cpp
@@ +463,5 @@
> +    Label failures;
> +    MacroAssembler masm;
> +
> +    // Guard object is a dense array.
> +    Shape *shape = GetDenseArrayShape(cx, script->global());

Neat - is this to generate a faster guard than a clasp guard?

@@ +501,5 @@
> +
> +    // All failures flow to here.
> +    masm.bind(&hole);
> +    masm.pop(object());
> +    masm.bind(&failures);

Just to make sure: there's no way object() is used by out(), right? There was a bug where GETPROP could clobber its output this way.
Attachment #606283 - Flags: review?(dvander) → review+
(Assignee)

Comment 4

6 years ago
http://hg.mozilla.org/projects/ionmonkey/rev/b96587f04076

(In reply to David Anderson [:dvander] from comment #3)
> 
> Neat - is this to generate a faster guard than a clasp guard?

It's what JM does, it's faster than a clasp guard because loading the class requires a few loads nowadays.

> 
> Just to make sure: there's no way object() is used by out(), right?

True, the object register is not "at-start" so the output is guaranteed to use different registers.
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.