Factor out core of Array.forEach and .every, for use in TypedArrays
authordehrenberg <dehrenberg@chromium.org>
Tue, 12 May 2015 01:32:26 +0000 (18:32 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 12 May 2015 01:32:20 +0000 (01:32 +0000)
commit1ebbaaa0362ffc295fc4121bead8bb84a3cf5ec6
treec7e7462e96e668d5b071e02cfb8f665ec306224d
parentc50d9819c9cae09bceb928ea872dba7a91516c6e
Factor out core of Array.forEach and .every, for use in TypedArrays

The idea is to make this the model for future TypedArray methods.
A possible downside could be lower array method performance
if everything gets polymorhpic (but if enough inlining happens, it
should still be fast), but on the upside, this change means that
the TypedArray methods won't create as much code size bloat.

BUG=v8:3578
LOG=Y
R=adamk@chromium.org
CC=arv@chromium.org, caitpotter88@gmail.com

Review URL: https://codereview.chromium.org/1133503003

Cr-Commit-Position: refs/heads/master@{#28351}
src/array.js
src/harmony-typedarray.js
test/mjsunit/harmony/typedarrays-every.js
test/mjsunit/harmony/typedarrays-foreach.js