Closed
Bug 456389
Opened 16 years ago
Closed 15 years ago
Implement JS 1.8 reduce/reduceRight array methods
Categories
(Rhino Graveyard :: Core, defect)
Rhino Graveyard
Core
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: hannesw, Assigned: norrisboyd)
References
Details
Attachments
(3 files, 1 obsolete file)
7.70 KB,
patch
|
Details | Diff | Splinter Review | |
603 bytes,
patch
|
Details | Diff | Splinter Review | |
2.39 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1 Build Identifier: Implement JavaScript 1.8 reduce/reduceRight array methods. See bug #363040 for spicermonkey implementation. Reproducible: Always
Reporter | ||
Comment 1•16 years ago
|
||
Implements reduce and reduceRight methods on array prototype and constructor. I tried to reproduce the behaviour of spidermonkey, especially for sparse/empty arrays.
Reporter | ||
Comment 2•16 years ago
|
||
Patch with minor improvements and fixes.
Attachment #339794 -
Attachment is obsolete: true
Assignee | ||
Updated•16 years ago
|
Assignee: nobody → norrisboyd
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Reporter | ||
Comment 3•15 years ago
|
||
Committed the last patch to CVS HEAD: Checking in src/org/mozilla/javascript/NativeArray.java; /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/NativeArray.java,v <-- NativeArray.java new revision: 1.97; previous revision: 1.96 done Checking in src/org/mozilla/javascript/resources/Messages.properties; /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/resources/Messages.properties,v <-- Messages.properties new revision: 1.91; previous revision: 1.90 done
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•15 years ago
|
||
(In reply to comment #4) > Created an attachment (id=391093) [details] > reduce and reduceRight throw a TypeError when array empty and no initVal > > As per 15.4.4.21 step 5, and 15.4.4.22 step 5 of the spec. Committed: Checking in src/org/mozilla/javascript/NativeArray.java; /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/NativeArray.java,v <-- NativeArray.java new revision: 1.105; previous revision: 1.104
You need to log in
before you can comment on or make changes to this bug.
Description
•