Bug 32136 - Add a rope representation to JSString.
Summary: Add a rope representation to JSString.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-03 15:54 PST by Gavin Barraclough
Modified: 2009-12-03 18:15 PST (History)
1 user (show)

See Also:


Attachments
The Patch (25.02 KB, patch)
2009-12-03 16:02 PST, Gavin Barraclough
no flags Details | Formatted Diff | Diff
Add back an export accidentally deleted. (24.80 KB, patch)
2009-12-03 16:04 PST, Gavin Barraclough
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2009-12-03 15:54:39 PST
Add a rope representation to JSString.  Presently JSString always holds its data in UString form.  Instead, allow the result of a string concatenation to be represented in a tree form - with a variable sized, reference-counted rope node retaining a set of UString::Reps (or other rope nopes).

Strings must still currently be resolved down to a flat UString representation before being used, but by holding the string in a rope representation during construction we can avoid copying data until we know the final size of the string.
Comment 1 Gavin Barraclough 2009-12-03 16:02:12 PST
Created attachment 44274 [details]
The Patch
Comment 2 Gavin Barraclough 2009-12-03 16:04:40 PST
Created attachment 44275 [details]
Add back an export accidentally deleted.
Comment 3 WebKit Review Bot 2009-12-03 16:06:36 PST
Attachment 44275 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
JavaScriptCore/runtime/JSString.h:163:  More than one command on the same line  [whitespace/newline] [4]
JavaScriptCore/runtime/JSString.h:164:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 2
Comment 4 Oliver Hunt 2009-12-03 16:52:38 PST
Comment on attachment 44275 [details]
Add back an export accidentally deleted.

r=me
Comment 5 Gavin Barraclough 2009-12-03 18:15:45 PST
Sending        JavaScriptCore/ChangeLog
Sending        JavaScriptCore/JavaScriptCore.exp
Sending        JavaScriptCore/interpreter/Interpreter.cpp
Sending        JavaScriptCore/jit/JITOpcodes.cpp
Sending        JavaScriptCore/jit/JITStubs.cpp
Sending        JavaScriptCore/runtime/JSString.cpp
Sending        JavaScriptCore/runtime/JSString.h
Sending        JavaScriptCore/runtime/Operations.h
Sending        JavaScriptCore/runtime/StringObject.cpp
Transmitting file data .........
Committed revision 51671.