<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[225150] trunk/Source/JavaScriptCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/225150">225150</a></dd>
<dt>Author</dt> <dd>utatane.tea@gmail.com</dd>
<dt>Date</dt> <dd>2017-11-26 17:22:43 -0800 (Sun, 26 Nov 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[JSC] Remove JSStringBuilder
https://bugs.webkit.org/show_bug.cgi?id=180016

Reviewed by Saam Barati.

JSStringBuilder is replaced with WTF::StringBuilder.
This patch removes remaning uses and drop JSStringBuilder.

* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/ArrayPrototype.cpp:
* runtime/AsyncFunctionPrototype.cpp:
* runtime/AsyncGeneratorFunctionPrototype.cpp:
* runtime/ErrorPrototype.cpp:
* runtime/FunctionPrototype.cpp:
* runtime/GeneratorFunctionPrototype.cpp:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::decode):
(JSC::globalFuncEscape):
* runtime/JSStringBuilder.h: Removed.
* runtime/JSStringInlines.h:
(JSC::jsMakeNontrivialString):
* runtime/RegExpPrototype.cpp:
* runtime/StringPrototype.cpp:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeArrayPrototypecpp">trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeAsyncFunctionPrototypecpp">trunk/Source/JavaScriptCore/runtime/AsyncFunctionPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeAsyncGeneratorFunctionPrototypecpp">trunk/Source/JavaScriptCore/runtime/AsyncGeneratorFunctionPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeErrorPrototypecpp">trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeFunctionPrototypecpp">trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeGeneratorFunctionPrototypecpp">trunk/Source/JavaScriptCore/runtime/GeneratorFunctionPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectFunctionscpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSStringInlinesh">trunk/Source/JavaScriptCore/runtime/JSStringInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRegExpPrototypecpp">trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeStringPrototypecpp">trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSStringBuilderh">trunk/Source/JavaScriptCore/runtime/JSStringBuilder.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog    2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/ChangeLog       2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -1,5 +1,31 @@
</span><span class="cx"> 2017-11-26  Yusuke Suzuki  <utatane.tea@gmail.com>
</span><span class="cx"> 
</span><ins>+        [JSC] Remove JSStringBuilder
+        https://bugs.webkit.org/show_bug.cgi?id=180016
+
+        Reviewed by Saam Barati.
+
+        JSStringBuilder is replaced with WTF::StringBuilder.
+        This patch removes remaning uses and drop JSStringBuilder.
+
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * runtime/ArrayPrototype.cpp:
+        * runtime/AsyncFunctionPrototype.cpp:
+        * runtime/AsyncGeneratorFunctionPrototype.cpp:
+        * runtime/ErrorPrototype.cpp:
+        * runtime/FunctionPrototype.cpp:
+        * runtime/GeneratorFunctionPrototype.cpp:
+        * runtime/JSGlobalObjectFunctions.cpp:
+        (JSC::decode):
+        (JSC::globalFuncEscape):
+        * runtime/JSStringBuilder.h: Removed.
+        * runtime/JSStringInlines.h:
+        (JSC::jsMakeNontrivialString):
+        * runtime/RegExpPrototype.cpp:
+        * runtime/StringPrototype.cpp:
+
+2017-11-26  Yusuke Suzuki  <utatane.tea@gmail.com>
+
</ins><span class="cx">         [DFG] Remove GetLocalUnlinked
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=180017
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj     2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -1151,7 +1151,6 @@
</span><span class="cx">          86E3C619167BABEE006D760A /* JSWrapperMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C60C167BAB87006D760A /* JSWrapperMap.h */; };
</span><span class="cx">          86E3C61B167BABEE006D760A /* JSValueInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C60E167BAB87006D760A /* JSValueInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          86E3C61D167BABEE006D760A /* JSVirtualMachineInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C611167BAB87006D760A /* JSVirtualMachineInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-               86E85539111B9968001AF51E /* JSStringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E85538111B9968001AF51E /* JSStringBuilder.h */; };
</del><span class="cx">           86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */; };
</span><span class="cx">          86EC9DC61328DF82002B2AD7 /* DFGGenerationInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */; };
</span><span class="cx">          86EC9DC81328DF82002B2AD7 /* DFGGraph.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB81328DF82002B2AD7 /* DFGGraph.h */; };
</span><span class="lines">@@ -3683,7 +3682,6 @@
</span><span class="cx">          86E3C60F167BAB87006D760A /* JSVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVirtualMachine.h; sourceTree = "<group>"; };
</span><span class="cx">          86E3C610167BAB87006D760A /* JSVirtualMachine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSVirtualMachine.mm; sourceTree = "<group>"; };
</span><span class="cx">          86E3C611167BAB87006D760A /* JSVirtualMachineInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVirtualMachineInternal.h; sourceTree = "<group>"; };
</span><del>-               86E85538111B9968001AF51E /* JSStringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStringBuilder.h; sourceTree = "<group>"; };
</del><span class="cx">           86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGByteCodeParser.cpp; path = dfg/DFGByteCodeParser.cpp; sourceTree = "<group>"; };
</span><span class="cx">          86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGByteCodeParser.h; path = dfg/DFGByteCodeParser.h; sourceTree = "<group>"; };
</span><span class="cx">          86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGGenerationInfo.h; path = dfg/DFGGenerationInfo.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -5852,14 +5850,14 @@
</span><span class="cx">                  isa = PBXGroup;
</span><span class="cx">                  children = (
</span><span class="cx">                          536B31981F735E5C0037FC33 /* UnifiedSource1-mm.mm */,
</span><ins>+                               536B30DA1F71C5380037FC33 /* UnifiedSource1.cpp */,
</ins><span class="cx">                           536B31961F735E5B0037FC33 /* UnifiedSource2-mm.mm */,
</span><ins>+                               536B30D21F71C5380037FC33 /* UnifiedSource2.cpp */,
</ins><span class="cx">                           530A66B11FA3E77A0026A545 /* UnifiedSource3-mm.mm */,
</span><ins>+                               536B30D31F71C5380037FC33 /* UnifiedSource3.cpp */,
</ins><span class="cx">                           530A66B81FA3E77E0026A545 /* UnifiedSource4-mm.mm */,
</span><ins>+                               536B30E11F71C5380037FC33 /* UnifiedSource4.cpp */,
</ins><span class="cx">                           530A66B51FA3E77D0026A545 /* UnifiedSource5-mm.mm */,
</span><del>-                               536B30DA1F71C5380037FC33 /* UnifiedSource1.cpp */,
-                               536B30D21F71C5380037FC33 /* UnifiedSource2.cpp */,
-                               536B30D31F71C5380037FC33 /* UnifiedSource3.cpp */,
-                               536B30E11F71C5380037FC33 /* UnifiedSource4.cpp */,
</del><span class="cx">                           536B30E21F71C5380037FC33 /* UnifiedSource5.cpp */,
</span><span class="cx">                          536B30EA1F71C5380037FC33 /* UnifiedSource6.cpp */,
</span><span class="cx">                          536B30E91F71C5380037FC33 /* UnifiedSource7.cpp */,
</span><span class="lines">@@ -6603,7 +6601,6 @@
</span><span class="cx">                          3032175DF1AD47D8998B34E1 /* JSSourceCode.h */,
</span><span class="cx">                          BC02E9B60E1842FA000F9297 /* JSString.cpp */,
</span><span class="cx">                          F692A8620255597D01FF60F7 /* JSString.h */,
</span><del>-                               86E85538111B9968001AF51E /* JSStringBuilder.h */,
</del><span class="cx">                           FEFD6FC51D5E7970008F2F0B /* JSStringInlines.h */,
</span><span class="cx">                          70EC0EBC1AA0D7DA00B6AAFA /* JSStringIterator.cpp */,
</span><span class="cx">                          70EC0EBD1AA0D7DA00B6AAFA /* JSStringIterator.h */,
</span><span class="lines">@@ -8855,7 +8852,6 @@
</span><span class="cx">                          A790DD70182F499700588807 /* JSSetIterator.h in Headers */,
</span><span class="cx">                          BDFCB2BBE90F41349E1B0BED /* JSSourceCode.h in Headers */,
</span><span class="cx">                          BC18C4270E16F5CD00B34460 /* JSString.h in Headers */,
</span><del>-                               86E85539111B9968001AF51E /* JSStringBuilder.h in Headers */,
</del><span class="cx">                           FEFD6FC61D5E7992008F2F0B /* JSStringInlines.h in Headers */,
</span><span class="cx">                          70EC0EC31AA0D7DA00B6AAFA /* JSStringIterator.h in Headers */,
</span><span class="cx">                          2600B5A7152BAAA70091EE5F /* JSStringJoiner.h in Headers */,
</span><span class="lines">@@ -9898,14 +9894,14 @@
</span><span class="cx">                          0FF42746158EBE91004CB9FF /* udis86_syn-intel.c in Sources */,
</span><span class="cx">                          0FF42747158EBE91004CB9FF /* udis86_syn.c in Sources */,
</span><span class="cx">                          536B319A1F735E780037FC33 /* UnifiedSource1-mm.mm in Sources */,
</span><ins>+                               536B315F1F71C5990037FC33 /* UnifiedSource1.cpp in Sources */,
</ins><span class="cx">                           536B319B1F735E780037FC33 /* UnifiedSource2-mm.mm in Sources */,
</span><ins>+                               536B31571F71C5990037FC33 /* UnifiedSource2.cpp in Sources */,
</ins><span class="cx">                           530A66B91FA3E78B0026A545 /* UnifiedSource3-mm.mm in Sources */,
</span><ins>+                               536B31581F71C5990037FC33 /* UnifiedSource3.cpp in Sources */,
</ins><span class="cx">                           530A66BA1FA3E78B0026A545 /* UnifiedSource4-mm.mm in Sources */,
</span><ins>+                               536B31661F71C5990037FC33 /* UnifiedSource4.cpp in Sources */,
</ins><span class="cx">                           530A66BB1FA3E78B0026A545 /* UnifiedSource5-mm.mm in Sources */,
</span><del>-                               536B315F1F71C5990037FC33 /* UnifiedSource1.cpp in Sources */,
-                               536B31571F71C5990037FC33 /* UnifiedSource2.cpp in Sources */,
-                               536B31581F71C5990037FC33 /* UnifiedSource3.cpp in Sources */,
-                               536B31661F71C5990037FC33 /* UnifiedSource4.cpp in Sources */,
</del><span class="cx">                           536B31671F71C5990037FC33 /* UnifiedSource5.cpp in Sources */,
</span><span class="cx">                          536B316F1F71C5990037FC33 /* UnifiedSource6.cpp in Sources */,
</span><span class="cx">                          536B316E1F71C5990037FC33 /* UnifiedSource7.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeArrayPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp   2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp      2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #include "JSArrayInlines.h"
</span><span class="cx"> #include "JSCBuiltins.h"
</span><span class="cx"> #include "JSCInlines.h"
</span><del>-#include "JSStringBuilder.h"
</del><span class="cx"> #include "JSStringJoiner.h"
</span><span class="cx"> #include "Lookup.h"
</span><span class="cx"> #include "ObjectConstructor.h"
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeAsyncFunctionPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/AsyncFunctionPrototype.cpp (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/AsyncFunctionPrototype.cpp   2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/runtime/AsyncFunctionPrototype.cpp      2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include "JSCInlines.h"
</span><span class="cx"> #include "JSFunction.h"
</span><span class="cx"> #include "JSString.h"
</span><del>-#include "JSStringBuilder.h"
</del><span class="cx"> #include "Lexer.h"
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeAsyncGeneratorFunctionPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/AsyncGeneratorFunctionPrototype.cpp (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/AsyncGeneratorFunctionPrototype.cpp  2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/runtime/AsyncGeneratorFunctionPrototype.cpp     2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include "JSCInlines.h"
</span><span class="cx"> #include "JSFunction.h"
</span><span class="cx"> #include "JSString.h"
</span><del>-#include "JSStringBuilder.h"
</del><span class="cx"> #include "Lexer.h"
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeErrorPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp   2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp      2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include "Error.h"
</span><span class="cx"> #include "JSFunction.h"
</span><del>-#include "JSString.h"
-#include "JSStringBuilder.h"
</del><ins>+#include "JSStringInlines.h"
</ins><span class="cx"> #include "ObjectPrototype.h"
</span><span class="cx"> #include "JSCInlines.h"
</span><span class="cx"> #include "StringRecursionChecker.h"
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeFunctionPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp        2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp   2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -25,15 +25,11 @@
</span><span class="cx"> #include "BuiltinNames.h"
</span><span class="cx"> #include "Error.h"
</span><span class="cx"> #include "GetterSetter.h"
</span><del>-#include "JSArray.h"
</del><span class="cx"> #include "JSAsyncFunction.h"
</span><ins>+#include "JSCInlines.h"
</ins><span class="cx"> #include "JSFunction.h"
</span><del>-#include "JSGlobalObjectFunctions.h"
-#include "JSString.h"
-#include "JSStringBuilder.h"
-#include "Interpreter.h"
</del><ins>+#include "JSStringInlines.h"
</ins><span class="cx"> #include "Lexer.h"
</span><del>-#include "JSCInlines.h"
</del><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeGeneratorFunctionPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/GeneratorFunctionPrototype.cpp (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/GeneratorFunctionPrototype.cpp       2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/runtime/GeneratorFunctionPrototype.cpp  2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include "JSCInlines.h"
</span><span class="cx"> #include "JSFunction.h"
</span><span class="cx"> #include "JSString.h"
</span><del>-#include "JSStringBuilder.h"
</del><span class="cx"> #include "Lexer.h"
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp  2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp     2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -39,7 +39,6 @@
</span><span class="cx"> #include "JSPromise.h"
</span><span class="cx"> #include "JSPromiseDeferred.h"
</span><span class="cx"> #include "JSString.h"
</span><del>-#include "JSStringBuilder.h"
</del><span class="cx"> #include "Lexer.h"
</span><span class="cx"> #include "LiteralParser.h"
</span><span class="cx"> #include "Nodes.h"
</span><span class="lines">@@ -172,7 +171,7 @@
</span><span class="cx">     VM& vm = exec->vm();
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><del>-    JSStringBuilder builder;
</del><ins>+    StringBuilder builder;
</ins><span class="cx">     int k = 0;
</span><span class="cx">     UChar u = 0;
</span><span class="cx">     while (k < length) {
</span><span class="lines">@@ -232,7 +231,7 @@
</span><span class="cx">         builder.append(c);
</span><span class="cx">     }
</span><span class="cx">     scope.release();
</span><del>-    return builder.build(exec);
</del><ins>+    return jsString(&vm, builder.toString());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static JSValue decode(ExecState* exec, const Bitmap<256>& doNotUnescape, bool strict)
</span><span class="lines">@@ -593,7 +592,7 @@
</span><span class="cx">     );
</span><span class="cx"> 
</span><span class="cx">     return JSValue::encode(toStringView(exec, exec->argument(0), [&] (StringView view) {
</span><del>-        JSStringBuilder builder;
</del><ins>+        StringBuilder builder;
</ins><span class="cx">         if (view.is8Bit()) {
</span><span class="cx">             const LChar* c = view.characters8();
</span><span class="cx">             for (unsigned k = 0; k < view.length(); k++, c++) {
</span><span class="lines">@@ -605,8 +604,7 @@
</span><span class="cx">                     appendByteAsHex(static_cast<LChar>(u), builder);
</span><span class="cx">                 }
</span><span class="cx">             }
</span><del>-
-            return builder.build(exec);
</del><ins>+            return jsString(exec, builder.toString());
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         const UChar* c = view.characters16();
</span><span class="lines">@@ -625,7 +623,7 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        return builder.build(exec);
</del><ins>+        return jsString(exec, builder.toString());
</ins><span class="cx">     }));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSStringBuilderh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/runtime/JSStringBuilder.h (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSStringBuilder.h    2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/runtime/JSStringBuilder.h       2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -1,139 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009-2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#pragma once
-
-#include "ExceptionHelpers.h"
-#include "JSString.h"
-#include <wtf/text/StringVector.h>
-
-namespace JSC {
-
-// FIXME: Should move the last few callers over from this to WTF::StringBuilder.
-class JSStringBuilder {
-public:
-    JSStringBuilder()
-        : m_okay(true)
-        , m_is8Bit(true)
-    {
-    }
-
-    void append(LChar character)
-    {
-        if (m_is8Bit) {
-            m_okay &= buffer8.tryAppend(&character, 1);
-            return;
-        }
-        UChar upconvertedCharacter = character;
-        m_okay &= buffer16.tryAppend(&upconvertedCharacter, 1);
-    }
-
-    void append(UChar character)
-    {
-        if (m_is8Bit) {
-            if (character < 0x100) {
-                LChar narrowedCharacter = character;
-                m_okay &= buffer8.tryAppend(&narrowedCharacter, 1);
-                return;
-            }
-            upConvert();
-        }
-        m_okay &= buffer16.tryAppend(&character, 1);
-    }
-
-    void append(const char* str)
-    {
-        append(reinterpret_cast<const LChar*>(str), strlen(str));
-    }
-
-    JSValue build(ExecState* exec)
-    {
-        VM& vm = exec->vm();
-        auto scope = DECLARE_THROW_SCOPE(vm);
-        if (!m_okay)
-            return throwOutOfMemoryError(exec, scope);
-        if (m_is8Bit) {
-            buffer8.shrinkToFit();
-            if (!buffer8.data())
-                return throwOutOfMemoryError(exec, scope);
-            return jsString(exec, String::adopt(WTFMove(buffer8)));
-        }
-        buffer16.shrinkToFit();
-        if (!buffer16.data())
-            return throwOutOfMemoryError(exec, scope);
-        return jsString(exec, String::adopt(WTFMove(buffer16)));
-    }
-
-private:
-    void append(const LChar* characters, size_t length)
-    {
-        if (m_is8Bit) {
-            m_okay &= buffer8.tryAppend(characters, length);
-            return;
-        }
-        // FIXME: There must be a more efficient way of doing this.
-        m_okay &= buffer16.tryReserveCapacity(buffer16.size() + length);
-        for (size_t i = 0; i < length; i++) {
-            UChar upconvertedCharacter = characters[i];
-            m_okay &= buffer16.tryAppend(&upconvertedCharacter, 1);
-        }
-    }
-
-    void upConvert()
-    {
-        ASSERT(m_is8Bit);
-        size_t len = buffer8.size();
-
-        for (size_t i = 0; i < len; i++)
-            buffer16.append(buffer8[i]);
-
-        buffer8.clear();
-        m_is8Bit = false;
-    }
-
-    StringVector<LChar, 64, UnsafeVectorOverflow> buffer8;
-    StringVector<UChar, 64, UnsafeVectorOverflow> buffer16;
-    bool m_okay;
-    bool m_is8Bit;
-};
-
-template<typename StringType>
-inline JSValue jsMakeNontrivialString(ExecState* exec, StringType&& string)
-{
-    return jsNontrivialString(exec, std::forward<StringType>(string));
-}
-
-template<typename StringType, typename... StringTypes>
-inline JSValue jsMakeNontrivialString(ExecState* exec, const StringType& string, const StringTypes&... strings)
-{
-    VM& vm = exec->vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-    String result = tryMakeString(string, strings...);
-    if (UNLIKELY(!result))
-        return throwOutOfMemoryError(exec, scope);
-    return jsNontrivialString(exec, WTFMove(result));
-}
-
-} // namespace JSC
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSStringInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSStringInlines.h (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSStringInlines.h    2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/runtime/JSStringInlines.h       2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -36,4 +36,21 @@
</span><span class="cx">     return WTF::equal(*m_value.impl(), *other->m_value.impl());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+template<typename StringType>
+inline JSValue jsMakeNontrivialString(ExecState* exec, StringType&& string)
+{
+    return jsNontrivialString(exec, std::forward<StringType>(string));
+}
+
+template<typename StringType, typename... StringTypes>
+inline JSValue jsMakeNontrivialString(ExecState* exec, StringType&& string, StringTypes&&... strings)
+{
+    VM& vm = exec->vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+    String result = tryMakeString(std::forward<StringType>(string), std::forward<StringTypes>(strings)...);
+    if (UNLIKELY(!result))
+        return throwOutOfMemoryError(exec, scope);
+    return jsNontrivialString(exec, WTFMove(result));
+}
+
</ins><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRegExpPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp  2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp     2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -30,8 +30,7 @@
</span><span class="cx"> #include "JSCJSValue.h"
</span><span class="cx"> #include "JSFunction.h"
</span><span class="cx"> #include "JSObject.h"
</span><del>-#include "JSString.h"
-#include "JSStringBuilder.h"
</del><ins>+#include "JSStringInlines.h"
</ins><span class="cx"> #include "Lexer.h"
</span><span class="cx"> #include "ObjectPrototype.h"
</span><span class="cx"> #include "RegExp.h"
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeStringPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp (225149 => 225150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp  2017-11-27 01:15:04 UTC (rev 225149)
+++ trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp     2017-11-27 01:22:43 UTC (rev 225150)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> #include "JSCInlines.h"
</span><span class="cx"> #include "JSFunction.h"
</span><span class="cx"> #include "JSGlobalObjectFunctions.h"
</span><del>-#include "JSStringBuilder.h"
</del><span class="cx"> #include "JSStringIterator.h"
</span><span class="cx"> #include "Lookup.h"
</span><span class="cx"> #include "ObjectPrototype.h"
</span></span></pre>
</div>
</div>

</body>
</html>