<!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>[172402] 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/172402">172402</a></dd>
<dt>Author</dt> <dd>burg@cs.washington.edu</dd>
<dt>Date</dt> <dd>2014-08-11 12:19:47 -0700 (Mon, 11 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: use type builders to construct high fidelity type information payloads
https://bugs.webkit.org/show_bug.cgi?id=135803

Reviewed by Timothy Hatcher.

Due to some typos in the protocol file, the code had worked with raw objects
rather than with type builders. Convert to using builders.

* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
* inspector/agents/InspectorRuntimeAgent.h:
* inspector/protocol/Runtime.json: Fix 'item' for 'items'; true for 'true'.
* runtime/HighFidelityTypeProfiler.cpp:
(JSC::HighFidelityTypeProfiler::getTypesForVariableAtOffsetForInspector):
* runtime/HighFidelityTypeProfiler.h:
* runtime/TypeSet.cpp:
(JSC::TypeSet::allStructureRepresentations):
(JSC::StructureShape::stringRepresentation):
(JSC::StructureShape::inspectorRepresentation):
* runtime/TypeSet.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorRuntimeAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorRuntimeAgenth">trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolRuntimejson">trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeHighFidelityTypeProfilercpp">trunk/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeHighFidelityTypeProfilerh">trunk/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeTypeSetcpp">trunk/Source/JavaScriptCore/runtime/TypeSet.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeTypeSeth">trunk/Source/JavaScriptCore/runtime/TypeSet.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (172401 => 172402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-08-11 18:59:44 UTC (rev 172401)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-08-11 19:19:47 UTC (rev 172402)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-08-11  Brian J. Burg  &lt;burg@cs.washington.edu&gt;
+
+        Web Inspector: use type builders to construct high fidelity type information payloads
+        https://bugs.webkit.org/show_bug.cgi?id=135803
+
+        Reviewed by Timothy Hatcher.
+
+        Due to some typos in the protocol file, the code had worked with raw objects
+        rather than with type builders. Convert to using builders.
+
+        * inspector/agents/InspectorRuntimeAgent.cpp:
+        (Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
+        * inspector/agents/InspectorRuntimeAgent.h:
+        * inspector/protocol/Runtime.json: Fix 'item' for 'items'; true for 'true'.
+        * runtime/HighFidelityTypeProfiler.cpp:
+        (JSC::HighFidelityTypeProfiler::getTypesForVariableAtOffsetForInspector):
+        * runtime/HighFidelityTypeProfiler.h:
+        * runtime/TypeSet.cpp:
+        (JSC::TypeSet::allStructureRepresentations):
+        (JSC::StructureShape::stringRepresentation):
+        (JSC::StructureShape::inspectorRepresentation):
+        * runtime/TypeSet.h:
+
</ins><span class="cx"> 2014-08-11  Mark Hahnenberg  &lt;mhahnenberg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         for-in optimization should also make sure the base matches the object being iterated
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorRuntimeAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp (172401 => 172402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp        2014-08-11 18:59:44 UTC (rev 172401)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp        2014-08-11 19:19:47 UTC (rev 172402)
</span><span class="lines">@@ -194,19 +194,19 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets(ErrorString* errorString, const RefPtr&lt;Inspector::InspectorArray&gt;&amp; in_locations, RefPtr&lt;Inspector::InspectorArray&gt;&amp; out_types)
</del><ins>+void InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets(ErrorString* errorString, const RefPtr&lt;Inspector::InspectorArray&gt;&amp; locations, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Runtime::TypeDescription&gt;&gt;&amp; typeDescriptions)
</ins><span class="cx"> {
</span><span class="cx">     static const bool verbose = false;
</span><span class="cx">     VM&amp; vm = globalVM();
</span><del>-    out_types = Inspector::InspectorArray::create();
</del><ins>+    typeDescriptions = Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Runtime::TypeDescription&gt;::create();
</ins><span class="cx">     if (!vm.isProfilingTypesWithHighFidelity())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     double start = currentTimeMS();
</span><span class="cx">     vm.highFidelityLog()-&gt;processHighFidelityLog(&quot;User Query&quot;);
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; in_locations-&gt;length(); i++) {
-        RefPtr&lt;Inspector::InspectorValue&gt; value = in_locations-&gt;get(i);
</del><ins>+    for (size_t i = 0; i &lt; locations-&gt;length(); i++) {
+        RefPtr&lt;Inspector::InspectorValue&gt; value = locations-&gt;get(i);
</ins><span class="cx">         RefPtr&lt;InspectorObject&gt; location;
</span><span class="cx">         if (!value-&gt;asObject(&amp;location)) {
</span><span class="cx">             *errorString = ASCIILiteral(&quot;Array of TypeLocation objects has an object that does not have type of TypeLocation.&quot;);
</span><span class="lines">@@ -219,11 +219,11 @@
</span><span class="cx">         location-&gt;getNumber(ASCIILiteral(&quot;typeInformationDescriptor&quot;), &amp;descriptor);
</span><span class="cx">         location-&gt;getString(ASCIILiteral(&quot;sourceID&quot;), &amp;sourceIDAsString);
</span><span class="cx">         location-&gt;getNumber(ASCIILiteral(&quot;divot&quot;), &amp;divot);
</span><del>-        
-        RefPtr&lt;Inspector::InspectorObject&gt; typeDescription = Inspector::InspectorObject::create();
</del><ins>+
+        RefPtr&lt;Inspector::TypeBuilder::Runtime::TypeDescription&gt; typeDescription = Inspector::TypeBuilder::Runtime::TypeDescription::create();
</ins><span class="cx">         bool okay;
</span><span class="cx">         vm.highFidelityTypeProfiler()-&gt;getTypesForVariableAtOffsetForInspector(static_cast&lt;TypeProfilerSearchDescriptor&gt;(descriptor), divot, sourceIDAsString.toIntPtrStrict(&amp;okay), typeDescription);
</span><del>-        out_types-&gt;pushObject(typeDescription);
</del><ins>+        typeDescriptions-&gt;addItem(typeDescription);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     double end = currentTimeMS();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorRuntimeAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h (172401 => 172402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h        2014-08-11 18:59:44 UTC (rev 172401)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h        2014-08-11 19:19:47 UTC (rev 172402)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">     virtual void getProperties(ErrorString*, const String&amp; objectId, const bool* ownProperties, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Runtime::PropertyDescriptor&gt;&gt;&amp; result, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Runtime::InternalPropertyDescriptor&gt;&gt;&amp; internalProperties) override final;
</span><span class="cx">     virtual void releaseObjectGroup(ErrorString*, const String&amp; objectGroup) override final;
</span><span class="cx">     virtual void run(ErrorString*) override;
</span><del>-    virtual void getRuntimeTypesForVariablesAtOffsets(ErrorString*, const RefPtr&lt;Inspector::InspectorArray&gt;&amp; in_locations, RefPtr&lt;Inspector::InspectorArray&gt;&amp; out_types) override;
</del><ins>+    virtual void getRuntimeTypesForVariablesAtOffsets(ErrorString*, const RefPtr&lt;Inspector::InspectorArray&gt;&amp; locations, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Runtime::TypeDescription&gt;&gt;&amp;) override;
</ins><span class="cx">     
</span><span class="cx">     void setScriptDebugServer(ScriptDebugServer* scriptDebugServer) { m_scriptDebugServer = scriptDebugServer; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolRuntimejson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json (172401 => 172402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json        2014-08-11 18:59:44 UTC (rev 172401)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json        2014-08-11 19:19:47 UTC (rev 172402)
</span><span class="lines">@@ -116,9 +116,9 @@
</span><span class="cx">             &quot;id&quot;: &quot;StructureDescription&quot;,
</span><span class="cx">             &quot;type&quot;: &quot;object&quot;,
</span><span class="cx">             &quot;properties&quot;: [
</span><del>-                { &quot;name&quot;: &quot;fields&quot;, &quot;type&quot;: &quot;array&quot;,  &quot;items&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;description&quot;: &quot;Array of strings, where the strings represent object properties.&quot; },
-                { &quot;name&quot;: &quot;constructorName&quot;, &quot;type&quot;: &quot;string&quot;, &quot;description&quot;: &quot;Name of the constructor.&quot; },
-                { &quot;name&quot;: &quot;prototypeStructure&quot;, &quot;$ref&quot;: &quot;StructureDescription&quot;, &quot;optional&quot;: &quot;true&quot;, &quot;description&quot;: &quot;Pointer to the StructureRepresentation of the protoype if one exists.&quot; }
</del><ins>+                { &quot;name&quot;: &quot;fields&quot;, &quot;type&quot;: &quot;array&quot;,  &quot;items&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;optional&quot;: true, &quot;description&quot;: &quot;Array of strings, where the strings represent object properties.&quot; },
+                { &quot;name&quot;: &quot;constructorName&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Name of the constructor.&quot; },
+                { &quot;name&quot;: &quot;prototypeStructure&quot;, &quot;$ref&quot;: &quot;StructureDescription&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Pointer to the StructureRepresentation of the protoype if one exists.&quot; }
</ins><span class="cx">             ]
</span><span class="cx">         },
</span><span class="cx">         {
</span><span class="lines">@@ -127,8 +127,8 @@
</span><span class="cx">             &quot;description&quot;: &quot;Container for type information that has been gathered.&quot;,
</span><span class="cx">             &quot;properties&quot;: [
</span><span class="cx">                 { &quot;name&quot;: &quot;displayTypeName&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;What the inspector should display as a simple type.&quot; },
</span><del>-                { &quot;name&quot;: &quot;localPrimitiveTypeNames&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;optional&quot;: &quot;true&quot;, &quot;description&quot;: &quot;Array of type names for primtive types (int, string, etc) seen at an instruction&quot; },
-                { &quot;name&quot;: &quot;localObjectTypeNames&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;optional&quot;: &quot;true&quot;, &quot;description&quot;: &quot;Array of type names for all object seen at an instruction&quot; },
</del><ins>+                { &quot;name&quot;: &quot;localPrimitiveTypeNames&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;optional&quot;: true, &quot;description&quot;: &quot;Array of type names for primtive types (int, string, etc) seen at an instruction&quot; },
+                { &quot;name&quot;: &quot;localObjectTypeNames&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;optional&quot;: true, &quot;description&quot;: &quot;Array of type names for all object seen at an instruction&quot; },
</ins><span class="cx">                 { &quot;name&quot;: &quot;localStructures&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;$ref&quot;: &quot;StructureDescription&quot; }, &quot;optional&quot;: true, &quot;description&quot;: &quot;Array of descriptions for all structures seen at this this instruction.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;globalPrimitiveTypeNames&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;optional&quot;: true, &quot;description&quot;: &quot;Array of type names for all primitive types seen globally.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;globalObjectTypeNames&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;optional&quot;: true, &quot;description&quot;: &quot;Array of type names for all primitive types seen globally.&quot; },
</span><span class="lines">@@ -236,7 +236,7 @@
</span><span class="cx">                 { &quot;name&quot;: &quot;locations&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;$ref&quot;: &quot;TypeLocation&quot; }, &quot;description&quot;: &quot;An array of type locations we're requesting information for. Results are expected in the same order they're sent in.&quot;}
</span><span class="cx">             ],
</span><span class="cx">             &quot;returns&quot;: [
</span><del>-                { &quot;name&quot;: &quot;types&quot;, &quot;type&quot;: &quot;array&quot;, &quot;item&quot;: { &quot;$ref&quot;: &quot;TypeDescription&quot;, &quot;description&quot;: &quot;Types for requested variable.&quot; } }
</del><ins>+                { &quot;name&quot;: &quot;types&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;$ref&quot;: &quot;TypeDescription&quot;, &quot;description&quot;: &quot;Types for requested variable.&quot; } }
</ins><span class="cx">             ],
</span><span class="cx">             &quot;description&quot;: &quot;Returns detailed informtation on given function.&quot;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeHighFidelityTypeProfilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.cpp (172401 => 172402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.cpp        2014-08-11 18:59:44 UTC (rev 172401)
+++ trunk/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.cpp        2014-08-11 19:19:47 UTC (rev 172402)
</span><span class="lines">@@ -69,21 +69,21 @@
</span><span class="cx">     bucket.append(location);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HighFidelityTypeProfiler::getTypesForVariableAtOffsetForInspector(TypeProfilerSearchDescriptor descriptor, unsigned divot, intptr_t sourceID, RefPtr&lt;Inspector::InspectorObject&gt;&amp; ret)
</del><ins>+void HighFidelityTypeProfiler::getTypesForVariableAtOffsetForInspector(TypeProfilerSearchDescriptor descriptor, unsigned divot, intptr_t sourceID, RefPtr&lt;Inspector::TypeBuilder::Runtime::TypeDescription&gt;&amp; description)
</ins><span class="cx"> {
</span><span class="cx">     TypeLocation* location = findLocation(divot, sourceID, descriptor);
</span><span class="cx">     if (!location)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (location-&gt;m_globalTypeSet &amp;&amp; location-&gt;m_globalVariableID != HighFidelityNoGlobalIDExists) {
</span><del>-        ret-&gt;setString(ASCIILiteral(&quot;displayTypeName&quot;), location-&gt;m_globalTypeSet-&gt;displayName());
-        ret-&gt;setArray(ASCIILiteral(&quot;globalPrimitiveTypeNames&quot;), location-&gt;m_globalTypeSet-&gt;allPrimitiveTypeNames()-&gt;asArray());
-        ret-&gt;setArray(ASCIILiteral(&quot;globalStructures&quot;), location-&gt;m_globalTypeSet-&gt;allStructureRepresentations()-&gt;asArray());
</del><ins>+        description-&gt;setDisplayTypeName(location-&gt;m_globalTypeSet-&gt;displayName());
+        description-&gt;setGlobalPrimitiveTypeNames(location-&gt;m_globalTypeSet-&gt;allPrimitiveTypeNames());
+        description-&gt;setGlobalStructures(location-&gt;m_globalTypeSet-&gt;allStructureRepresentations());
</ins><span class="cx">     } else
</span><del>-        ret-&gt;setString(ASCIILiteral(&quot;displayTypeName&quot;), location-&gt;m_instructionTypeSet-&gt;displayName());
</del><ins>+        description-&gt;setDisplayTypeName(location-&gt;m_instructionTypeSet-&gt;displayName());
</ins><span class="cx"> 
</span><del>-    ret-&gt;setArray(ASCIILiteral(&quot;localPrimitiveTypeNames&quot;), location-&gt;m_instructionTypeSet-&gt;allPrimitiveTypeNames()-&gt;asArray());
-    ret-&gt;setArray(ASCIILiteral(&quot;localStructures&quot;), location-&gt;m_instructionTypeSet-&gt;allStructureRepresentations()-&gt;asArray());
</del><ins>+    description-&gt;setLocalPrimitiveTypeNames(location-&gt;m_instructionTypeSet-&gt;allPrimitiveTypeNames());
+    description-&gt;setLocalStructures(location-&gt;m_instructionTypeSet-&gt;allStructureRepresentations());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool descriptorMatchesTypeLocation(TypeProfilerSearchDescriptor descriptor, TypeLocation* location)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeHighFidelityTypeProfilerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.h (172401 => 172402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.h        2014-08-11 18:59:44 UTC (rev 172401)
+++ trunk/Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.h        2014-08-11 19:19:47 UTC (rev 172402)
</span><span class="lines">@@ -36,9 +36,6 @@
</span><span class="cx"> namespace Inspector { namespace TypeBuilder  { namespace Runtime {
</span><span class="cx"> class TypeDescription;
</span><span class="cx"> }}}
</span><del>-namespace Inspector {
-class InspectorObject;
-}
</del><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><span class="lines">@@ -99,7 +96,7 @@
</span><span class="cx"> class HighFidelityTypeProfiler {
</span><span class="cx"> public:
</span><span class="cx">     void logTypesForTypeLocation(TypeLocation*);
</span><del>-    void getTypesForVariableAtOffsetForInspector(TypeProfilerSearchDescriptor descriptor, unsigned divot, intptr_t sourceID, RefPtr&lt;Inspector::InspectorObject&gt;&amp;);
</del><ins>+    void getTypesForVariableAtOffsetForInspector(TypeProfilerSearchDescriptor descriptor, unsigned divot, intptr_t sourceID, RefPtr&lt;Inspector::TypeBuilder::Runtime::TypeDescription&gt;&amp;);
</ins><span class="cx">     void insertNewLocation(TypeLocation*);
</span><span class="cx">     FunctionHasExecutedCache* functionHasExecutedCache() { return &amp;m_functionHasExecutedCache; }
</span><span class="cx">     TypeLocationCache* typeLocationCache() { return &amp;m_typeLocationCache; }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeTypeSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/TypeSet.cpp (172401 => 172402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/TypeSet.cpp        2014-08-11 18:59:44 UTC (rev 172401)
+++ trunk/Source/JavaScriptCore/runtime/TypeSet.cpp        2014-08-11 19:19:47 UTC (rev 172402)
</span><span class="lines">@@ -236,14 +236,14 @@
</span><span class="cx">     return seen.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::InspectorObject&gt;&gt; TypeSet::allStructureRepresentations() const
</del><ins>+PassRefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Runtime::StructureDescription&gt;&gt; TypeSet::allStructureRepresentations() const
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::InspectorObject&gt;&gt; ret = Inspector::TypeBuilder::Array&lt;Inspector::InspectorObject&gt;::create();
</del><ins>+    RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Runtime::StructureDescription&gt;&gt; description = Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Runtime::StructureDescription&gt;::create();
</ins><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i &lt; m_structureHistory-&gt;size(); i++)
</span><del>-        ret-&gt;addItem(m_structureHistory-&gt;at(i)-&gt;inspectorRepresentation());
</del><ins>+        description-&gt;addItem(m_structureHistory-&gt;at(i)-&gt;inspectorRepresentation());
</ins><span class="cx"> 
</span><del>-    return ret.release();
</del><ins>+    return description.release();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String TypeSet::leastCommonAncestor() const
</span><span class="lines">@@ -341,8 +341,8 @@
</span><span class="cx"> 
</span><span class="cx">     representation.append(&quot;{&quot;);
</span><span class="cx">     while (curShape) {
</span><del>-        for (auto iter = curShape-&gt;m_fields.begin(), end = curShape-&gt;m_fields.end(); iter != end; ++iter) {
-            String prop((*iter).get());
</del><ins>+        for (auto it = curShape-&gt;m_fields.begin(), end = curShape-&gt;m_fields.end(); it != end; ++it) {
+            String prop((*it).get());
</ins><span class="cx">             representation.append(prop);
</span><span class="cx">             representation.append(&quot;, &quot;);
</span><span class="cx">         }
</span><span class="lines">@@ -364,23 +364,23 @@
</span><span class="cx">     return representation.toString();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;Inspector::InspectorObject&gt; StructureShape::inspectorRepresentation()
</del><ins>+PassRefPtr&lt;Inspector::TypeBuilder::Runtime::StructureDescription&gt; StructureShape::inspectorRepresentation()
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;Inspector::InspectorObject&gt; base = Inspector::InspectorObject::create();
-    RefPtr&lt;Inspector::InspectorObject&gt; currentObject = base;
</del><ins>+    RefPtr&lt;Inspector::TypeBuilder::Runtime::StructureDescription&gt; base = Inspector::TypeBuilder::Runtime::StructureDescription::create();
+    RefPtr&lt;Inspector::TypeBuilder::Runtime::StructureDescription&gt; currentObject = base;
</ins><span class="cx">     RefPtr&lt;StructureShape&gt; currentShape = this;
</span><span class="cx"> 
</span><span class="cx">     while (currentShape) {
</span><del>-        RefPtr&lt;Inspector::TypeBuilder::Array&lt;String&gt;&gt; fields = Inspector::TypeBuilder::Array&lt;String&gt;::create();
-        for (auto iter = currentShape-&gt;m_fields.begin(), end = currentShape-&gt;m_fields.end(); iter != end; ++iter)
-            fields-&gt;addItem((*iter).get());
</del><ins>+        auto fields = Inspector::TypeBuilder::Array&lt;String&gt;::create();
+        for (auto it = currentShape-&gt;m_fields.begin(), end = currentShape-&gt;m_fields.end(); it != end; ++it)
+            fields-&gt;addItem((*it).get());
</ins><span class="cx"> 
</span><del>-        currentObject-&gt;setArray(ASCIILiteral(&quot;fields&quot;), fields-&gt;asArray());
-        currentObject-&gt;setString(ASCIILiteral(&quot;constructorName&quot;), currentShape-&gt;m_constructorName);
</del><ins>+        currentObject-&gt;setFields(fields);
+        currentObject-&gt;setConstructorName(currentShape-&gt;m_constructorName);
</ins><span class="cx"> 
</span><span class="cx">         if (currentShape-&gt;m_proto) {
</span><del>-            RefPtr&lt;Inspector::InspectorObject&gt; nextObject = Inspector::InspectorObject::create();
-            currentObject-&gt;setObject(ASCIILiteral(&quot;prototypeStructure&quot;), nextObject);
</del><ins>+            RefPtr&lt;Inspector::TypeBuilder::Runtime::StructureDescription&gt; nextObject = Inspector::TypeBuilder::Runtime::StructureDescription::create();
+            currentObject-&gt;setPrototypeStructure(nextObject);
</ins><span class="cx">             currentObject = nextObject;
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeTypeSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/TypeSet.h (172401 => 172402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/TypeSet.h        2014-08-11 18:59:44 UTC (rev 172401)
+++ trunk/Source/JavaScriptCore/runtime/TypeSet.h        2014-08-11 19:19:47 UTC (rev 172402)
</span><span class="lines">@@ -32,15 +32,17 @@
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><del>-namespace Inspector { namespace TypeBuilder  { 
-template&lt;typename T&gt;
-class Array;
-}}
</del><ins>+namespace Inspector {
+namespace TypeBuilder  {
+template&lt;typename T&gt; class Array;
</ins><span class="cx"> 
</span><del>-namespace Inspector { 
-class InspectorObject;
</del><ins>+namespace Runtime {
+class StructureDescription;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+}
+}
+
</ins><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><span class="cx"> class JSValue;
</span><span class="lines">@@ -68,7 +70,7 @@
</span><span class="cx">     void markAsFinal();
</span><span class="cx">     void addProperty(RefPtr&lt;StringImpl&gt;);
</span><span class="cx">     String stringRepresentation();
</span><del>-    PassRefPtr&lt;Inspector::InspectorObject&gt; inspectorRepresentation();
</del><ins>+    PassRefPtr&lt;Inspector::TypeBuilder::Runtime::StructureDescription&gt; inspectorRepresentation();
</ins><span class="cx">     void setConstructorName(String name) { m_constructorName = (name.isEmpty() ? &quot;Object&quot; : name); }
</span><span class="cx">     String constructorName() { return m_constructorName; }
</span><span class="cx">     void setProto(PassRefPtr&lt;StructureShape&gt; shape) { m_proto = shape; }
</span><span class="lines">@@ -93,7 +95,7 @@
</span><span class="cx">     JS_EXPORT_PRIVATE String seenTypes() const;
</span><span class="cx">     String displayName() const;
</span><span class="cx">     PassRefPtr&lt;Inspector::TypeBuilder::Array&lt;String&gt;&gt; allPrimitiveTypeNames() const;
</span><del>-    PassRefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::InspectorObject&gt;&gt; allStructureRepresentations() const;
</del><ins>+    PassRefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Runtime::StructureDescription&gt;&gt; allStructureRepresentations() const;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     String leastCommonAncestor() const;
</span></span></pre>
</div>
</div>

</body>
</html>