BaselineCompiler: Add optimized stub for JSOP_NEWARRAY

RESOLVED WONTFIX

Status

()

RESOLVED WONTFIX
6 years ago
6 years ago

People

(Reporter: djvj, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
We can optimize this the same way Ion does - using a template object.
(Reporter)

Comment 1

6 years ago
Created attachment 709334 [details] [diff] [review]
Patch to add template-object based optimized newarray

This is basically cribbed from Ion's approach for inline-allocating gcthings, but specialized for arrays and not pushed behind a common masm method.

Baseline's approach is a bit more involved because we can't specialize the code to the template object.
Attachment #709334 - Flags: review?(jdemooij)
Comment on attachment 709334 [details] [diff] [review]
Patch to add template-object based optimized newarray

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

JM without TI always stubs NEWARRAY and is pretty competitive on SS. I think at least for now we should be able to do the same, allocating arrays inline feels like the kind of heavyweight optimization we want to have in Ion but shouldn't need in a baseline compiler. What do you think?
(Reporter)

Comment 3

6 years ago
That's a reasonable thought, actually.  Looking back at the NEWARRAY fallback, I can see that outside of the vmcall, we're not doing anything all that expensive.
(Reporter)

Updated

6 years ago
Attachment #709334 - Flags: review?(jdemooij)
(Reporter)

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.