Closed Bug 743881 Opened 12 years ago Closed 12 years ago

IonMonkey: Handle JSOP_NEWINIT

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sstangl, Unassigned)

References

Details

Attachments

(1 file)

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.
https://hg.mozilla.org/projects/ionmonkey/rev/7899320fc29d

Since Waldo wants to remove JSProtoKey, I kept the boolean.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.