<!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>[170382] branches/ftlopt/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/170382">170382</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2014-06-24 12:51:11 -0700 (Tue, 24 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[ftlopt] GC should notify us if it resets to_this
https://bugs.webkit.org/show_bug.cgi?id=128231

Reviewed by Geoffrey Garen.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeList.json:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finalizeUnconditionally):
* bytecode/Instruction.h:
* bytecode/ToThisStatus.cpp: Added.
(JSC::merge):
(WTF::printInternal):
* bytecode/ToThisStatus.h: Added.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesftloptSourceJavaScriptCoreCMakeListstxt">branches/ftlopt/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#branchesftloptSourceJavaScriptCoreChangeLog">branches/ftlopt/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchesftloptSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj">branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj</a></li>
<li><a href="#branchesftloptSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchesftloptSourceJavaScriptCorebytecodeBytecodeListjson">branches/ftlopt/Source/JavaScriptCore/bytecode/BytecodeList.json</a></li>
<li><a href="#branchesftloptSourceJavaScriptCorebytecodeCodeBlockcpp">branches/ftlopt/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#branchesftloptSourceJavaScriptCorebytecodeInstructionh">branches/ftlopt/Source/JavaScriptCore/bytecode/Instruction.h</a></li>
<li><a href="#branchesftloptSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">branches/ftlopt/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#branchesftloptSourceJavaScriptCoredfgDFGByteCodeParsercpp">branches/ftlopt/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp</a></li>
<li><a href="#branchesftloptSourceJavaScriptCorellintLowLevelInterpreter32_64asm">branches/ftlopt/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm</a></li>
<li><a href="#branchesftloptSourceJavaScriptCorellintLowLevelInterpreter64asm">branches/ftlopt/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm</a></li>
<li><a href="#branchesftloptSourceJavaScriptCoreruntimeCommonSlowPathscpp">branches/ftlopt/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchesftloptSourceJavaScriptCorebytecodeToThisStatuscpp">branches/ftlopt/Source/JavaScriptCore/bytecode/ToThisStatus.cpp</a></li>
<li><a href="#branchesftloptSourceJavaScriptCorebytecodeToThisStatush">branches/ftlopt/Source/JavaScriptCore/bytecode/ToThisStatus.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesftloptSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/CMakeLists.txt (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/CMakeLists.txt        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/CMakeLists.txt        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -93,6 +93,7 @@
</span><span class="cx">     bytecode/StructureSet.cpp
</span><span class="cx">     bytecode/StructureStubClearingWatchpoint.cpp
</span><span class="cx">     bytecode/StructureStubInfo.cpp
</span><ins>+    bytecode/ToThisStatus.cpp
</ins><span class="cx">     bytecode/UnlinkedCodeBlock.cpp
</span><span class="cx">     bytecode/UnlinkedInstructionStream.cpp
</span><span class="cx">     bytecode/ValueRecovery.cpp
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/ChangeLog (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/ChangeLog        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/ChangeLog        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -1,5 +1,33 @@
</span><span class="cx"> 2014-06-24  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        [ftlopt] GC should notify us if it resets to_this
+        https://bugs.webkit.org/show_bug.cgi?id=128231
+
+        Reviewed by Geoffrey Garen.
+
+        * CMakeLists.txt:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * bytecode/BytecodeList.json:
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::dumpBytecode):
+        (JSC::CodeBlock::finalizeUnconditionally):
+        * bytecode/Instruction.h:
+        * bytecode/ToThisStatus.cpp: Added.
+        (JSC::merge):
+        (WTF::printInternal):
+        * bytecode/ToThisStatus.h: Added.
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::BytecodeGenerator):
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::parseBlock):
+        * llint/LowLevelInterpreter32_64.asm:
+        * llint/LowLevelInterpreter64.asm:
+        * runtime/CommonSlowPaths.cpp:
+        (JSC::SLOW_PATH_DECL):
+
+2014-06-24  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
</ins><span class="cx">         [ftlopt] StructureAbstractValue::onlyStructure() should return nullptr if isClobbered()
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=134256
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -347,6 +347,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\bytecode\StructureSet.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\bytecode\StructureStubClearingWatchpoint.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\bytecode\StructureStubInfo.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\bytecode\ToThisStatus.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\bytecode\UnlinkedCodeBlock.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\bytecode\UnlinkedInstructionStream.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\bytecode\ValueRecovery.cpp&quot; /&gt;
</span><span class="lines">@@ -890,6 +891,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\StructureSet.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\StructureStubClearingWatchpoint.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\StructureStubInfo.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\bytecode\ToThisStatus.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\UnlinkedCodeBlock.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\UnlinkedInstructionStream.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\ValueProfile.h&quot; /&gt;
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -355,6 +355,8 @@
</span><span class="cx">                 0F766D3815AE4A1C008F363E /* StructureStubClearingWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F766D3615AE4A1A008F363E /* StructureStubClearingWatchpoint.cpp */; };
</span><span class="cx">                 0F766D3915AE4A1F008F363E /* StructureStubClearingWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F766D3715AE4A1A008F363E /* StructureStubClearingWatchpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F7700921402FF3C0078EB39 /* SamplingCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F7700911402FF280078EB39 /* SamplingCounter.cpp */; };
</span><ins>+                0F7AB82E1958DA1C00C6881F /* ToThisStatus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F7AB82C1958DA1C00C6881F /* ToThisStatus.cpp */; };
+                0F7AB82F1958DA1C00C6881F /* ToThisStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F7AB82D1958DA1C00C6881F /* ToThisStatus.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD82E1F14172C2F00179C94 /* DFGCapabilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F7B294D14C3CD4C007C3DB1 /* DFGCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC0977E1469EBC400CF2442 /* DFGCommon.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F8023EA1613832B00A0BA45 /* ByValInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F8023E91613832300A0BA45 /* ByValInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2522,6 +2524,8 @@
</span><span class="cx">                 0F766D3715AE4A1A008F363E /* StructureStubClearingWatchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureStubClearingWatchpoint.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F77008E1402FDD60078EB39 /* SamplingCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SamplingCounter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F7700911402FF280078EB39 /* SamplingCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SamplingCounter.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                0F7AB82C1958DA1C00C6881F /* ToThisStatus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ToThisStatus.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F7AB82D1958DA1C00C6881F /* ToThisStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToThisStatus.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0F8023E91613832300A0BA45 /* ByValInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByValInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F8335B41639C1E3001443B5 /* ArrayAllocationProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayAllocationProfile.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F8335B51639C1E3001443B5 /* ArrayAllocationProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayAllocationProfile.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5420,6 +5424,8 @@
</span><span class="cx">                                 0F766D3715AE4A1A008F363E /* StructureStubClearingWatchpoint.h */,
</span><span class="cx">                                 BCCF0D0B0EF0B8A500413C8F /* StructureStubInfo.cpp */,
</span><span class="cx">                                 BCCF0D070EF0AAB900413C8F /* StructureStubInfo.h */,
</span><ins>+                                0F7AB82C1958DA1C00C6881F /* ToThisStatus.cpp */,
+                                0F7AB82D1958DA1C00C6881F /* ToThisStatus.h */,
</ins><span class="cx">                                 A79E781E15EECBA80047C855 /* UnlinkedCodeBlock.cpp */,
</span><span class="cx">                                 A79E781F15EECBA80047C855 /* UnlinkedCodeBlock.h */,
</span><span class="cx">                                 B59F89381891ADB500D5CCDC /* UnlinkedInstructionStream.cpp */,
</span><span class="lines">@@ -6262,6 +6268,7 @@
</span><span class="cx">                                 A5840E21187B7B8600843B10 /* InjectedScriptModule.h in Headers */,
</span><span class="cx">                                 A513E5C7185F9446007E95AD /* InjectedScriptSource.h in Headers */,
</span><span class="cx">                                 A5840E29187CA5E600843B10 /* inline-and-minify-stylesheets-and-scripts.py in Headers */,
</span><ins>+                                0F7AB82F1958DA1C00C6881F /* ToThisStatus.h in Headers */,
</ins><span class="cx">                                 0F24E55617F0B71C00ABB217 /* InlineCallFrameSet.h in Headers */,
</span><span class="cx">                                 99E45A2718A1B2590026D88F /* InputCursor.h in Headers */,
</span><span class="cx">                                 A593CF7F1840362C00BFCE27 /* InspectorAgentBase.h in Headers */,
</span><span class="lines">@@ -7923,6 +7930,7 @@
</span><span class="cx">                                 0FCEFACD1805E75500472CE4 /* LLVMAPI.cpp in Sources */,
</span><span class="cx">                                 A7E5AB371799E4B200D2833D /* LLVMDisassembler.cpp in Sources */,
</span><span class="cx">                                 0F4CED5E18CEA7AB00802FE0 /* PolymorphicGetByIdList.cpp in Sources */,
</span><ins>+                                0F7AB82E1958DA1C00C6881F /* ToThisStatus.cpp in Sources */,
</ins><span class="cx">                                 14469DDE107EC7E700650446 /* Lookup.cpp in Sources */,
</span><span class="cx">                                 0F4680CC14BBB17A00BFE272 /* LowLevelInterpreter.cpp in Sources */,
</span><span class="cx">                                 14B723B212D7DA46003BD5ED /* MachineStackMarker.cpp in Sources */,
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCorebytecodeBytecodeListjson"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/bytecode/BytecodeList.json (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/bytecode/BytecodeList.json        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/bytecode/BytecodeList.json        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx">             { &quot;name&quot; : &quot;op_create_arguments&quot;, &quot;length&quot; : 2 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_create_this&quot;, &quot;length&quot; : 4 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_get_callee&quot;, &quot;length&quot; : 3 },
</span><del>-            { &quot;name&quot; : &quot;op_to_this&quot;, &quot;length&quot; : 3 },
</del><ins>+            { &quot;name&quot; : &quot;op_to_this&quot;, &quot;length&quot; : 4 },
</ins><span class="cx">             { &quot;name&quot; : &quot;op_new_object&quot;, &quot;length&quot; : 4 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_new_array&quot;, &quot;length&quot; : 5 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_new_array_with_size&quot;, &quot;length&quot; : 4 },
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/bytecode/CodeBlock.cpp (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -780,6 +780,7 @@
</span><span class="cx">             Structure* structure = (++it)-&gt;u.structure.get();
</span><span class="cx">             if (structure)
</span><span class="cx">                 out.print(&quot; cache(struct = &quot;, RawPointer(structure), &quot;)&quot;);
</span><ins>+            out.print(&quot; &quot;, (++it)-&gt;u.toThisStatus);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_new_object: {
</span><span class="lines">@@ -2322,6 +2323,8 @@
</span><span class="cx">                 if (Options::verboseOSR())
</span><span class="cx">                     dataLogF(&quot;Clearing LLInt to_this with structure %p.\n&quot;, curInstruction[2].u.structure.get());
</span><span class="cx">                 curInstruction[2].u.structure.clear();
</span><ins>+                curInstruction[3].u.toThisStatus = merge(
+                    curInstruction[3].u.toThisStatus, ToThisClearedByGC);
</ins><span class="cx">                 break;
</span><span class="cx">             case op_get_callee:
</span><span class="cx">                 if (!curInstruction[2].u.jsCell || Heap::isMarked(curInstruction[2].u.jsCell.get()))
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCorebytecodeInstructionh"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/bytecode/Instruction.h (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/bytecode/Instruction.h        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/bytecode/Instruction.h        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2008, 2012, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2008, 2012, 2013, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include &quot;SpecialPointer.h&quot;
</span><span class="cx"> #include &quot;Structure.h&quot;
</span><span class="cx"> #include &quot;StructureChain.h&quot;
</span><ins>+#include &quot;ToThisStatus.h&quot;
</ins><span class="cx"> #include &quot;VirtualRegister.h&quot;
</span><span class="cx"> #include &lt;wtf/VectorTraits.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -118,6 +119,7 @@
</span><span class="cx">         WriteBarrierBase&lt;JSActivation&gt; activation;
</span><span class="cx">         void* pointer;
</span><span class="cx">         bool* predicatePointer;
</span><ins>+        ToThisStatus toThisStatus;
</ins><span class="cx">     } u;
</span><span class="cx">         
</span><span class="cx"> private:
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCorebytecodeToThisStatuscpp"></a>
<div class="addfile"><h4>Added: branches/ftlopt/Source/JavaScriptCore/bytecode/ToThisStatus.cpp (0 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/bytecode/ToThisStatus.cpp                                (rev 0)
+++ branches/ftlopt/Source/JavaScriptCore/bytecode/ToThisStatus.cpp        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include &quot;config.h&quot;
+#include &quot;ToThisStatus.h&quot;
+
+namespace JSC {
+
+ToThisStatus merge(ToThisStatus a, ToThisStatus b)
+{
+    switch (a) {
+    case ToThisOK:
+        return b;
+    case ToThisConflicted:
+        return ToThisConflicted;
+    case ToThisClearedByGC:
+        if (b == ToThisConflicted)
+            return ToThisConflicted;
+        return ToThisClearedByGC;
+    }
+    
+    RELEASE_ASSERT_NOT_REACHED();
+    return ToThisConflicted;
+}
+
+} // namespace JSC
+
+namespace WTF {
+
+using namespace JSC;
+
+void printInternal(PrintStream&amp; out, ToThisStatus status)
+{
+    switch (status) {
+    case ToThisOK:
+        out.print(&quot;OK&quot;);
+        return;
+    case ToThisConflicted:
+        out.print(&quot;Conflicted&quot;);
+        return;
+    case ToThisClearedByGC:
+        out.print(&quot;ClearedByGC&quot;);
+        return;
+    }
+    
+    RELEASE_ASSERT_NOT_REACHED();
+}
+
+} // namespace WTF
+
</ins></span></pre></div>
<a id="branchesftloptSourceJavaScriptCorebytecodeToThisStatush"></a>
<div class="addfile"><h4>Added: branches/ftlopt/Source/JavaScriptCore/bytecode/ToThisStatus.h (0 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/bytecode/ToThisStatus.h                                (rev 0)
+++ branches/ftlopt/Source/JavaScriptCore/bytecode/ToThisStatus.h        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef ToThisStatus_h
+#define ToThisStatus_h
+
+#include &lt;wtf/PrintStream.h&gt;
+
+namespace JSC {
+
+enum ToThisStatus {
+    ToThisOK,
+    ToThisConflicted,
+    ToThisClearedByGC
+};
+
+ToThisStatus merge(ToThisStatus, ToThisStatus);
+
+} // namespace JSC
+
+namespace WTF {
+
+void printInternal(PrintStream&amp;, JSC::ToThisStatus);
+
+} // namespace WTF
+
+#endif // ToThisStatus_h
+
</ins></span></pre></div>
<a id="branchesftloptSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -410,6 +410,7 @@
</span><span class="cx">         emitOpcode(op_to_this);
</span><span class="cx">         instructions().append(kill(&amp;m_thisRegister));
</span><span class="cx">         instructions().append(0);
</span><ins>+        instructions().append(0);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoredfgDFGByteCodeParsercpp"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -2012,7 +2012,8 @@
</span><span class="cx">             Node* op1 = getThis();
</span><span class="cx">             if (op1-&gt;op() != ToThis) {
</span><span class="cx">                 Structure* cachedStructure = currentInstruction[2].u.structure.get();
</span><del>-                if (!cachedStructure
</del><ins>+                if (currentInstruction[2].u.toThisStatus != ToThisOK
+                    || !cachedStructure
</ins><span class="cx">                     || cachedStructure-&gt;classInfo()-&gt;methodTable.toThis != JSObject::info()-&gt;methodTable.toThis
</span><span class="cx">                     || m_inlineStackTop-&gt;m_profiledBlock-&gt;couldTakeSlowCase(m_currentIndex)
</span><span class="cx">                     || m_inlineStackTop-&gt;m_exitProfile.hasExitSite(m_currentIndex, BadCache)
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCorellintLowLevelInterpreter32_64asm"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -760,11 +760,11 @@
</span><span class="cx">     bbneq JSCell::m_type[t0], FinalObjectType, .opToThisSlow
</span><span class="cx">     loadpFromInstruction(2, t2)
</span><span class="cx">     bpneq JSCell::m_structureID[t0], t2, .opToThisSlow
</span><del>-    dispatch(3)
</del><ins>+    dispatch(4)
</ins><span class="cx"> 
</span><span class="cx"> .opToThisSlow:
</span><span class="cx">     callSlowPath(_slow_path_to_this)
</span><del>-    dispatch(3)
</del><ins>+    dispatch(4)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> _llint_op_new_object:
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCorellintLowLevelInterpreter64asm"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -622,11 +622,11 @@
</span><span class="cx">     loadStructureWithScratch(t0, t1, t2)
</span><span class="cx">     loadpFromInstruction(2, t2)
</span><span class="cx">     bpneq t1, t2, .opToThisSlow
</span><del>-    dispatch(3)
</del><ins>+    dispatch(4)
</ins><span class="cx"> 
</span><span class="cx"> .opToThisSlow:
</span><span class="cx">     callSlowPath(_slow_path_to_this)
</span><del>-    dispatch(3)
</del><ins>+    dispatch(4)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> _llint_op_new_object:
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoreruntimeCommonSlowPathscpp"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp (170381 => 170382)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp        2014-06-24 19:49:25 UTC (rev 170381)
+++ branches/ftlopt/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp        2014-06-24 19:51:11 UTC (rev 170382)
</span><span class="lines">@@ -251,10 +251,18 @@
</span><span class="cx"> {
</span><span class="cx">     BEGIN();
</span><span class="cx">     JSValue v1 = OP(1).jsValue();
</span><del>-    if (v1.isCell())
-        pc[2].u.structure.set(vm, exec-&gt;codeBlock()-&gt;ownerExecutable(), v1.asCell()-&gt;structure(vm));
-    else
</del><ins>+    if (v1.isCell()) {
+        Structure* myStructure = v1.asCell()-&gt;structure(vm);
+        Structure* otherStructure = pc[2].u.structure.get();
+        if (myStructure != otherStructure) {
+            if (otherStructure)
+                pc[3].u.toThisStatus = ToThisConflicted;
+            pc[2].u.structure.set(vm, exec-&gt;codeBlock()-&gt;ownerExecutable(), myStructure);
+        }
+    } else {
+        pc[3].u.toThisStatus = ToThisConflicted;
</ins><span class="cx">         pc[2].u.structure.clear();
</span><ins>+    }
</ins><span class="cx">     RETURN(v1.toThis(exec, exec-&gt;codeBlock()-&gt;isStrictMode() ? StrictMode : NotStrictMode));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>