Bug 144985

Summary: String.prototype.split() should create efficient substrings.
Product: WebKit Reporter: Andreas Kling <kling>
Component: JavaScriptCoreAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ggaren, kling, oliver
Priority: P2 Keywords: InRadar, Performance
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ggaren: review+

Description Andreas Kling 2015-05-13 20:18:13 PDT
<rdar://problem/20949344>

String.prototype.split() should create JSStrings using the lazy substring optimization.
Comment 1 Andreas Kling 2015-05-13 20:21:33 PDT
Created attachment 253088 [details]
Patch
Comment 2 Geoffrey Garen 2015-05-14 11:10:03 PDT
Comment on attachment 253088 [details]
Patch

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

r=me

> Source/JavaScriptCore/runtime/StringPrototype.cpp:179
> +static inline JSString* jsSubstringWithSharing(ExecState* exec, JSValue originalValue, const String& string, unsigned offset, unsigned length)

I would just call this jsSubstring.
Comment 3 Andreas Kling 2015-05-14 12:08:56 PDT
Committed r184346: <http://trac.webkit.org/changeset/184346>