Closed
Bug 404734
Opened 17 years ago
Closed 17 years ago
Implement object destructuring shorthand for JS1.8
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.9beta3
People
(Reporter: brendan, Assigned: brendan)
References
Details
(Keywords: dev-doc-complete, Whiteboard: [DocArea=JS])
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
brendan
:
review+
brendan
:
approval1.9+
|
Details | Diff | Splinter Review |
var {p, q} = o;
short for
var {p:p, q:q} = o;
where o = {p: 42, q: true}.
/be
Assignee | ||
Comment 1•17 years ago
|
||
Want this for JS1.8 (JS2/ES4 proving).
/be
Status: NEW → ASSIGNED
Flags: blocking1.9+
Assignee | ||
Comment 2•17 years ago
|
||
This added side-trip is easy, if you know the territory already ;-).
/be
Attachment #295144 -
Flags: review?(mrbkap)
Assignee | ||
Comment 3•17 years ago
|
||
Warming up a bit with a small patch, hence elevated priority.
/be
Priority: -- → P1
Target Milestone: mozilla1.9 M10 → mozilla1.9 M11
Assignee | ||
Comment 4•17 years ago
|
||
Comment on attachment 295144 [details] [diff] [review]
implementation
Incomplete, need consensus from Ecma TG1 based on http://bugs.ecmascript.org/ticket/111#comment:3.
/be
Attachment #295144 -
Flags: review?(mrbkap) → review-
Assignee | ||
Comment 5•17 years ago
|
||
The only forward progress to report is approval of destructuring shorthand and the desire to separate object initialiser shorthand that mirrors the destructuring shorthand into a separate bugs.ecmascript.org trac ticket. I don't favor such a "structuring" shorthand at the moment, so don't plan to implement it. Since the destructuring shorthand is approved, I would like to finish this bug by adding the necessary post-parsing AST check for lvalue context.
/be
Assignee | ||
Comment 6•17 years ago
|
||
Attachment #295144 -
Attachment is obsolete: true
Attachment #299869 -
Flags: review?(mrbkap)
Comment 7•17 years ago
|
||
Comment on attachment 299869 [details] [diff] [review]
shorthand is for destructuring only (not "structuring" aka object literal)
I only skimmed the decompiler changes. Do those JS_ASSERTS want to be LOCAL_ASSERTs?
Attachment #299869 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 8•17 years ago
|
||
Attachment #299869 -
Attachment is obsolete: true
Attachment #300269 -
Flags: review+
Attachment #300269 -
Flags: approval1.9+
Assignee | ||
Comment 9•17 years ago
|
||
Fixed:
js/src/js.msg 3.83
js/src/jsconfig.h 3.46
js/src/jsemit.c 3.299
js/src/jsopcode.c 3.285
js/src/jsparse.c 3.331
js/src/jsparse.h 3.58
/be
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 10•17 years ago
|
||
/cvsroot/mozilla/js/tests/js1_8/regress/regress-404734.js,v <-- regress-404734.js
initial revision: 1.1
Flags: in-testsuite+
Flags: in-litmus-
Updated•12 years ago
|
Keywords: dev-doc-needed
Updated•11 years ago
|
Whiteboard: [DocArea=JS]
Comment 12•10 years ago
|
||
Finally put together https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment which contains info on destructuring in the light of ES6.
Marking this as dev-doc-complete.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•