• msaboff@apple.com's avatar
    Add ability for JSArray::unshiftCount to unshift in middle of an array · a1c33e2b
    msaboff@apple.com authored
    Reviewed by Filip Pizlo.
    Changed JSArray::unshiftCount and unshiftCountSlowCase to handle unshifting from the middle of an
    array.  Depending on where the unshift point is, either the front part of the array will be moved
    "left" or the back part will be moved right.  Given that unshiftCount only works on contiguous
    arrays it is safe to use memmove for the moves.
    This change is worth 25% performance improvement on pdfjs.  It doesn't seem to have any impact on
    any other benchmarks.
    * runtime/ArrayPrototype.cpp:
    * runtime/JSArray.cpp:
    * runtime/JSArray.h:
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSArray.cpp 41.2 KB