deps: cherry-pick 6da51b4 from v8's upstream
authorFedor Indutny <fedor@indutny.com>
Thu, 10 Sep 2015 19:26:50 +0000 (12:26 -0700)
committerRod Vagg <rod@vagg.org>
Fri, 11 Sep 2015 01:31:20 +0000 (11:31 +1000)
commit60985046851ac7888c6cc81cfb6ff1fe6b7d1cf2
treec4c057220f50f7f125b5589716f34c3ea86447ca
parent9683e5df51956e737eb5a2914458d481e2dc4bd8
deps: cherry-pick 6da51b4 from v8's upstream

Original commit message:

    TypedArray accessor detection: consider entire prototype chain

    When looking up a special accessor for known TypedArray fields
    ("length", "byteLength", "byteOffset"), consider the entire
    prototype chain, not only the direct prototype.
    This allows subclasses of TypedArrays to benefit from fast
    specialized accesses.

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

    Cr-Commit-Position: refs/heads/master@{#30678}

Benchmark results:

   buffers/buffer-iterate.js size=16386 type=slow method=for n=1000:
   ./node: 71607 node: 8702.3 ............ 722.85%

Improvement depends on the code, but generally brings us back to the
performance that we had before the v8 update (if not making it
faster).

Fixes: https://github.com/nodejs/node/issues/2463
PR-URL: https://github.com/nodejs/node/pull/2801
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
deps/v8/src/accessors.cc
deps/v8/test/mjsunit/regress/regress-typedarray-length.js