Bug 32136

Summary: Add a rope representation to JSString.
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: JavaScriptCoreAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
The Patch
none
Add back an export accidentally deleted. oliver: review+

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.