Closed Bug 837239 Opened 11 years ago Closed 11 years ago

BaselineCompiler: Add optimized stub for JSOP_NEWARRAY

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: djvj, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We can optimize this the same way Ion does - using a template object.
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?
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.
Attachment #709334 - Flags: review?(jdemooij)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: