Bug 145303

Summary: [JSC] Speed up new array construction in Array.prototype.splice().
Product: WebKit Reporter: Andreas Kling <kling>
Component: JavaScriptCoreAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, rniwa
Priority: P2 Keywords: Performance
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
benjamin: review+
Patch for landing none

Description Andreas Kling 2015-05-22 01:22:22 PDT
Let's use Ryosuke's JSArray::fastSlice() for Array.prototype.splice() too :-)
Comment 1 Andreas Kling 2015-05-22 01:22:45 PDT
Created attachment 253584 [details]
Patch
Comment 2 Benjamin Poulain 2015-05-22 01:32:05 PDT
Comment on attachment 253584 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=253584&action=review

> Source/JavaScriptCore/runtime/ArrayPrototype.cpp:669
> +        for (unsigned k = 0; k < deleteCount; k++) {

++k

> Source/JavaScriptCore/runtime/JSArray.cpp:684
> +    case ALL_INT32_INDEXING_TYPES:
> +    case ALL_DOUBLE_INDEXING_TYPES:
> +    case ALL_CONTIGUOUS_INDEXING_TYPES: {

I don't think that changes anything, fastSlice() always happen after isJSArray().
Comment 3 Andreas Kling 2015-05-22 01:49:19 PDT
Created attachment 253585 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2015-05-22 03:18:58 PDT
Comment on attachment 253585 [details]
Patch for landing

Clearing flags on attachment: 253585

Committed r184767: <http://trac.webkit.org/changeset/184767>
Comment 5 WebKit Commit Bot 2015-05-22 03:19:02 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Andreas Kling 2015-05-26 09:00:24 PDT
*** Bug 145302 has been marked as a duplicate of this bug. ***