Bug 25159 - Support Array.prototype.reduce
Summary: Support Array.prototype.reduce
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-13 13:59 PDT by Oliver Hunt
Modified: 2009-04-15 23:49 PDT (History)
1 user (show)

See Also:


Attachments
implement reduce (8.36 KB, patch)
2009-04-13 14:33 PDT, Oliver Hunt
oliver: review-
Details | Formatted Diff | Diff
Performant implementation (11.29 KB, patch)
2009-04-15 15:28 PDT, Oliver Hunt
no flags Details | Formatted Diff | Diff
Reduce redux (12.63 KB, patch)
2009-04-15 16:24 PDT, Oliver Hunt
barraclough: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2009-04-13 13:59:31 PDT
Tracking bug
Comment 1 Oliver Hunt 2009-04-13 14:33:13 PDT
Created attachment 29440 [details]
implement reduce
Comment 2 Oliver Hunt 2009-04-13 14:42:56 PDT
Comment on attachment 29440 [details]
implement reduce

perf is abysmal
Comment 3 Oliver Hunt 2009-04-15 15:28:30 PDT
Created attachment 29519 [details]
Performant implementation
Comment 4 Oliver Hunt 2009-04-15 16:24:01 PDT
Created attachment 29521 [details]
Reduce redux
Comment 5 Gavin Barraclough 2009-04-15 16:32:17 PDT
Comment on attachment 29521 [details]
Reduce redux

cachedCall.setArgument(1, array->getIndex(i));

I think this should probably now be:

cachedCall.setArgument(1, v);
Comment 6 Oliver Hunt 2009-04-15 16:35:47 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	JavaScriptCore/ChangeLog
	M	JavaScriptCore/runtime/ArrayPrototype.cpp
	M	LayoutTests/ChangeLog
	A	LayoutTests/fast/js/array-reduce-expected.txt
	A	LayoutTests/fast/js/array-reduce.html
	A	LayoutTests/fast/js/resources/array-reduce.js
Committed r42563