Bug 145131 - Give JSString a StringView getter and start using it.
Summary: Give JSString a StringView getter and start using it.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2015-05-18 10:17 PDT by Andreas Kling
Modified: 2015-05-19 10:06 PDT (History)
4 users (show)

See Also:


Attachments
Patch (10.75 KB, patch)
2015-05-18 10:19 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.