Closed
Bug 569487
Opened 14 years ago
Closed 14 years ago
generalize Reflect.parse to accept JS builder functions
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dherman, Assigned: dherman)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 3 obsolete files)
69.86 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
Generalize the Reflect.parse API to accept an optional JS builder function, a la: Reflect.parse(src, builder) where builder is an object with callbacks the serializer calls on every sub-node to generate the result. Dave
Assignee | ||
Comment 1•14 years ago
|
||
Implementation attached. Next I'll document the API. Dave
Assignee | ||
Comment 2•14 years ago
|
||
BTW, this patch builds off of the patch for 594060. The builder argument is provided as an optional 'builder' property of the configuration object. Dave
Assignee | ||
Comment 3•14 years ago
|
||
Updated based on recent changes in bug 594060. Dave
Attachment #476438 -
Attachment is obsolete: true
Assignee | ||
Comment 4•14 years ago
|
||
Attachment #481835 -
Attachment is obsolete: true
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #500297 -
Attachment is obsolete: true
Assignee | ||
Comment 6•14 years ago
|
||
The docs now pretty exhaustively detail the API for the optional builder object: https://developer.mozilla.org/en/SpiderMonkey/Parser_API The docs have gotten pretty big, so they probably want to be split out into multiple pages. But MDC is such hell to edit I'm not sure I'm quite up to the task at the moment. At any rate, I think this is ready for review now. Dave
Assignee | ||
Updated•14 years ago
|
Attachment #500409 -
Flags: review?(gal)
Comment 7•14 years ago
|
||
Comment on attachment 500409 [details] [diff] [review] minor bugfix >From: Dave Herman <dherman@mozilla.com> > >bug 569487, r=?: Reflect.parse(): custom builder object > >diff --git a/js/src/jsast.tbl b/js/src/jsast.tbl >--- a/js/src/jsast.tbl >+++ b/js/src/jsast.tbl >@@ -34,85 +34,86 @@ > * and other provisions required by the GPL or the LGPL. If you do not delete > * the provisions above, a recipient may use your version of this file under > * the terms of any one of the MPL, the GPL or the LGPL. > * >+ for (uintN i = 0; i < AST_LIMIT; i++) { >+ callbacks[i].setNull(); >+ } No {} I think. Looks good. NPOTB so just land it.
Attachment #500409 -
Flags: review?(gal) → review+
Assignee | ||
Comment 8•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/351e87c78237
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 9•14 years ago
|
||
Burned the tree; backed out: http://hg.mozilla.org/tracemonkey/rev/83f778ef2a77
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 10•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/1155e7cf1914
Whiteboard: fixed-in-tracemonkey
Comment 11•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/1155e7cf1914
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•