<!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>[56560] trunk</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/56560">56560</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2010-03-25 11:20:17 -0700 (Thu, 25 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Bug 36611 - Cleanup JSC::CString
Rename CString::c_str() -&gt; CString::data(), CString::size() -&gt; CString::length(),
remove UString::getCString() (all uses are wrong, should use UString::UTF8String()).

Reviewed by Geoff Garen.

JavaScriptCore: 

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printUnaryOp):
(JSC::CodeBlock::printBinaryOp):
(JSC::CodeBlock::printConditionalJump):
(JSC::CodeBlock::printGetByIdOp):
(JSC::CodeBlock::printPutByIdOp):
(JSC::printGlobalResolveInfo):
(JSC::printStructureStubInfo):
(JSC::CodeBlock::printStructure):
(JSC::CodeBlock::printStructures):
(JSC::CodeBlock::dump):
* jsc.cpp:
(functionPrint):
(functionDebug):
(runInteractive):
(fillBufferWithContentsOfFile):
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::c_str):
* profiler/Profile.cpp:
(JSC::Profile::debugPrintDataSampleStyle):
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::debugPrintData):
(JSC::ProfileNode::debugPrintDataSampleStyle):
* runtime/DateConversion.cpp:
(JSC::parseDate):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::globalFuncJSCPrint):
* runtime/UString.cpp:
(JSC::operator==):
(JSC::UString::toDouble):
* runtime/UString.h:
(JSC::CString::length):
(JSC::CString::data):

WebCore: 

* bridge/NP_jsobject.cpp:
(_NPN_Enumerate):
* bridge/c/c_utility.cpp:
(JSC::Bindings::convertValueToNPVariant):
* bridge/jni/jsc/JNIBridgeJSC.cpp:
(JavaField::valueFromInstance):
(JavaField::setValueToInstance):
* bridge/jni/jsc/JavaInstanceJSC.cpp:
(JavaInstance::invokeMethod):
* bridge/jni/jsc/JavaStringJSC.h:
(JSC::Bindings::JavaStringImpl::UTF8String):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkJavaScriptCoreChangeLog">trunk/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkJavaScriptCorebytecodeCodeBlockcpp">trunk/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkJavaScriptCorejsccpp">trunk/JavaScriptCore/jsc.cpp</a></li>
<li><a href="#trunkJavaScriptCoreprofilerCallIdentifierh">trunk/JavaScriptCore/profiler/CallIdentifier.h</a></li>
<li><a href="#trunkJavaScriptCoreprofilerProfilecpp">trunk/JavaScriptCore/profiler/Profile.cpp</a></li>
<li><a href="#trunkJavaScriptCoreprofilerProfileNodecpp">trunk/JavaScriptCore/profiler/ProfileNode.cpp</a></li>
<li><a href="#trunkJavaScriptCoreruntimeDateConversioncpp">trunk/JavaScriptCore/runtime/DateConversion.cpp</a></li>
<li><a href="#trunkJavaScriptCoreruntimeJSGlobalObjectFunctionscpp">trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp</a></li>
<li><a href="#trunkJavaScriptCoreruntimeUStringcpp">trunk/JavaScriptCore/runtime/UString.cpp</a></li>
<li><a href="#trunkJavaScriptCoreruntimeUStringh">trunk/JavaScriptCore/runtime/UString.h</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorebridgeNP_jsobjectcpp">trunk/WebCore/bridge/NP_jsobject.cpp</a></li>
<li><a href="#trunkWebCorebridgecc_utilitycpp">trunk/WebCore/bridge/c/c_utility.cpp</a></li>
<li><a href="#trunkWebCorebridgejnijscJNIBridgeJSCcpp">trunk/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp</a></li>
<li><a href="#trunkWebCorebridgejnijscJavaInstanceJSCcpp">trunk/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp</a></li>
<li><a href="#trunkWebCorebridgejnijscJavaStringJSCh">trunk/WebCore/bridge/jni/jsc/JavaStringJSC.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/ChangeLog (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/ChangeLog        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/JavaScriptCore/ChangeLog        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2010-03-25  Gavin Barraclough  &lt;barraclough@apple.com&gt;
+
+        Reviewed by Geoff Garen.
+
+        Bug 36611 - Cleanup JSC::CString
+        Rename CString::c_str() -&gt; CString::data(), CString::size() -&gt; CString::length(),
+        remove UString::getCString() (all uses are wrong, should use UString::UTF8String()).
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::printUnaryOp):
+        (JSC::CodeBlock::printBinaryOp):
+        (JSC::CodeBlock::printConditionalJump):
+        (JSC::CodeBlock::printGetByIdOp):
+        (JSC::CodeBlock::printPutByIdOp):
+        (JSC::printGlobalResolveInfo):
+        (JSC::printStructureStubInfo):
+        (JSC::CodeBlock::printStructure):
+        (JSC::CodeBlock::printStructures):
+        (JSC::CodeBlock::dump):
+        * jsc.cpp:
+        (functionPrint):
+        (functionDebug):
+        (runInteractive):
+        (fillBufferWithContentsOfFile):
+        * profiler/CallIdentifier.h:
+        (JSC::CallIdentifier::c_str):
+        * profiler/Profile.cpp:
+        (JSC::Profile::debugPrintDataSampleStyle):
+        * profiler/ProfileNode.cpp:
+        (JSC::ProfileNode::debugPrintData):
+        (JSC::ProfileNode::debugPrintDataSampleStyle):
+        * runtime/DateConversion.cpp:
+        (JSC::parseDate):
+        * runtime/JSGlobalObjectFunctions.cpp:
+        (JSC::encode):
+        (JSC::globalFuncJSCPrint):
+        * runtime/UString.cpp:
+        (JSC::operator==):
+        (JSC::UString::toDouble):
+        * runtime/UString.h:
+        (JSC::CString::length):
+        (JSC::CString::data):
+
</ins><span class="cx"> 2010-03-25  Jocelyn Turcotte  &lt;jocelyn.turcotte@nokia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by nobody, build fix.
</span></span></pre></div>
<a id="trunkJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/bytecode/CodeBlock.cpp (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/bytecode/CodeBlock.cpp        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/JavaScriptCore/bytecode/CodeBlock.cpp        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx">     int r0 = (++it)-&gt;u.operand;
</span><span class="cx">     int r1 = (++it)-&gt;u.operand;
</span><span class="cx"> 
</span><del>-    printf(&quot;[%4d] %s\t\t %s, %s\n&quot;, location, op, registerName(exec, r0).c_str(), registerName(exec, r1).c_str());
</del><ins>+    printf(&quot;[%4d] %s\t\t %s, %s\n&quot;, location, op, registerName(exec, r0).data(), registerName(exec, r1).data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CodeBlock::printBinaryOp(ExecState* exec, int location, Vector&lt;Instruction&gt;::const_iterator&amp; it, const char* op) const
</span><span class="lines">@@ -149,14 +149,14 @@
</span><span class="cx">     int r0 = (++it)-&gt;u.operand;
</span><span class="cx">     int r1 = (++it)-&gt;u.operand;
</span><span class="cx">     int r2 = (++it)-&gt;u.operand;
</span><del>-    printf(&quot;[%4d] %s\t\t %s, %s, %s\n&quot;, location, op, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str());
</del><ins>+    printf(&quot;[%4d] %s\t\t %s, %s, %s\n&quot;, location, op, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CodeBlock::printConditionalJump(ExecState* exec, const Vector&lt;Instruction&gt;::const_iterator&amp;, Vector&lt;Instruction&gt;::const_iterator&amp; it, int location, const char* op) const
</span><span class="cx"> {
</span><span class="cx">     int r0 = (++it)-&gt;u.operand;
</span><span class="cx">     int offset = (++it)-&gt;u.operand;
</span><del>-    printf(&quot;[%4d] %s\t\t %s, %d(-&gt;%d)\n&quot;, location, op, registerName(exec, r0).c_str(), offset, location + offset);
</del><ins>+    printf(&quot;[%4d] %s\t\t %s, %d(-&gt;%d)\n&quot;, location, op, registerName(exec, r0).data(), offset, location + offset);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CodeBlock::printGetByIdOp(ExecState* exec, int location, Vector&lt;Instruction&gt;::const_iterator&amp; it, const char* op) const
</span><span class="lines">@@ -164,7 +164,7 @@
</span><span class="cx">     int r0 = (++it)-&gt;u.operand;
</span><span class="cx">     int r1 = (++it)-&gt;u.operand;
</span><span class="cx">     int id0 = (++it)-&gt;u.operand;
</span><del>-    printf(&quot;[%4d] %s\t %s, %s, %s\n&quot;, location, op, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str());
</del><ins>+    printf(&quot;[%4d] %s\t %s, %s, %s\n&quot;, location, op, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data());
</ins><span class="cx">     it += 4;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx">     int r0 = (++it)-&gt;u.operand;
</span><span class="cx">     int id0 = (++it)-&gt;u.operand;
</span><span class="cx">     int r1 = (++it)-&gt;u.operand;
</span><del>-    printf(&quot;[%4d] %s\t %s, %s, %s\n&quot;, location, op, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str());
</del><ins>+    printf(&quot;[%4d] %s\t %s, %s, %s\n&quot;, location, op, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data());
</ins><span class="cx">     it += 4;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -223,32 +223,32 @@
</span><span class="cx"> 
</span><span class="cx"> static void printGlobalResolveInfo(const GlobalResolveInfo&amp; resolveInfo, unsigned instructionOffset)
</span><span class="cx"> {
</span><del>-    printf(&quot;  [%4d] %s: %s\n&quot;, instructionOffset, &quot;resolve_global&quot;, pointerToSourceString(resolveInfo.structure).UTF8String().c_str());
</del><ins>+    printf(&quot;  [%4d] %s: %s\n&quot;, instructionOffset, &quot;resolve_global&quot;, pointerToSourceString(resolveInfo.structure).UTF8String().data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void printStructureStubInfo(const StructureStubInfo&amp; stubInfo, unsigned instructionOffset)
</span><span class="cx"> {
</span><span class="cx">     switch (stubInfo.accessType) {
</span><span class="cx">     case access_get_by_id_self:
</span><del>-        printf(&quot;  [%4d] %s: %s\n&quot;, instructionOffset, &quot;get_by_id_self&quot;, pointerToSourceString(stubInfo.u.getByIdSelf.baseObjectStructure).UTF8String().c_str());
</del><ins>+        printf(&quot;  [%4d] %s: %s\n&quot;, instructionOffset, &quot;get_by_id_self&quot;, pointerToSourceString(stubInfo.u.getByIdSelf.baseObjectStructure).UTF8String().data());
</ins><span class="cx">         return;
</span><span class="cx">     case access_get_by_id_proto:
</span><del>-        printf(&quot;  [%4d] %s: %s, %s\n&quot;, instructionOffset, &quot;get_by_id_proto&quot;, pointerToSourceString(stubInfo.u.getByIdProto.baseObjectStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.getByIdProto.prototypeStructure).UTF8String().c_str());
</del><ins>+        printf(&quot;  [%4d] %s: %s, %s\n&quot;, instructionOffset, &quot;get_by_id_proto&quot;, pointerToSourceString(stubInfo.u.getByIdProto.baseObjectStructure).UTF8String().data(), pointerToSourceString(stubInfo.u.getByIdProto.prototypeStructure).UTF8String().data());
</ins><span class="cx">         return;
</span><span class="cx">     case access_get_by_id_chain:
</span><del>-        printf(&quot;  [%4d] %s: %s, %s\n&quot;, instructionOffset, &quot;get_by_id_chain&quot;, pointerToSourceString(stubInfo.u.getByIdChain.baseObjectStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.getByIdChain.chain).UTF8String().c_str());
</del><ins>+        printf(&quot;  [%4d] %s: %s, %s\n&quot;, instructionOffset, &quot;get_by_id_chain&quot;, pointerToSourceString(stubInfo.u.getByIdChain.baseObjectStructure).UTF8String().data(), pointerToSourceString(stubInfo.u.getByIdChain.chain).UTF8String().data());
</ins><span class="cx">         return;
</span><span class="cx">     case access_get_by_id_self_list:
</span><del>-        printf(&quot;  [%4d] %s: %s (%d)\n&quot;, instructionOffset, &quot;op_get_by_id_self_list&quot;, pointerToSourceString(stubInfo.u.getByIdSelfList.structureList).UTF8String().c_str(), stubInfo.u.getByIdSelfList.listSize);
</del><ins>+        printf(&quot;  [%4d] %s: %s (%d)\n&quot;, instructionOffset, &quot;op_get_by_id_self_list&quot;, pointerToSourceString(stubInfo.u.getByIdSelfList.structureList).UTF8String().data(), stubInfo.u.getByIdSelfList.listSize);
</ins><span class="cx">         return;
</span><span class="cx">     case access_get_by_id_proto_list:
</span><del>-        printf(&quot;  [%4d] %s: %s (%d)\n&quot;, instructionOffset, &quot;op_get_by_id_proto_list&quot;, pointerToSourceString(stubInfo.u.getByIdProtoList.structureList).UTF8String().c_str(), stubInfo.u.getByIdProtoList.listSize);
</del><ins>+        printf(&quot;  [%4d] %s: %s (%d)\n&quot;, instructionOffset, &quot;op_get_by_id_proto_list&quot;, pointerToSourceString(stubInfo.u.getByIdProtoList.structureList).UTF8String().data(), stubInfo.u.getByIdProtoList.listSize);
</ins><span class="cx">         return;
</span><span class="cx">     case access_put_by_id_transition:
</span><del>-        printf(&quot;  [%4d] %s: %s, %s, %s\n&quot;, instructionOffset, &quot;put_by_id_transition&quot;, pointerToSourceString(stubInfo.u.putByIdTransition.previousStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.putByIdTransition.structure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.putByIdTransition.chain).UTF8String().c_str());
</del><ins>+        printf(&quot;  [%4d] %s: %s, %s, %s\n&quot;, instructionOffset, &quot;put_by_id_transition&quot;, pointerToSourceString(stubInfo.u.putByIdTransition.previousStructure).UTF8String().data(), pointerToSourceString(stubInfo.u.putByIdTransition.structure).UTF8String().data(), pointerToSourceString(stubInfo.u.putByIdTransition.chain).UTF8String().data());
</ins><span class="cx">         return;
</span><span class="cx">     case access_put_by_id_replace:
</span><del>-        printf(&quot;  [%4d] %s: %s\n&quot;, instructionOffset, &quot;put_by_id_replace&quot;, pointerToSourceString(stubInfo.u.putByIdReplace.baseObjectStructure).UTF8String().c_str());
</del><ins>+        printf(&quot;  [%4d] %s: %s\n&quot;, instructionOffset, &quot;put_by_id_replace&quot;, pointerToSourceString(stubInfo.u.putByIdReplace.baseObjectStructure).UTF8String().data());
</ins><span class="cx">         return;
</span><span class="cx">     case access_get_by_id:
</span><span class="cx">         printf(&quot;  [%4d] %s\n&quot;, instructionOffset, &quot;get_by_id&quot;);
</span><span class="lines">@@ -277,7 +277,7 @@
</span><span class="cx"> void CodeBlock::printStructure(const char* name, const Instruction* vPC, int operand) const
</span><span class="cx"> {
</span><span class="cx">     unsigned instructionOffset = vPC - m_instructions.begin();
</span><del>-    printf(&quot;  [%4d] %s: %s\n&quot;, instructionOffset, name, pointerToSourceString(vPC[operand].u.structure).UTF8String().c_str());
</del><ins>+    printf(&quot;  [%4d] %s: %s\n&quot;, instructionOffset, name, pointerToSourceString(vPC[operand].u.structure).UTF8String().data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CodeBlock::printStructures(const Instruction* vPC) const
</span><span class="lines">@@ -294,15 +294,15 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     if (vPC[0].u.opcode == interpreter-&gt;getOpcode(op_get_by_id_proto)) {
</span><del>-        printf(&quot;  [%4d] %s: %s, %s\n&quot;, instructionOffset, &quot;get_by_id_proto&quot;, pointerToSourceString(vPC[4].u.structure).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structure).UTF8String().c_str());
</del><ins>+        printf(&quot;  [%4d] %s: %s, %s\n&quot;, instructionOffset, &quot;get_by_id_proto&quot;, pointerToSourceString(vPC[4].u.structure).UTF8String().data(), pointerToSourceString(vPC[5].u.structure).UTF8String().data());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     if (vPC[0].u.opcode == interpreter-&gt;getOpcode(op_put_by_id_transition)) {
</span><del>-        printf(&quot;  [%4d] %s: %s, %s, %s\n&quot;, instructionOffset, &quot;put_by_id_transition&quot;, pointerToSourceString(vPC[4].u.structure).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structure).UTF8String().c_str(), pointerToSourceString(vPC[6].u.structureChain).UTF8String().c_str());
</del><ins>+        printf(&quot;  [%4d] %s: %s, %s, %s\n&quot;, instructionOffset, &quot;put_by_id_transition&quot;, pointerToSourceString(vPC[4].u.structure).UTF8String().data(), pointerToSourceString(vPC[5].u.structure).UTF8String().data(), pointerToSourceString(vPC[6].u.structureChain).UTF8String().data());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     if (vPC[0].u.opcode == interpreter-&gt;getOpcode(op_get_by_id_chain)) {
</span><del>-        printf(&quot;  [%4d] %s: %s, %s\n&quot;, instructionOffset, &quot;get_by_id_chain&quot;, pointerToSourceString(vPC[4].u.structure).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structureChain).UTF8String().c_str());
</del><ins>+        printf(&quot;  [%4d] %s: %s, %s\n&quot;, instructionOffset, &quot;get_by_id_chain&quot;, pointerToSourceString(vPC[4].u.structure).UTF8String().data(), pointerToSourceString(vPC[5].u.structureChain).UTF8String().data());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     if (vPC[0].u.opcode == interpreter-&gt;getOpcode(op_put_by_id)) {
</span><span class="lines">@@ -482,7 +482,7 @@
</span><span class="cx">         }
</span><span class="cx">         case op_enter_with_activation: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] enter_with_activation %s\n&quot;, location, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] enter_with_activation %s\n&quot;, location, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_create_arguments: {
</span><span class="lines">@@ -495,31 +495,31 @@
</span><span class="cx">         }
</span><span class="cx">         case op_convert_this: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] convert_this %s\n&quot;, location, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] convert_this %s\n&quot;, location, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_new_object: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] new_object\t %s\n&quot;, location, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] new_object\t %s\n&quot;, location, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_new_array: {
</span><span class="cx">             int dst = (++it)-&gt;u.operand;
</span><span class="cx">             int argv = (++it)-&gt;u.operand;
</span><span class="cx">             int argc = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] new_array\t %s, %s, %d\n&quot;, location, registerName(exec, dst).c_str(), registerName(exec, argv).c_str(), argc);
</del><ins>+            printf(&quot;[%4d] new_array\t %s, %s, %d\n&quot;, location, registerName(exec, dst).data(), registerName(exec, argv).data(), argc);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_new_regexp: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int re0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] new_regexp\t %s, %s\n&quot;, location, registerName(exec, r0).c_str(), regexpName(re0, regexp(re0)).c_str());
</del><ins>+            printf(&quot;[%4d] new_regexp\t %s, %s\n&quot;, location, registerName(exec, r0).data(), regexpName(re0, regexp(re0)).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_mov: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] mov\t\t %s, %s\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str());
</del><ins>+            printf(&quot;[%4d] mov\t\t %s, %s\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_not: {
</span><span class="lines">@@ -560,12 +560,12 @@
</span><span class="cx">         }
</span><span class="cx">         case op_pre_inc: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] pre_inc\t\t %s\n&quot;, location, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] pre_inc\t\t %s\n&quot;, location, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_pre_dec: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] pre_dec\t\t %s\n&quot;, location, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] pre_dec\t\t %s\n&quot;, location, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_post_inc: {
</span><span class="lines">@@ -644,7 +644,7 @@
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int r2 = (++it)-&gt;u.operand;
</span><span class="cx">             int r3 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] instanceof\t\t %s, %s, %s, %s\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str());
</del><ins>+            printf(&quot;[%4d] instanceof\t\t %s, %s, %s, %s\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), registerName(exec, r3).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_typeof: {
</span><span class="lines">@@ -682,21 +682,21 @@
</span><span class="cx">         case op_resolve: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int id0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] resolve\t\t %s, %s\n&quot;, location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str());
</del><ins>+            printf(&quot;[%4d] resolve\t\t %s, %s\n&quot;, location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_resolve_skip: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int id0 = (++it)-&gt;u.operand;
</span><span class="cx">             int skipLevels = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] resolve_skip\t %s, %s, %d\n&quot;, location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), skipLevels);
</del><ins>+            printf(&quot;[%4d] resolve_skip\t %s, %s, %d\n&quot;, location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), skipLevels);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_resolve_global: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             JSValue scope = JSValue((++it)-&gt;u.jsCell);
</span><span class="cx">             int id0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] resolve_global\t %s, %s, %s\n&quot;, location, registerName(exec, r0).c_str(), valueToSourceString(exec, scope).ascii(), idName(id0, m_identifiers[id0]).c_str());
</del><ins>+            printf(&quot;[%4d] resolve_global\t %s, %s, %s\n&quot;, location, registerName(exec, r0).data(), valueToSourceString(exec, scope).ascii(), idName(id0, m_identifiers[id0]).data());
</ins><span class="cx">             it += 2;
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -704,41 +704,41 @@
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int index = (++it)-&gt;u.operand;
</span><span class="cx">             int skipLevels = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] get_scoped_var\t %s, %d, %d\n&quot;, location, registerName(exec, r0).c_str(), index, skipLevels);
</del><ins>+            printf(&quot;[%4d] get_scoped_var\t %s, %d, %d\n&quot;, location, registerName(exec, r0).data(), index, skipLevels);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_put_scoped_var: {
</span><span class="cx">             int index = (++it)-&gt;u.operand;
</span><span class="cx">             int skipLevels = (++it)-&gt;u.operand;
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] put_scoped_var\t %d, %d, %s\n&quot;, location, index, skipLevels, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] put_scoped_var\t %d, %d, %s\n&quot;, location, index, skipLevels, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_get_global_var: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             JSValue scope = JSValue((++it)-&gt;u.jsCell);
</span><span class="cx">             int index = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] get_global_var\t %s, %s, %d\n&quot;, location, registerName(exec, r0).c_str(), valueToSourceString(exec, scope).ascii(), index);
</del><ins>+            printf(&quot;[%4d] get_global_var\t %s, %s, %d\n&quot;, location, registerName(exec, r0).data(), valueToSourceString(exec, scope).ascii(), index);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_put_global_var: {
</span><span class="cx">             JSValue scope = JSValue((++it)-&gt;u.jsCell);
</span><span class="cx">             int index = (++it)-&gt;u.operand;
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] put_global_var\t %s, %d, %s\n&quot;, location, valueToSourceString(exec, scope).ascii(), index, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] put_global_var\t %s, %d, %s\n&quot;, location, valueToSourceString(exec, scope).ascii(), index, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_resolve_base: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int id0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] resolve_base\t %s, %s\n&quot;, location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str());
</del><ins>+            printf(&quot;[%4d] resolve_base\t %s, %s\n&quot;, location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_resolve_with_base: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int id0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] resolve_with_base %s, %s, %s\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str());
</del><ins>+            printf(&quot;[%4d] resolve_with_base %s, %s, %s\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_get_by_id: {
</span><span class="lines">@@ -837,14 +837,14 @@
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int id0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] put_getter\t %s, %s, %s\n&quot;, location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str());
</del><ins>+            printf(&quot;[%4d] put_getter\t %s, %s, %s\n&quot;, location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_put_setter: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int id0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] put_setter\t %s, %s, %s\n&quot;, location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str());
</del><ins>+            printf(&quot;[%4d] put_setter\t %s, %s, %s\n&quot;, location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_method_check: {
</span><span class="lines">@@ -855,14 +855,14 @@
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int id0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] del_by_id\t %s, %s, %s\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str());
</del><ins>+            printf(&quot;[%4d] del_by_id\t %s, %s, %s\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_get_by_val: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int r2 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] get_by_val\t %s, %s, %s\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str());
</del><ins>+            printf(&quot;[%4d] get_by_val\t %s, %s, %s\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_get_by_pname: {
</span><span class="lines">@@ -872,28 +872,28 @@
</span><span class="cx">             int r3 = (++it)-&gt;u.operand;
</span><span class="cx">             int r4 = (++it)-&gt;u.operand;
</span><span class="cx">             int r5 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] get_by_pname\t %s, %s, %s, %s, %s, %s\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str(), registerName(exec, r4).c_str(), registerName(exec, r5).c_str());
</del><ins>+            printf(&quot;[%4d] get_by_pname\t %s, %s, %s, %s, %s, %s\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), registerName(exec, r3).data(), registerName(exec, r4).data(), registerName(exec, r5).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_put_by_val: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int r2 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] put_by_val\t %s, %s, %s\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str());
</del><ins>+            printf(&quot;[%4d] put_by_val\t %s, %s, %s\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_del_by_val: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int r2 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] del_by_val\t %s, %s, %s\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str());
</del><ins>+            printf(&quot;[%4d] del_by_val\t %s, %s, %s\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_put_by_index: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             unsigned n0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] put_by_index\t %s, %u, %s\n&quot;, location, registerName(exec, r0).c_str(), n0, registerName(exec, r1).c_str());
</del><ins>+            printf(&quot;[%4d] put_by_index\t %s, %u, %s\n&quot;, location, registerName(exec, r0).data(), n0, registerName(exec, r1).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_jmp: {
</span><span class="lines">@@ -934,75 +934,75 @@
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int offset = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] jneq_ptr\t\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset);
</del><ins>+            printf(&quot;[%4d] jneq_ptr\t\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_jnless: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int offset = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] jnless\t\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset);
</del><ins>+            printf(&quot;[%4d] jnless\t\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_jnlesseq: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int offset = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] jnlesseq\t\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset);
</del><ins>+            printf(&quot;[%4d] jnlesseq\t\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_loop_if_less: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int offset = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] loop_if_less\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset);
</del><ins>+            printf(&quot;[%4d] loop_if_less\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_jless: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int offset = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] jless\t\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset);
</del><ins>+            printf(&quot;[%4d] jless\t\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_loop_if_lesseq: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int offset = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] loop_if_lesseq\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset);
</del><ins>+            printf(&quot;[%4d] loop_if_lesseq\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_switch_imm: {
</span><span class="cx">             int tableIndex = (++it)-&gt;u.operand;
</span><span class="cx">             int defaultTarget = (++it)-&gt;u.operand;
</span><span class="cx">             int scrutineeRegister = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] switch_imm\t %d, %d(-&gt;%d), %s\n&quot;, location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).c_str());
</del><ins>+            printf(&quot;[%4d] switch_imm\t %d, %d(-&gt;%d), %s\n&quot;, location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_switch_char: {
</span><span class="cx">             int tableIndex = (++it)-&gt;u.operand;
</span><span class="cx">             int defaultTarget = (++it)-&gt;u.operand;
</span><span class="cx">             int scrutineeRegister = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] switch_char\t %d, %d(-&gt;%d), %s\n&quot;, location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).c_str());
</del><ins>+            printf(&quot;[%4d] switch_char\t %d, %d(-&gt;%d), %s\n&quot;, location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_switch_string: {
</span><span class="cx">             int tableIndex = (++it)-&gt;u.operand;
</span><span class="cx">             int defaultTarget = (++it)-&gt;u.operand;
</span><span class="cx">             int scrutineeRegister = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] switch_string\t %d, %d(-&gt;%d), %s\n&quot;, location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).c_str());
</del><ins>+            printf(&quot;[%4d] switch_string\t %d, %d(-&gt;%d), %s\n&quot;, location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_new_func: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int f0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] new_func\t\t %s, f%d\n&quot;, location, registerName(exec, r0).c_str(), f0);
</del><ins>+            printf(&quot;[%4d] new_func\t\t %s, f%d\n&quot;, location, registerName(exec, r0).data(), f0);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_new_func_exp: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int f0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] new_func_exp\t %s, f%d\n&quot;, location, registerName(exec, r0).c_str(), f0);
</del><ins>+            printf(&quot;[%4d] new_func_exp\t %s, f%d\n&quot;, location, registerName(exec, r0).data(), f0);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_call: {
</span><span class="lines">@@ -1010,7 +1010,7 @@
</span><span class="cx">             int func = (++it)-&gt;u.operand;
</span><span class="cx">             int argCount = (++it)-&gt;u.operand;
</span><span class="cx">             int registerOffset = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] call\t\t %s, %s, %d, %d\n&quot;, location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), argCount, registerOffset);
</del><ins>+            printf(&quot;[%4d] call\t\t %s, %s, %d, %d\n&quot;, location, registerName(exec, dst).data(), registerName(exec, func).data(), argCount, registerOffset);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_call_eval: {
</span><span class="lines">@@ -1018,7 +1018,7 @@
</span><span class="cx">             int func = (++it)-&gt;u.operand;
</span><span class="cx">             int argCount = (++it)-&gt;u.operand;
</span><span class="cx">             int registerOffset = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] call_eval\t %s, %s, %d, %d\n&quot;, location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), argCount, registerOffset);
</del><ins>+            printf(&quot;[%4d] call_eval\t %s, %s, %d, %d\n&quot;, location, registerName(exec, dst).data(), registerName(exec, func).data(), argCount, registerOffset);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_call_varargs: {
</span><span class="lines">@@ -1026,7 +1026,7 @@
</span><span class="cx">             int func = (++it)-&gt;u.operand;
</span><span class="cx">             int argCount = (++it)-&gt;u.operand;
</span><span class="cx">             int registerOffset = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] call_varargs\t %s, %s, %s, %d\n&quot;, location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), registerName(exec, argCount).c_str(), registerOffset);
</del><ins>+            printf(&quot;[%4d] call_varargs\t %s, %s, %s, %d\n&quot;, location, registerName(exec, dst).data(), registerName(exec, func).data(), registerName(exec, argCount).data(), registerOffset);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_load_varargs: {
</span><span class="lines">@@ -1035,7 +1035,7 @@
</span><span class="cx">         }
</span><span class="cx">         case op_tear_off_activation: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] tear_off_activation\t %s\n&quot;, location, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] tear_off_activation\t %s\n&quot;, location, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_tear_off_arguments: {
</span><span class="lines">@@ -1044,7 +1044,7 @@
</span><span class="cx">         }
</span><span class="cx">         case op_ret: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] ret\t\t %s\n&quot;, location, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] ret\t\t %s\n&quot;, location, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_construct: {
</span><span class="lines">@@ -1054,26 +1054,26 @@
</span><span class="cx">             int registerOffset = (++it)-&gt;u.operand;
</span><span class="cx">             int proto = (++it)-&gt;u.operand;
</span><span class="cx">             int thisRegister = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] construct\t %s, %s, %d, %d, %s, %s\n&quot;, location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), argCount, registerOffset, registerName(exec, proto).c_str(), registerName(exec, thisRegister).c_str());
</del><ins>+            printf(&quot;[%4d] construct\t %s, %s, %d, %d, %s, %s\n&quot;, location, registerName(exec, dst).data(), registerName(exec, func).data(), argCount, registerOffset, registerName(exec, proto).data(), registerName(exec, thisRegister).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_construct_verify: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] construct_verify\t %s, %s\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str());
</del><ins>+            printf(&quot;[%4d] construct_verify\t %s, %s\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_strcat: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><span class="cx">             int count = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] strcat\t\t %s, %s, %d\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), count);
</del><ins>+            printf(&quot;[%4d] strcat\t\t %s, %s, %d\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), count);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_to_primitive: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] to_primitive\t %s, %s\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str());
</del><ins>+            printf(&quot;[%4d] to_primitive\t %s, %s\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_get_pnames: {
</span><span class="lines">@@ -1082,7 +1082,7 @@
</span><span class="cx">             int r2 = it[3].u.operand;
</span><span class="cx">             int r3 = it[4].u.operand;
</span><span class="cx">             int offset = it[5].u.operand;
</span><del>-            printf(&quot;[%4d] get_pnames\t %s, %s, %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str(), offset, location + offset);
</del><ins>+            printf(&quot;[%4d] get_pnames\t %s, %s, %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), registerName(exec, r3).data(), offset, location + offset);
</ins><span class="cx">             it += OPCODE_LENGTH(op_get_pnames) - 1;
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -1090,13 +1090,13 @@
</span><span class="cx">             int dest = it[1].u.operand;
</span><span class="cx">             int iter = it[4].u.operand;
</span><span class="cx">             int offset = it[5].u.operand;
</span><del>-            printf(&quot;[%4d] next_pname\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, dest).c_str(), registerName(exec, iter).c_str(), offset, location + offset);
</del><ins>+            printf(&quot;[%4d] next_pname\t %s, %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, dest).data(), registerName(exec, iter).data(), offset, location + offset);
</ins><span class="cx">             it += OPCODE_LENGTH(op_next_pname) - 1;
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_push_scope: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] push_scope\t %s\n&quot;, location, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] push_scope\t %s\n&quot;, location, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_pop_scope: {
</span><span class="lines">@@ -1107,7 +1107,7 @@
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int id0 = (++it)-&gt;u.operand;
</span><span class="cx">             int r1 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] push_new_scope \t%s, %s, %s\n&quot;, location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str());
</del><ins>+            printf(&quot;[%4d] push_new_scope \t%s, %s, %s\n&quot;, location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_jmp_scopes: {
</span><span class="lines">@@ -1118,30 +1118,30 @@
</span><span class="cx">         }
</span><span class="cx">         case op_catch: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] catch\t\t %s\n&quot;, location, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] catch\t\t %s\n&quot;, location, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_throw: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] throw\t\t %s\n&quot;, location, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] throw\t\t %s\n&quot;, location, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_new_error: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><span class="cx">             int errorType = (++it)-&gt;u.operand;
</span><span class="cx">             int k0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] new_error\t %s, %d, %s\n&quot;, location, registerName(exec, r0).c_str(), errorType, constantName(exec, k0, getConstant(k0)).c_str());
</del><ins>+            printf(&quot;[%4d] new_error\t %s, %d, %s\n&quot;, location, registerName(exec, r0).data(), errorType, constantName(exec, k0, getConstant(k0)).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_jsr: {
</span><span class="cx">             int retAddrDst = (++it)-&gt;u.operand;
</span><span class="cx">             int offset = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] jsr\t\t %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, retAddrDst).c_str(), offset, location + offset);
</del><ins>+            printf(&quot;[%4d] jsr\t\t %s, %d(-&gt;%d)\n&quot;, location, registerName(exec, retAddrDst).data(), offset, location + offset);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_sret: {
</span><span class="cx">             int retAddrSrc = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] sret\t\t %s\n&quot;, location, registerName(exec, retAddrSrc).c_str());
</del><ins>+            printf(&quot;[%4d] sret\t\t %s\n&quot;, location, registerName(exec, retAddrSrc).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_debug: {
</span><span class="lines">@@ -1153,17 +1153,17 @@
</span><span class="cx">         }
</span><span class="cx">         case op_profile_will_call: {
</span><span class="cx">             int function = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] profile_will_call %s\n&quot;, location, registerName(exec, function).c_str());
</del><ins>+            printf(&quot;[%4d] profile_will_call %s\n&quot;, location, registerName(exec, function).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_profile_did_call: {
</span><span class="cx">             int function = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] profile_did_call\t %s\n&quot;, location, registerName(exec, function).c_str());
</del><ins>+            printf(&quot;[%4d] profile_did_call\t %s\n&quot;, location, registerName(exec, function).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_end: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><del>-            printf(&quot;[%4d] end\t\t %s\n&quot;, location, registerName(exec, r0).c_str());
</del><ins>+            printf(&quot;[%4d] end\t\t %s\n&quot;, location, registerName(exec, r0).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkJavaScriptCorejsccpp"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/jsc.cpp (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/jsc.cpp        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/JavaScriptCore/jsc.cpp        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx">         if (i)
</span><span class="cx">             putchar(' ');
</span><span class="cx"> 
</span><del>-        printf(&quot;%s&quot;, args.at(i).toString(exec).UTF8String().c_str());
</del><ins>+        printf(&quot;%s&quot;, args.at(i).toString(exec).UTF8String().data());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     putchar('\n');
</span><span class="lines">@@ -187,7 +187,7 @@
</span><span class="cx"> 
</span><span class="cx"> JSValue JSC_HOST_CALL functionDebug(ExecState* exec, JSObject*, JSValue, const ArgList&amp; args)
</span><span class="cx"> {
</span><del>-    fprintf(stderr, &quot;--&gt; %s\n&quot;, args.at(0).toString(exec).UTF8String().c_str());
</del><ins>+    fprintf(stderr, &quot;--&gt; %s\n&quot;, args.at(0).toString(exec).UTF8String().data());
</ins><span class="cx">     return jsUndefined();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -445,7 +445,7 @@
</span><span class="cx">         if (completion.complType() == Throw)
</span><span class="cx">             printf(&quot;Exception: %s\n&quot;, completion.value().toString(globalObject-&gt;globalExec()).ascii());
</span><span class="cx">         else
</span><del>-            printf(&quot;%s\n&quot;, completion.value().toString(globalObject-&gt;globalExec()).UTF8String().c_str());
</del><ins>+            printf(&quot;%s\n&quot;, completion.value().toString(globalObject-&gt;globalExec()).UTF8String().data());
</ins><span class="cx"> 
</span><span class="cx">         globalObject-&gt;globalExec()-&gt;clearException();
</span><span class="cx">     }
</span><span class="lines">@@ -535,9 +535,9 @@
</span><span class="cx"> 
</span><span class="cx"> static bool fillBufferWithContentsOfFile(const UString&amp; fileName, Vector&lt;char&gt;&amp; buffer)
</span><span class="cx"> {
</span><del>-    FILE* f = fopen(fileName.UTF8String().c_str(), &quot;r&quot;);
</del><ins>+    FILE* f = fopen(fileName.UTF8String().data(), &quot;r&quot;);
</ins><span class="cx">     if (!f) {
</span><del>-        fprintf(stderr, &quot;Could not open file: %s\n&quot;, fileName.UTF8String().c_str());
</del><ins>+        fprintf(stderr, &quot;Could not open file: %s\n&quot;, fileName.UTF8String().data());
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkJavaScriptCoreprofilerCallIdentifierh"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/profiler/CallIdentifier.h (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/profiler/CallIdentifier.h        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/JavaScriptCore/profiler/CallIdentifier.h        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">         operator const char*() const { return c_str(); }
</span><del>-        const char* c_str() const { return m_name.UTF8String().c_str(); }
</del><ins>+        const char* c_str() const { return m_name.UTF8String().data(); }
</ins><span class="cx"> #endif
</span><span class="cx">     };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkJavaScriptCoreprofilerProfilecpp"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/profiler/Profile.cpp (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/profiler/Profile.cpp        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/JavaScriptCore/profiler/Profile.cpp        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> 
</span><span class="cx">     std::sort(sortedFunctions.begin(), sortedFunctions.end(), functionNameCountPairComparator);
</span><span class="cx">     for (NameCountPairVector::iterator it = sortedFunctions.begin(); it != sortedFunctions.end(); ++it)
</span><del>-        printf(&quot;        %-12d%s\n&quot;, (*it).second, UString((*it).first).UTF8String().c_str());
</del><ins>+        printf(&quot;        %-12d%s\n&quot;, (*it).second, UString((*it).first).UTF8String().data());
</ins><span class="cx"> 
</span><span class="cx">     printf(&quot;\nSort by top of stack, same collapsed (when &gt;= 5):\n&quot;);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkJavaScriptCoreprofilerProfileNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/profiler/ProfileNode.cpp (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/profiler/ProfileNode.cpp        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/JavaScriptCore/profiler/ProfileNode.cpp        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -293,11 +293,11 @@
</span><span class="cx">         printf(&quot;  &quot;);
</span><span class="cx"> 
</span><span class="cx">     printf(&quot;Function Name %s %d SelfTime %.3fms/%.3f%% TotalTime %.3fms/%.3f%% VSelf %.3fms VTotal %.3fms Visible %s Next Sibling %s\n&quot;,
</span><del>-        functionName().UTF8String().c_str(), 
</del><ins>+        functionName().UTF8String().data(), 
</ins><span class="cx">         m_numberOfCalls, m_actualSelfTime, selfPercent(), m_actualTotalTime, totalPercent(),
</span><span class="cx">         m_visibleSelfTime, m_visibleTotalTime, 
</span><span class="cx">         (m_visible ? &quot;True&quot; : &quot;False&quot;),
</span><del>-        m_nextSibling ? m_nextSibling-&gt;functionName().UTF8String().c_str() : &quot;&quot;);
</del><ins>+        m_nextSibling ? m_nextSibling-&gt;functionName().UTF8String().data() : &quot;&quot;);
</ins><span class="cx"> 
</span><span class="cx">     ++indentLevel;
</span><span class="cx"> 
</span><span class="lines">@@ -312,7 +312,7 @@
</span><span class="cx">     printf(&quot;    &quot;);
</span><span class="cx"> 
</span><span class="cx">     // Print function names
</span><del>-    const char* name = functionName().UTF8String().c_str();
</del><ins>+    const char* name = functionName().UTF8String().data();
</ins><span class="cx">     double sampleCount = m_actualTotalTime * 1000;
</span><span class="cx">     if (indentLevel) {
</span><span class="cx">         for (int i = 0; i &lt; indentLevel; ++i)
</span><span class="lines">@@ -338,7 +338,7 @@
</span><span class="cx">         while (indentLevel--)
</span><span class="cx">             printf(&quot;  &quot;);
</span><span class="cx"> 
</span><del>-        printf(&quot;%.0f %s\n&quot;, sampleCount - sumOfChildrensCount, functionName().UTF8String().c_str());
</del><ins>+        printf(&quot;%.0f %s\n&quot;, sampleCount - sumOfChildrensCount, functionName().UTF8String().data());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return m_actualTotalTime;
</span></span></pre></div>
<a id="trunkJavaScriptCoreruntimeDateConversioncpp"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/runtime/DateConversion.cpp (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/runtime/DateConversion.cpp        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/JavaScriptCore/runtime/DateConversion.cpp        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (date == exec-&gt;globalData().cachedDateString)
</span><span class="cx">         return exec-&gt;globalData().cachedDateStringValue;
</span><del>-    double value = parseDateFromNullTerminatedCharacters(exec, date.UTF8String().c_str());
</del><ins>+    double value = parseDateFromNullTerminatedCharacters(exec, date.UTF8String().data());
</ins><span class="cx">     exec-&gt;globalData().cachedDateString = date;
</span><span class="cx">     exec-&gt;globalData().cachedDateStringValue = value;
</span><span class="cx">     return value;
</span></span></pre></div>
<a id="trunkJavaScriptCoreruntimeJSGlobalObjectFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -55,12 +55,12 @@
</span><span class="cx"> {
</span><span class="cx">     UString str = args.at(0).toString(exec);
</span><span class="cx">     CString cstr = str.UTF8String(true);
</span><del>-    if (!cstr.c_str())
</del><ins>+    if (!cstr.data())
</ins><span class="cx">         return throwError(exec, URIError, &quot;String contained an illegal UTF-16 sequence.&quot;);
</span><span class="cx"> 
</span><span class="cx">     JSStringBuilder builder;
</span><del>-    const char* p = cstr.c_str();
-    for (size_t k = 0; k &lt; cstr.size(); k++, p++) {
</del><ins>+    const char* p = cstr.data();
+    for (size_t k = 0; k &lt; cstr.length(); k++, p++) {
</ins><span class="cx">         char c = *p;
</span><span class="cx">         if (c &amp;&amp; strchr(doNotEscape, c))
</span><span class="cx">             builder.append(c);
</span><span class="lines">@@ -430,8 +430,7 @@
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> JSValue JSC_HOST_CALL globalFuncJSCPrint(ExecState* exec, JSObject*, JSValue, const ArgList&amp; args)
</span><span class="cx"> {
</span><del>-    CStringBuffer string;
-    args.at(0).toString(exec).getCString(string);
</del><ins>+    CString string = args.at(0).toString(exec).UTF8String();
</ins><span class="cx">     puts(string.data());
</span><span class="cx">     return jsUndefined();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkJavaScriptCoreruntimeUStringcpp"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/runtime/UString.cpp (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/runtime/UString.cpp        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/JavaScriptCore/runtime/UString.cpp        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -142,8 +142,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool operator==(const CString&amp; c1, const CString&amp; c2)
</span><span class="cx"> {
</span><del>-    size_t len = c1.size();
-    return len == c2.size() &amp;&amp; (len == 0 || memcmp(c1.c_str(), c2.c_str(), len) == 0);
</del><ins>+    size_t len = c1.length();
+    return len == c2.length() &amp;&amp; (len == 0 || memcmp(c1.data(), c2.data(), len) == 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // The null string is immutable, except for refCount.
</span><span class="lines">@@ -292,29 +292,6 @@
</span><span class="cx">     return UString(buffer, length);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool UString::getCString(CStringBuffer&amp; buffer) const
-{
-    unsigned length = size();
-    unsigned neededSize = length + 1;
-    buffer.resize(neededSize);
-    char* buf = buffer.data();
-
-    UChar ored = 0;
-    const UChar* p = data();
-    char* q = buf;
-    const UChar* limit = p + length;
-    while (p != limit) {
-        UChar c = p[0];
-        ored |= c;
-        *q = static_cast&lt;char&gt;(c);
-        ++p;
-        ++q;
-    }
-    *q = '\0';
-
-    return !(ored &amp; 0xFF00);
-}
-
</del><span class="cx"> char* UString::ascii() const
</span><span class="cx"> {
</span><span class="cx">     static char* asciiBuffer = 0;
</span><span class="lines">@@ -368,11 +345,7 @@
</span><span class="cx">         return NaN;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // FIXME: If tolerateTrailingJunk is true, then we want to tolerate non-8-bit junk
-    // after the number, so this is too strict a check.
-    CStringBuffer s;
-    if (!getCString(s))
-        return NaN;
</del><ins>+    CString s = UTF8String();
</ins><span class="cx">     const char* c = s.data();
</span><span class="cx"> 
</span><span class="cx">     // skip leading white space
</span></span></pre></div>
<a id="trunkJavaScriptCoreruntimeUStringh"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/runtime/UString.h (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/runtime/UString.h        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/JavaScriptCore/runtime/UString.h        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -61,8 +61,8 @@
</span><span class="cx">         CString&amp; operator=(const CString&amp;);
</span><span class="cx">         CString&amp; operator+=(const CString&amp; c) { return append(c); }
</span><span class="cx"> 
</span><del>-        size_t size() const { return m_length; }
-        const char* c_str() const { return m_data; }
</del><ins>+        size_t length() const { return m_length; }
+        const char* data() const { return m_data; }
</ins><span class="cx"> 
</span><span class="cx">     private:
</span><span class="cx">         size_t m_length;
</span><span class="lines">@@ -113,8 +113,6 @@
</span><span class="cx">         static UString from(long);
</span><span class="cx">         static UString from(double);
</span><span class="cx"> 
</span><del>-        bool getCString(CStringBuffer&amp;) const;
-
</del><span class="cx">         // NOTE: This method should only be used for *debugging* purposes as it
</span><span class="cx">         // is neither Unicode safe nor free from side effects nor thread-safe.
</span><span class="cx">         char* ascii() const;
</span></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/WebCore/ChangeLog        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2010-03-25  Gavin Barraclough  &lt;barraclough@apple.com&gt;
+
+        Reviewed by Geoff Garen.
+
+        Bug 36611 - Cleanup JSC::CString
+        Rename CString::c_str() -&gt; CString::data(), CString::size() -&gt; CString::length(),
+        remove UString::getCString() (all uses are wrong, should use UString::UTF8String()).
+
+        * bridge/NP_jsobject.cpp:
+        (_NPN_Enumerate):
+        * bridge/c/c_utility.cpp:
+        (JSC::Bindings::convertValueToNPVariant):
+        * bridge/jni/jsc/JNIBridgeJSC.cpp:
+        (JavaField::valueFromInstance):
+        (JavaField::setValueToInstance):
+        * bridge/jni/jsc/JavaInstanceJSC.cpp:
+        (JavaInstance::invokeMethod):
+        * bridge/jni/jsc/JavaStringJSC.h:
+        (JSC::Bindings::JavaStringImpl::UTF8String):
+
</ins><span class="cx"> 2010-03-25  Jakub Wieczorek  &lt;jwieczorek@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Eric Seidel.
</span></span></pre></div>
<a id="trunkWebCorebridgeNP_jsobjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bridge/NP_jsobject.cpp (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bridge/NP_jsobject.cpp        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/WebCore/bridge/NP_jsobject.cpp        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -474,7 +474,7 @@
</span><span class="cx">         NPIdentifier* identifiers = static_cast&lt;NPIdentifier*&gt;(malloc(sizeof(NPIdentifier) * size));
</span><span class="cx">         
</span><span class="cx">         for (unsigned i = 0; i &lt; size; ++i)
</span><del>-            identifiers[i] = _NPN_GetStringIdentifier(propertyNames[i].ustring().UTF8String().c_str());
</del><ins>+            identifiers[i] = _NPN_GetStringIdentifier(propertyNames[i].ustring().UTF8String().data());
</ins><span class="cx"> 
</span><span class="cx">         *identifier = identifiers;
</span><span class="cx">         *count = size;
</span></span></pre></div>
<a id="trunkWebCorebridgecc_utilitycpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bridge/c/c_utility.cpp (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bridge/c/c_utility.cpp        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/WebCore/bridge/c/c_utility.cpp        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">     if (value.isString()) {
</span><span class="cx">         UString ustring = value.toString(exec);
</span><span class="cx">         CString cstring = ustring.UTF8String();
</span><del>-        NPString string = { (const NPUTF8*)cstring.c_str(), static_cast&lt;uint32_t&gt;(cstring.size()) };
</del><ins>+        NPString string = { (const NPUTF8*)cstring.data(), static_cast&lt;uint32_t&gt;(cstring.length()) };
</ins><span class="cx">         NPN_InitializeVariantWithStringCopy(result, &amp;string);
</span><span class="cx">     } else if (value.isNumber()) {
</span><span class="cx">         DOUBLE_TO_NPVARIANT(value.toNumber(exec), *result);
</span></span></pre></div>
<a id="trunkWebCorebridgejnijscJNIBridgeJSCcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    LOG(LiveConnect, &quot;JavaField::valueFromInstance getting %s = %s&quot;, UString(name()).UTF8String().c_str(), jsresult.toString(exec).ascii());
</del><ins>+    LOG(LiveConnect, &quot;JavaField::valueFromInstance getting %s = %s&quot;, UString(name()).UTF8String().data(), jsresult.toString(exec).ascii());
</ins><span class="cx"> 
</span><span class="cx">     return jsresult;
</span><span class="cx"> }
</span><span class="lines">@@ -186,7 +186,7 @@
</span><span class="cx">     const JavaInstance* instance = static_cast&lt;const JavaInstance*&gt;(i);
</span><span class="cx">     jvalue javaValue = convertValueToJValue(exec, i-&gt;rootObject(), aValue, m_JNIType, type());
</span><span class="cx"> 
</span><del>-    LOG(LiveConnect, &quot;JavaField::setValueToInstance setting value %s to %s&quot;, UString(name()).UTF8String().c_str(), aValue.toString(exec).ascii());
</del><ins>+    LOG(LiveConnect, &quot;JavaField::setValueToInstance setting value %s to %s&quot;, UString(name()).UTF8String().data(), aValue.toString(exec).ascii());
</ins><span class="cx"> 
</span><span class="cx">     switch (m_JNIType) {
</span><span class="cx">     case array_type:
</span></span></pre></div>
<a id="trunkWebCorebridgejnijscJavaInstanceJSCcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     const JavaMethod* jMethod = static_cast&lt;const JavaMethod*&gt;(method);
</span><del>-    LOG(LiveConnect, &quot;JavaInstance::invokeMethod call %s %s on %p&quot;, UString(jMethod-&gt;name()).UTF8String().c_str(), jMethod-&gt;signature(), m_instance-&gt;m_instance);
</del><ins>+    LOG(LiveConnect, &quot;JavaInstance::invokeMethod call %s %s on %p&quot;, UString(jMethod-&gt;name()).UTF8String().data(), jMethod-&gt;signature(), m_instance-&gt;m_instance);
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;jvalue&gt; jArgs(count);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorebridgejnijscJavaStringJSCh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bridge/jni/jsc/JavaStringJSC.h (56559 => 56560)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bridge/jni/jsc/JavaStringJSC.h        2010-03-25 18:03:53 UTC (rev 56559)
+++ trunk/WebCore/bridge/jni/jsc/JavaStringJSC.h        2010-03-25 18:20:17 UTC (rev 56560)
</span><span class="lines">@@ -62,11 +62,11 @@
</span><span class="cx"> 
</span><span class="cx">     const char* UTF8String() const
</span><span class="cx">     {
</span><del>-        if (!m_utf8String.c_str()) {
</del><ins>+        if (!m_utf8String.data()) {
</ins><span class="cx">             JSLock lock(SilenceAssertionsOnly);
</span><span class="cx">             m_utf8String = UString(m_rep).UTF8String();
</span><span class="cx">         }
</span><del>-        return m_utf8String.c_str();
</del><ins>+        return m_utf8String.data();
</ins><span class="cx">     }
</span><span class="cx">     const jchar* uchars() const { return (const jchar*)m_rep-&gt;characters(); }
</span><span class="cx">     int length() const { return m_rep-&gt;length(); }
</span></span></pre>
</div>
</div>

</body>
</html>