IonMonkey: Handle JSOP_NEWINIT

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: sstangl, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 613452 [details] [diff] [review]
Handle JSOP_NEWINIT, v1

Implements JSOP_NEWINIT as in JM, by decomposing into MNewArray or MNewObject. This is simple -- the majority of the patch addresses complications where MInitProp is created with an operand MNewObject with no baseObj, as in the JSOP_NEWINIT case.

This is handled as in JM, by always making a VM call.

Nothing subtle; pretty straightforward.
Attachment #613452 - Flags: review?(dvander)
Comment on attachment 613452 [details] [diff] [review]
Handle JSOP_NEWINIT, v1

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

::: js/src/ion/IonBuilder.cpp
@@ +2764,4 @@
>  }
>  
>  bool
> +IonBuilder::jsop_newinit(bool isArray)

nit: This should just take a JSProtoKey instead.
Attachment #613452 - Flags: review?(dvander) → review+
Noooo, no JSProtoKey!  We want to get rid of that in the long run.  Would it be too much hardship to have separate methods for the array/object cases, or something?  Anything but using JSProtoKey more.
(Reporter)

Comment 3

5 years ago
https://hg.mozilla.org/projects/ionmonkey/rev/7899320fc29d

Since Waldo wants to remove JSProtoKey, I kept the boolean.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Reporter)

Comment 4

5 years ago
https://hg.mozilla.org/projects/ionmonkey/rev/72596946ff96
You need to log in before you can comment on or make changes to this bug.