<!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>[38046] trunk/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/38046">38046</a></dd>
<dt>Author</dt> <dd>cwzwarich@webkit.org</dd>
<dt>Date</dt> <dd>2008-10-31 12:53:20 -0700 (Fri, 31 Oct 2008)</dd>
</dl>

<h3>Log Message</h3>
<pre>2008-10-31  Cameron Zwarich  &lt;zwarich@apple.com&gt;

        Reviewed by Darin Adler.

        Bug 22005: Move StructureIDChain into its own file
        &lt;https://bugs.webkit.org/show_bug.cgi?id=22005&gt;

        * GNUmakefile.am:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * runtime/StructureID.cpp:
        * runtime/StructureID.h:
        * runtime/StructureIDChain.cpp: Copied from runtime/StructureID.cpp.
        * runtime/StructureIDChain.h: Copied from runtime/StructureID.h.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkJavaScriptCoreChangeLog">trunk/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkJavaScriptCoreGNUmakefileam">trunk/JavaScriptCore/GNUmakefile.am</a></li>
<li><a href="#trunkJavaScriptCoreJavaScriptCorepri">trunk/JavaScriptCore/JavaScriptCore.pri</a></li>
<li><a href="#trunkJavaScriptCoreJavaScriptCorevcprojJavaScriptCoreJavaScriptCorevcproj">trunk/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj</a></li>
<li><a href="#trunkJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkJavaScriptCoreJavaScriptCoreSourcesbkl">trunk/JavaScriptCore/JavaScriptCoreSources.bkl</a></li>
<li><a href="#trunkJavaScriptCoreruntimeStructureIDcpp">trunk/JavaScriptCore/runtime/StructureID.cpp</a></li>
<li><a href="#trunkJavaScriptCoreruntimeStructureIDh">trunk/JavaScriptCore/runtime/StructureID.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkJavaScriptCoreruntimeStructureIDChaincpp">trunk/JavaScriptCore/runtime/StructureIDChain.cpp</a></li>
<li><a href="#trunkJavaScriptCoreruntimeStructureIDChainh">trunk/JavaScriptCore/runtime/StructureIDChain.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/ChangeLog (38045 => 38046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/ChangeLog        2008-10-31 19:53:08 UTC (rev 38045)
+++ trunk/JavaScriptCore/ChangeLog        2008-10-31 19:53:20 UTC (rev 38046)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2008-10-31  Cameron Zwarich  &lt;zwarich@apple.com&gt;
+
+        Reviewed by Darin Adler.
+
+        Bug 22005: Move StructureIDChain into its own file
+        &lt;https://bugs.webkit.org/show_bug.cgi?id=22005&gt;
+
+        * GNUmakefile.am:
+        * JavaScriptCore.pri:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * JavaScriptCoreSources.bkl:
+        * runtime/StructureID.cpp:
+        * runtime/StructureID.h:
+        * runtime/StructureIDChain.cpp: Copied from runtime/StructureID.cpp.
+        * runtime/StructureIDChain.h: Copied from runtime/StructureID.h.
+
</ins><span class="cx"> 2008-10-31  Steve Falkenburg  &lt;sfalken@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Build fix.
</span></span></pre></div>
<a id="trunkJavaScriptCoreGNUmakefileam"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/GNUmakefile.am (38045 => 38046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/GNUmakefile.am        2008-10-31 19:53:08 UTC (rev 38045)
+++ trunk/JavaScriptCore/GNUmakefile.am        2008-10-31 19:53:20 UTC (rev 38046)
</span><span class="lines">@@ -231,6 +231,8 @@
</span><span class="cx">         JavaScriptCore/runtime/StringPrototype.h \
</span><span class="cx">         JavaScriptCore/runtime/StructureID.cpp \
</span><span class="cx">         JavaScriptCore/runtime/StructureID.h \
</span><ins>+        JavaScriptCore/runtime/StructureIDChain.cpp \
+        JavaScriptCore/runtime/StructureIDChain.h \
</ins><span class="cx">         JavaScriptCore/runtime/StructureIDTransitionTable.h \
</span><span class="cx">         JavaScriptCore/wrec/CharacterClassConstructor.cpp \
</span><span class="cx">         JavaScriptCore/wrec/CharacterClassConstructor.h \
</span></span></pre></div>
<a id="trunkJavaScriptCoreJavaScriptCorepri"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/JavaScriptCore.pri (38045 => 38046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/JavaScriptCore.pri        2008-10-31 19:53:08 UTC (rev 38045)
+++ trunk/JavaScriptCore/JavaScriptCore.pri        2008-10-31 19:53:20 UTC (rev 38046)
</span><span class="lines">@@ -135,6 +135,7 @@
</span><span class="cx">     runtime/StringObject.cpp \
</span><span class="cx">     runtime/StringPrototype.cpp \
</span><span class="cx">     runtime/StructureID.cpp \
</span><ins>+    runtime/StructureIDChain.cpp \
</ins><span class="cx">     kjs/ustring.cpp \
</span><span class="cx">     profiler/HeavyProfile.cpp \
</span><span class="cx">     profiler/Profile.cpp \
</span></span></pre></div>
<a id="trunkJavaScriptCoreJavaScriptCorevcprojJavaScriptCoreJavaScriptCorevcproj"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj (38045 => 38046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj        2008-10-31 19:53:08 UTC (rev 38045)
+++ trunk/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj        2008-10-31 19:53:20 UTC (rev 38046)
</span><span class="lines">@@ -877,6 +877,14 @@
</span><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><ins>+                                RelativePath=&quot;..\..\runtime\StructureIDChain.cpp&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
+                                RelativePath=&quot;..\..\runtime\StructureIDChain.h&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
</ins><span class="cx">                                 RelativePath=&quot;..\..\runtime\StructureIDTransitionTable.h&quot;
</span><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span></span></pre></div>
<a id="trunkJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (38045 => 38046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2008-10-31 19:53:08 UTC (rev 38045)
+++ trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2008-10-31 19:53:20 UTC (rev 38046)
</span><span class="lines">@@ -82,6 +82,8 @@
</span><span class="cx">                 65FDE49C0BDD1D4A00E80111 /* Assertions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65E217B808E7EECC0023E5F6 /* Assertions.cpp */; settings = {COMPILER_FLAGS = &quot;-Wno-missing-format-attribute&quot;; }; };
</span><span class="cx">                 7E2ADD8E0E79AAD500D50C51 /* CharacterClassConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E2ADD8D0E79AAD500D50C51 /* CharacterClassConstructor.h */; };
</span><span class="cx">                 7E2ADD900E79AC1100D50C51 /* CharacterClassConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E2ADD8F0E79AC1100D50C51 /* CharacterClassConstructor.cpp */; };
</span><ins>+                7E4EE7090EBB7963005934AA /* StructureIDChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4EE7080EBB7963005934AA /* StructureIDChain.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7E4EE70F0EBB7A5B005934AA /* StructureIDChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E4EE70E0EBB7A5B005934AA /* StructureIDChain.cpp */; };
</ins><span class="cx">                 8613F45A0E3A433E00C948FD /* SamplingTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8613F4580E3A433E00C948FD /* SamplingTool.cpp */; };
</span><span class="cx">                 8613F45B0E3A433E00C948FD /* SamplingTool.h in Headers */ = {isa = PBXBuildFile; fileRef = 8613F4590E3A433E00C948FD /* SamplingTool.h */; };
</span><span class="cx">                 8683B02E0E636482004C19EE /* CTI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8683B02B0E636482004C19EE /* CTI.cpp */; };
</span><span class="lines">@@ -522,6 +524,8 @@
</span><span class="cx">                 7E2ADD8D0E79AAD500D50C51 /* CharacterClassConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterClassConstructor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7E2ADD8F0E79AC1100D50C51 /* CharacterClassConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CharacterClassConstructor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7E2C6C980D31C6B6002D44E2 /* ScopeChainMark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScopeChainMark.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                7E4EE7080EBB7963005934AA /* StructureIDChain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureIDChain.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7E4EE70E0EBB7A5B005934AA /* StructureIDChain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StructureIDChain.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 8613F4580E3A433E00C948FD /* SamplingTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SamplingTool.cpp; path = VM/SamplingTool.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8613F4590E3A433E00C948FD /* SamplingTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SamplingTool.h; path = VM/SamplingTool.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8683B02B0E636482004C19EE /* CTI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CTI.cpp; path = VM/CTI.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -1265,6 +1269,8 @@
</span><span class="cx">                                 BC18C3C60E16EE3300B34460 /* StringPrototype.h */,
</span><span class="cx">                                 BCDE3AB00E6C82CF001453A7 /* StructureID.cpp */,
</span><span class="cx">                                 BCDE3AB10E6C82CF001453A7 /* StructureID.h */,
</span><ins>+                                7E4EE70E0EBB7A5B005934AA /* StructureIDChain.cpp */,
+                                7E4EE7080EBB7963005934AA /* StructureIDChain.h */,
</ins><span class="cx">                                 BC9041470EB9250900FE26FA /* StructureIDTransitionTable.h */,
</span><span class="cx">                         );
</span><span class="cx">                         path = runtime;
</span><span class="lines">@@ -1557,6 +1563,7 @@
</span><span class="cx">                                 BC9041480EB9250900FE26FA /* StructureIDTransitionTable.h in Headers */,
</span><span class="cx">                                 BC95437D0EBA70FD0072B6D3 /* PropertyMapHashTable.h in Headers */,
</span><span class="cx">                                 1C61516D0EBAC7A00031376F /* ProfilerServer.h in Headers */,
</span><ins>+                                7E4EE7090EBB7963005934AA /* StructureIDChain.h in Headers */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span><span class="lines">@@ -1876,6 +1883,7 @@
</span><span class="cx">                                 BCDE3B430E6C832D001453A7 /* StructureID.cpp in Sources */,
</span><span class="cx">                                 7E2ADD900E79AC1100D50C51 /* CharacterClassConstructor.cpp in Sources */,
</span><span class="cx">                                 1C61516C0EBAC7A00031376F /* ProfilerServer.mm in Sources */,
</span><ins>+                                7E4EE70F0EBB7A5B005934AA /* StructureIDChain.cpp in Sources */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span></span></pre></div>
<a id="trunkJavaScriptCoreJavaScriptCoreSourcesbkl"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/JavaScriptCoreSources.bkl (38045 => 38046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/JavaScriptCoreSources.bkl        2008-10-31 19:53:08 UTC (rev 38045)
+++ trunk/JavaScriptCore/JavaScriptCoreSources.bkl        2008-10-31 19:53:20 UTC (rev 38046)
</span><span class="lines">@@ -140,6 +140,7 @@
</span><span class="cx">         runtime/StringObject.cpp
</span><span class="cx">         runtime/StringPrototype.cpp
</span><span class="cx">         runtime/StructureID.cpp
</span><ins>+        runtime/StructureIDChain.cpp
</ins><span class="cx">     &lt;/set&gt;
</span><span class="cx">     &lt;set append=&quot;1&quot; var=&quot;JSCORE_VM_SOURCES&quot;&gt;
</span><span class="cx">         VM/CodeBlock.cpp
</span></span></pre></div>
<a id="trunkJavaScriptCoreruntimeStructureIDcpp"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/runtime/StructureID.cpp (38045 => 38046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/runtime/StructureID.cpp        2008-10-31 19:53:08 UTC (rev 38045)
+++ trunk/JavaScriptCore/runtime/StructureID.cpp        2008-10-31 19:53:20 UTC (rev 38046)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;JSObject.h&quot;
</span><span class="cx"> #include &quot;PropertyNameArray.h&quot;
</span><ins>+#include &quot;StructureIDChain.h&quot;
</ins><span class="cx"> #include &quot;identifier.h&quot;
</span><span class="cx"> #include &quot;lookup.h&quot;
</span><span class="cx"> #include &lt;wtf/RefCountedLeakCounter.h&gt;
</span><span class="lines">@@ -892,44 +893,4 @@
</span><span class="cx"> 
</span><span class="cx"> #endif // DO_PROPERTYMAP_CONSTENCY_CHECK
</span><span class="cx"> 
</span><del>-// StructureIDChain
-
-StructureIDChain::StructureIDChain(StructureID* structureID)
-{
-    size_t size = 1;
-
-    StructureID* tmp = structureID;
-    while (!tmp-&gt;storedPrototype()-&gt;isNull()) {
-        ++size;
-        tmp = asCell(tmp-&gt;storedPrototype())-&gt;structureID();
-    }
-    
-    m_vector.set(new RefPtr&lt;StructureID&gt;[size + 1]);
-
-    size_t i;
-    for (i = 0; i &lt; size - 1; ++i) {
-        m_vector[i] = structureID;
-        structureID = asObject(structureID-&gt;storedPrototype())-&gt;structureID();
-    }
-    m_vector[i] = structureID;
-    m_vector[i + 1] = 0;
-}
-
-bool structureIDChainsAreEqual(StructureIDChain* chainA, StructureIDChain* chainB)
-{
-    if (!chainA || !chainB)
-        return false;
-
-    RefPtr&lt;StructureID&gt;* a = chainA-&gt;head();
-    RefPtr&lt;StructureID&gt;* b = chainB-&gt;head();
-    while (1) {
-        if (*a != *b)
-            return false;
-        if (!*a)
-            return true;
-        a++;
-        b++;
-    }
-}
-
</del><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkJavaScriptCoreruntimeStructureIDh"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/runtime/StructureID.h (38045 => 38046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/runtime/StructureID.h        2008-10-31 19:53:08 UTC (rev 38045)
+++ trunk/JavaScriptCore/runtime/StructureID.h        2008-10-31 19:53:20 UTC (rev 38046)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;JSType.h&quot;
</span><span class="cx"> #include &quot;JSValue.h&quot;
</span><span class="cx"> #include &quot;PropertyMapHashTable.h&quot;
</span><ins>+#include &quot;StructureIDChain.h&quot;
</ins><span class="cx"> #include &quot;StructureIDTransitionTable.h&quot;
</span><span class="cx"> #include &quot;TypeInfo.h&quot;
</span><span class="cx"> #include &quot;identifier.h&quot;
</span><span class="lines">@@ -51,7 +52,6 @@
</span><span class="cx"> 
</span><span class="cx">     class PropertyNameArray;
</span><span class="cx">     class PropertyNameArrayData;
</span><del>-    class StructureIDChain;
</del><span class="cx"> 
</span><span class="cx">     class StructureID : public RefCounted&lt;StructureID&gt; {
</span><span class="cx">     public:
</span><span class="lines">@@ -215,20 +215,6 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    class StructureIDChain : public RefCounted&lt;StructureIDChain&gt; {
-    public:
-        static PassRefPtr&lt;StructureIDChain&gt; create(StructureID* structureID) { return adoptRef(new StructureIDChain(structureID)); }
-
-        RefPtr&lt;StructureID&gt;* head() { return m_vector.get(); }
-
-    private:
-        StructureIDChain(StructureID* structureID);
-
-        OwnArrayPtr&lt;RefPtr&lt;StructureID&gt; &gt; m_vector;
-    };
-
-    bool structureIDChainsAreEqual(StructureIDChain*, StructureIDChain*);
-
</del><span class="cx"> } // namespace JSC
</span><span class="cx"> 
</span><span class="cx"> #endif // StructureID_h
</span></span></pre></div>
<a id="trunkJavaScriptCoreruntimeStructureIDChaincppfromrev38044trunkJavaScriptCoreruntimeStructureIDcpp"></a>
<div class="copfile"><h4>Copied: trunk/JavaScriptCore/runtime/StructureIDChain.cpp (from rev 38044, trunk/JavaScriptCore/runtime/StructureID.cpp) (0 => 38046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/runtime/StructureIDChain.cpp                                (rev 0)
+++ trunk/JavaScriptCore/runtime/StructureIDChain.cpp        2008-10-31 19:53:20 UTC (rev 38046)
</span><span class="lines">@@ -0,0 +1,73 @@
</span><ins>+/*
+ * Copyright (C) 2008 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include &quot;config.h&quot;
+#include &quot;StructureIDChain.h&quot;
+
+#include &quot;JSObject.h&quot;
+#include &quot;StructureID.h&quot;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace JSC {
+
+StructureIDChain::StructureIDChain(StructureID* structureID)
+{
+    size_t size = 1;
+
+    StructureID* tmp = structureID;
+    while (!tmp-&gt;storedPrototype()-&gt;isNull()) {
+        ++size;
+        tmp = asCell(tmp-&gt;storedPrototype())-&gt;structureID();
+    }
+    
+    m_vector.set(new RefPtr&lt;StructureID&gt;[size + 1]);
+
+    size_t i;
+    for (i = 0; i &lt; size - 1; ++i) {
+        m_vector[i] = structureID;
+        structureID = asObject(structureID-&gt;storedPrototype())-&gt;structureID();
+    }
+    m_vector[i] = structureID;
+    m_vector[i + 1] = 0;
+}
+
+bool structureIDChainsAreEqual(StructureIDChain* chainA, StructureIDChain* chainB)
+{
+    if (!chainA || !chainB)
+        return false;
+
+    RefPtr&lt;StructureID&gt;* a = chainA-&gt;head();
+    RefPtr&lt;StructureID&gt;* b = chainB-&gt;head();
+    while (1) {
+        if (*a != *b)
+            return false;
+        if (!*a)
+            return true;
+        a++;
+        b++;
+    }
+}
+
+} // namespace JSC
</ins></span></pre></div>
<a id="trunkJavaScriptCoreruntimeStructureIDChaincpp"></a>
<div class="propset"><h4>Property changes: trunk/JavaScriptCore/runtime/StructureIDChain.cpp</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="trunkJavaScriptCoreruntimeStructureIDChainhfromrev38044trunkJavaScriptCoreruntimeStructureIDh"></a>
<div class="copfile"><h4>Copied: trunk/JavaScriptCore/runtime/StructureIDChain.h (from rev 38044, trunk/JavaScriptCore/runtime/StructureID.h) (0 => 38046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/runtime/StructureIDChain.h                                (rev 0)
+++ trunk/JavaScriptCore/runtime/StructureIDChain.h        2008-10-31 19:53:20 UTC (rev 38046)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2008 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef StructureIDChain_h
+#define StructureIDChain_h
+
+#include &lt;wtf/OwnArrayPtr.h&gt;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace JSC {
+
+    class StructureID;
+
+    class StructureIDChain : public RefCounted&lt;StructureIDChain&gt; {
+    public:
+        static PassRefPtr&lt;StructureIDChain&gt; create(StructureID* structureID) { return adoptRef(new StructureIDChain(structureID)); }
+
+        RefPtr&lt;StructureID&gt;* head() { return m_vector.get(); }
+
+    private:
+        StructureIDChain(StructureID* structureID);
+
+        OwnArrayPtr&lt;RefPtr&lt;StructureID&gt; &gt; m_vector;
+    };
+
+    bool structureIDChainsAreEqual(StructureIDChain*, StructureIDChain*);
+
+} // namespace JSC
+
+#endif // StructureIDChain_h
</ins></span></pre></div>
<a id="trunkJavaScriptCoreruntimeStructureIDChainh"></a>
<div class="propset"><h4>Property changes: trunk/JavaScriptCore/runtime/StructureIDChain.h</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
</div>

</body>
</html>