Closed Bug 876429 Opened 12 years ago Closed 12 years ago

BaselineCompiler: Compile JSOP_SETCALL

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(2 files)

Attached patch PatchSplinter Review
SETCALL is emitted for things like f() = 1 or f()++, it just throws a ReferenceError. The patch fixes the number of uses/defs of this op, the Baseline part is just a VM call. Uncommon, but I'd like Baseline to compile everything, so that includes a bunch of these weird ops.
Attachment #754461 - Flags: review?(bhackett1024)
Attachment #754461 - Flags: review?(bhackett1024) → review+
Attached patch Follow-up fixSplinter Review
Bleh, SETCALL can also be emitted for destructing assignment. This used to magically work due to JSOP_SETCALL's nuses/ndefs, this patch handles the case explicitly.
Attachment #754461 - Attachment is obsolete: true
Attachment #755872 - Flags: review?(bhackett1024)
Attachment #754461 - Attachment is obsolete: false
Comment on attachment 755872 [details] [diff] [review] Follow-up fix Review of attachment 755872 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jit-test/tests/baseline/setcall.js @@ +35,5 @@ > + var v1, v2, v3; > + var z = [1, 2, 3]; > + for (var i=0; i<15; i++) { > + if (i > 12) > + [v1, v2, g(), v3] = z If SETCALL exists for webcompat, I guess I don't understand why this isn't a syntax error since the web doesn't yet use destructuring assignments.
Attachment #755872 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/8323f6dbe1a1 (Try: https://tbpl.mozilla.org/?tree=Try&rev=220e45bc7f96) (In reply to Brian Hackett (:bhackett) from comment #4) > If SETCALL exists for webcompat, I guess I don't understand why this isn't a > syntax error since the web doesn't yet use destructuring assignments. Yeah, I wondered the same :)
Easily done if someone wants to do it -- Parser<FullParseHandler>::makeSetCall(ParseNode *pn, unsigned msg) if you care. You know you want to... ;-)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: