Bug 197765 - [JSC] String substring operation should return ropes consistently
Summary: [JSC] String substring operation should return ropes consistently
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-09 20:29 PDT by Yusuke Suzuki
Modified: 2019-05-13 16:43 PDT (History)
6 users (show)

See Also:


Attachments
Patch (6.36 KB, patch)
2019-05-09 20:42 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (7.02 KB, patch)
2019-05-10 10:41 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (7.03 KB, patch)
2019-05-10 12:31 PDT, Yusuke Suzuki
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2019-05-09 20:29:14 PDT
[JSC] String substring operation should return ropes consistently
Comment 1 Yusuke Suzuki 2019-05-09 20:42:34 PDT
Created attachment 369541 [details]
Patch
Comment 2 Yusuke Suzuki 2019-05-10 10:04:15 PDT
<rdar://problem/37689944>
Comment 3 Yusuke Suzuki 2019-05-10 10:41:38 PDT
Created attachment 369564 [details]
Patch
Comment 4 Yusuke Suzuki 2019-05-10 12:31:51 PDT
Created attachment 369580 [details]
Patch
Comment 5 Michael Saboff 2019-05-10 12:45:31 PDT
Comment on attachment 369580 [details]
Patch

r=me
Comment 6 Yusuke Suzuki 2019-05-10 13:49:43 PDT
Committed r245194: <https://trac.webkit.org/changeset/245194>
Comment 7 Yusuke Suzuki 2019-05-13 16:43:35 PDT
Ah, my investigation was wrong.
While memory reduction is real, the effect comes from the fact that JSRopeString is cheaper than JSString + StringImpl. Not related StringImpl's substring sharing feature.
So, maybe, we should just prefer JSRopeString for substring cases.