Closed
Bug 590766
Opened 14 years ago
Closed 14 years ago
"Assertion failure: PN_TYPE(pn) == TOK_NAME || PN_TYPE(pn) == TOK_ASSIGN" with Reflect.parse, let-block
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: dherman)
References
Details
(Keywords: assertion, testcase, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
14.18 KB,
patch
|
cdleary
:
review+
|
Details | Diff | Splinter Review |
Reflect.parse("let(x) { }") Assertion failure: PN_TYPE(pn) == TOK_NAME || PN_TYPE(pn) == TOK_ASSIGN, at ../jsreflect.cpp:1518
Assignee | ||
Comment 1•14 years ago
|
||
What an oversight! I didn't implement let-expressions or let-statements. This patch implements them and adds tests for them. (These crashing tests are exactly why I wanted LOCAL_ASSERT instead of JS_ASSERT as much as possible. After addressing the lion's share of these crashers, I will want to do a review of all the JS_ASSERT's and catch-all (else/default) branches that could be making unsound assumptions, and possibly replace them with dynamic checks that aren't disabled in production.) Dave
Assignee: general → dherman
Assignee | ||
Comment 2•14 years ago
|
||
Added let-statements and let-expressions to the docs: https://developer.mozilla.org/en/SpiderMonkey/Parser_API Dave
Assignee | ||
Updated•14 years ago
|
Attachment #469347 -
Flags: review?(cdleary)
Comment 3•14 years ago
|
||
Comment on attachment 469347 [details] [diff] [review] implements let expressions and let statements Looks good, just prefer JS_ALWAYS_TRUE(expr) to (void)expr when you do things like reserve up front. Maybe also try a test for recursive let-expressions? Don't think there's any special corner case there, but it'd be nice to have that covered.
Attachment #469347 -
Flags: review?(cdleary) → review+
Assignee | ||
Comment 4•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/e05e8e974c6a
Assignee | ||
Comment 5•14 years ago
|
||
> Looks good, just prefer JS_ALWAYS_TRUE(expr) to (void)expr when you do things > like reserve up front. > > Maybe also try a test for recursive let-expressions? Don't think there's any > special corner case there, but it'd be nice to have that covered. Sorry, I forgot to address these before I pushed. I'll add them to the patch for bug 590772. Dave
Whiteboard: fixed-in-tracemonkey
Comment 6•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/e05e8e974c6a
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
•