Closed
Bug 876429
Opened 12 years ago
Closed 12 years ago
BaselineCompiler: Compile JSOP_SETCALL
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(2 files)
8.33 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
1.88 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter 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)
Updated•12 years ago
|
Attachment #754461 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Assignee | ||
Comment 3•12 years ago
|
||
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)
Assignee | ||
Updated•12 years ago
|
Attachment #754461 -
Attachment is obsolete: false
Comment 4•12 years ago
|
||
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+
Assignee | ||
Comment 5•12 years ago
|
||
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 :)
Comment 6•12 years ago
|
||
Easily done if someone wants to do it -- Parser<FullParseHandler>::makeSetCall(ParseNode *pn, unsigned msg) if you care. You know you want to... ;-)
Comment 7•12 years ago
|
||
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.
Description
•