Bug 145131

Summary: Give JSString a StringView getter and start using it.
Product: WebKit Reporter: Andreas Kling <kling>
Component: JavaScriptCoreAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, darin, ggaren
Priority: P2 Keywords: Performance
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2015-05-18 10:17:06 PDT
JSString should have a StringView getter so that we don't always have to reify JSStrings that are secretly substrings internally.
Comment 1 Andreas Kling 2015-05-18 10:19:29 PDT
Created attachment 253330 [details]
Patch
Comment 2 Darin Adler 2015-05-19 09:20:49 PDT
Comment on attachment 253330 [details]
Patch

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

> Source/JavaScriptCore/runtime/JSString.h:712
> +    return StringView(m_value);

Surprised this requires an explicit conversion. Would just returning m_value work?

> Source/JavaScriptCore/runtime/JSString.h:719
> +    return StringView(m_value);

Surprised this requires an explicit conversion. Would just returning m_value work?
Comment 3 WebKit Commit Bot 2015-05-19 10:06:33 PDT
Comment on attachment 253330 [details]
Patch

Clearing flags on attachment: 253330

Committed r184575: <http://trac.webkit.org/changeset/184575>
Comment 4 WebKit Commit Bot 2015-05-19 10:06:41 PDT
All reviewed patches have been landed.  Closing bug.