Closed
Bug 592152
Opened 14 years ago
Closed 14 years ago
Partial fix for const declarations in narcissus
Categories
(Other Applications Graveyard :: Narcissus, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: taustin, Assigned: taustin)
References
Details
Attachments
(1 file)
9.34 KB,
patch
|
dherman
:
review+
|
Details | Diff | Splinter Review |
The attached patch will make const declarations work in Narcissus, rather than have const as a pseudonym for var. Note that declarations like 'const x;' will still not work correctly. This might be a little more involved to fix, so I'll open a separate bug for that. $ ./njs -e 'const x; x=4; print(x);' 4 In contrast to spidermonkey: $ ./js -e 'const x; x=4; print(x);' undefined Also, updating narcissus-failures.txt.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Updated•14 years ago
|
Attachment #470660 -
Flags: review?(dherman)
Comment 2•14 years ago
|
||
Comment on attachment 470660 [details] [diff] [review] Fix for supporting const declarations > if (u.readOnly || !hasDirectProperty(t, s)) { >- definitions.defineProperty(t, s, undefined, x.type !== EVAL_CODE, u.readOnly); >+ definitions.defineProperty(t, s, undefined, x.type !== EVAL_CODE, false); Add a comment here that references bug 592335 and explains that this doesn't quite work because of the |const x;| case. But it's fine for now. r=me with that one change. Dave
Attachment #470660 -
Flags: review?(dherman) → review+
Assignee | ||
Comment 3•14 years ago
|
||
Changelist: http://hg.mozilla.org/tracemonkey/rev/a80e6f126a1a
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•