Bug 145351

Summary: String.prototype.indexOf() should use StringView.
Product: WebKit Reporter: Andreas Kling <kling>
Component: JavaScriptCoreAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, darin
Priority: P2 Keywords: Performance
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Andreas Kling 2015-05-23 13:50:43 PDT
We can avoid creating new StringImpls in indexOf() if we use JSString::view() to search through the string.
This requires adding a StringView::find(StringView, start) implementation.
Comment 1 Andreas Kling 2015-05-23 13:55:32 PDT
Created attachment 253650 [details]
Patch
Comment 2 WebKit Commit Bot 2015-05-26 11:57:31 PDT
Comment on attachment 253650 [details]
Patch

Clearing flags on attachment: 253650

Committed r184867: <http://trac.webkit.org/changeset/184867>
Comment 3 WebKit Commit Bot 2015-05-26 11:57:36 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Andreas Kling 2015-06-08 22:07:19 PDT
Re-opening to attach the StringPrototype parts, too. (Duh.)
Comment 5 Andreas Kling 2015-06-08 22:15:00 PDT
Created attachment 254547 [details]
Patch
Comment 6 WebKit Commit Bot 2015-06-09 11:02:17 PDT
Comment on attachment 254547 [details]
Patch

Clearing flags on attachment: 254547

Committed r185367: <http://trac.webkit.org/changeset/185367>
Comment 7 WebKit Commit Bot 2015-06-09 11:02:22 PDT
All reviewed patches have been landed.  Closing bug.