<!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>[169148] 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/169148">169148</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2014-05-20 22:16:40 -0700 (Tue, 20 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[ftlopt] A StructureSet with one element should only require one word and no allocation
https://bugs.webkit.org/show_bug.cgi?id=133014
Reviewed by Oliver Hunt.
This makes it more efficient to use StructureSet in situations where the common case is
just one structure.
I also took the opportunity to use the same set terminology we use in BitVector: merge,
filter, exclude, contains, etc.
Eventually, this will be used to implement StructureAbstractValue as well.
* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/StructureSet.cpp: Added.
(JSC::StructureSet::StructureSet):
(JSC::StructureSet::operator=):
(JSC::StructureSet::clear):
(JSC::StructureSet::add):
(JSC::StructureSet::remove):
(JSC::StructureSet::contains):
(JSC::StructureSet::merge):
(JSC::StructureSet::filter):
(JSC::StructureSet::exclude):
(JSC::StructureSet::isSubsetOf):
(JSC::StructureSet::overlaps):
(JSC::StructureSet::operator==):
(JSC::StructureSet::speculationFromStructures):
(JSC::StructureSet::arrayModesFromStructures):
(JSC::StructureSet::dumpInContext):
(JSC::StructureSet::dump):
(JSC::StructureSet::addOutOfLine):
(JSC::StructureSet::containsOutOfLine):
(JSC::StructureSet::copyFrom):
(JSC::StructureSet::OutOfLineList::create):
(JSC::StructureSet::OutOfLineList::destroy):
* bytecode/StructureSet.h:
(JSC::StructureSet::StructureSet):
(JSC::StructureSet::~StructureSet):
(JSC::StructureSet::onlyStructure):
(JSC::StructureSet::isEmpty):
(JSC::StructureSet::size):
(JSC::StructureSet::at):
(JSC::StructureSet::operator[]):
(JSC::StructureSet::last):
(JSC::StructureSet::OutOfLineList::list):
(JSC::StructureSet::OutOfLineList::OutOfLineList):
(JSC::StructureSet::deleteStructureListIfNecessary):
(JSC::StructureSet::isThin):
(JSC::StructureSet::pointer):
(JSC::StructureSet::singleStructure):
(JSC::StructureSet::structureList):
(JSC::StructureSet::set):
(JSC::StructureSet::clear): Deleted.
(JSC::StructureSet::add): Deleted.
(JSC::StructureSet::addAll): Deleted.
(JSC::StructureSet::remove): Deleted.
(JSC::StructureSet::contains): Deleted.
(JSC::StructureSet::containsOnly): Deleted.
(JSC::StructureSet::isSubsetOf): Deleted.
(JSC::StructureSet::overlaps): Deleted.
(JSC::StructureSet::singletonStructure): Deleted.
(JSC::StructureSet::speculationFromStructures): Deleted.
(JSC::StructureSet::arrayModesFromStructures): Deleted.
(JSC::StructureSet::operator==): Deleted.
(JSC::StructureSet::dumpInContext): Deleted.
(JSC::StructureSet::dump): Deleted.
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::emitPrototypeChecks):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToStructureTransitionWatchpoint):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::noticeStructureCheck):</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="#branchesftloptSourceJavaScriptCorebytecodeStructureSeth">branches/ftlopt/Source/JavaScriptCore/bytecode/StructureSet.h</a></li>
<li><a href="#branchesftloptSourceJavaScriptCoredfgDFGAbstractInterpreterInlinesh">branches/ftlopt/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h</a></li>
<li><a href="#branchesftloptSourceJavaScriptCoredfgDFGByteCodeParsercpp">branches/ftlopt/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp</a></li>
<li><a href="#branchesftloptSourceJavaScriptCoredfgDFGCSEPhasecpp">branches/ftlopt/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp</a></li>
<li><a href="#branchesftloptSourceJavaScriptCoredfgDFGNodeh">branches/ftlopt/Source/JavaScriptCore/dfg/DFGNode.h</a></li>
<li><a href="#branchesftloptSourceJavaScriptCoredfgDFGTypeCheckHoistingPhasecpp">branches/ftlopt/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchesftloptSourceJavaScriptCorebytecodeStructureSetcpp">branches/ftlopt/Source/JavaScriptCore/bytecode/StructureSet.cpp</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 (169147 => 169148)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/CMakeLists.txt        2014-05-21 04:59:06 UTC (rev 169147)
+++ branches/ftlopt/Source/JavaScriptCore/CMakeLists.txt        2014-05-21 05:16:40 UTC (rev 169148)
</span><span class="lines">@@ -89,6 +89,7 @@
</span><span class="cx"> bytecode/SamplingTool.cpp
</span><span class="cx"> bytecode/SpecialPointer.cpp
</span><span class="cx"> bytecode/SpeculatedType.cpp
</span><ins>+ bytecode/StructureSet.cpp
</ins><span class="cx"> bytecode/StructureStubClearingWatchpoint.cpp
</span><span class="cx"> bytecode/StructureStubInfo.cpp
</span><span class="cx"> bytecode/UnlinkedCodeBlock.cpp
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/ChangeLog (169147 => 169148)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/ChangeLog        2014-05-21 04:59:06 UTC (rev 169147)
+++ branches/ftlopt/Source/JavaScriptCore/ChangeLog        2014-05-21 05:16:40 UTC (rev 169148)
</span><span class="lines">@@ -1,3 +1,87 @@
</span><ins>+2014-05-16 Filip Pizlo <fpizlo@apple.com>
+
+ [ftlopt] A StructureSet with one element should only require one word and no allocation
+ https://bugs.webkit.org/show_bug.cgi?id=133014
+
+ Reviewed by Oliver Hunt.
+
+ This makes it more efficient to use StructureSet in situations where the common case is
+ just one structure.
+
+ I also took the opportunity to use the same set terminology we use in BitVector: merge,
+ filter, exclude, contains, etc.
+
+ Eventually, this will be used to implement StructureAbstractValue as well.
+
+ * CMakeLists.txt:
+ * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * bytecode/StructureSet.cpp: Added.
+ (JSC::StructureSet::StructureSet):
+ (JSC::StructureSet::operator=):
+ (JSC::StructureSet::clear):
+ (JSC::StructureSet::add):
+ (JSC::StructureSet::remove):
+ (JSC::StructureSet::contains):
+ (JSC::StructureSet::merge):
+ (JSC::StructureSet::filter):
+ (JSC::StructureSet::exclude):
+ (JSC::StructureSet::isSubsetOf):
+ (JSC::StructureSet::overlaps):
+ (JSC::StructureSet::operator==):
+ (JSC::StructureSet::speculationFromStructures):
+ (JSC::StructureSet::arrayModesFromStructures):
+ (JSC::StructureSet::dumpInContext):
+ (JSC::StructureSet::dump):
+ (JSC::StructureSet::addOutOfLine):
+ (JSC::StructureSet::containsOutOfLine):
+ (JSC::StructureSet::copyFrom):
+ (JSC::StructureSet::OutOfLineList::create):
+ (JSC::StructureSet::OutOfLineList::destroy):
+ * bytecode/StructureSet.h:
+ (JSC::StructureSet::StructureSet):
+ (JSC::StructureSet::~StructureSet):
+ (JSC::StructureSet::onlyStructure):
+ (JSC::StructureSet::isEmpty):
+ (JSC::StructureSet::size):
+ (JSC::StructureSet::at):
+ (JSC::StructureSet::operator[]):
+ (JSC::StructureSet::last):
+ (JSC::StructureSet::OutOfLineList::list):
+ (JSC::StructureSet::OutOfLineList::OutOfLineList):
+ (JSC::StructureSet::deleteStructureListIfNecessary):
+ (JSC::StructureSet::isThin):
+ (JSC::StructureSet::pointer):
+ (JSC::StructureSet::singleStructure):
+ (JSC::StructureSet::structureList):
+ (JSC::StructureSet::set):
+ (JSC::StructureSet::clear): Deleted.
+ (JSC::StructureSet::add): Deleted.
+ (JSC::StructureSet::addAll): Deleted.
+ (JSC::StructureSet::remove): Deleted.
+ (JSC::StructureSet::contains): Deleted.
+ (JSC::StructureSet::containsOnly): Deleted.
+ (JSC::StructureSet::isSubsetOf): Deleted.
+ (JSC::StructureSet::overlaps): Deleted.
+ (JSC::StructureSet::singletonStructure): Deleted.
+ (JSC::StructureSet::speculationFromStructures): Deleted.
+ (JSC::StructureSet::arrayModesFromStructures): Deleted.
+ (JSC::StructureSet::operator==): Deleted.
+ (JSC::StructureSet::dumpInContext): Deleted.
+ (JSC::StructureSet::dump): Deleted.
+ * dfg/DFGAbstractInterpreterInlines.h:
+ (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::emitPrototypeChecks):
+ (JSC::DFG::ByteCodeParser::handleGetById):
+ (JSC::DFG::ByteCodeParser::parseBlock):
+ * dfg/DFGCSEPhase.cpp:
+ (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
+ * dfg/DFGNode.h:
+ (JSC::DFG::Node::convertToStructureTransitionWatchpoint):
+ * dfg/DFGTypeCheckHoistingPhase.cpp:
+ (JSC::DFG::TypeCheckHoistingPhase::noticeStructureCheck):
+
</ins><span class="cx"> 2014-05-20 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> [ftlopt] DFG bytecode parser should turn GetById with nothing but a Getter stub as stuff+handleCall, and handleCall should be allowed to inline if it wants to
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (169147 => 169148)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-05-21 04:59:06 UTC (rev 169147)
+++ branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-05-21 05:16:40 UTC (rev 169148)
</span><span class="lines">@@ -343,6 +343,7 @@
</span><span class="cx"> <ClCompile Include="..\bytecode\SamplingTool.cpp" />
</span><span class="cx"> <ClCompile Include="..\bytecode\SpecialPointer.cpp" />
</span><span class="cx"> <ClCompile Include="..\bytecode\SpeculatedType.cpp" />
</span><ins>+ <ClCompile Include="..\bytecode\StructureSet.cpp" />
</ins><span class="cx"> <ClCompile Include="..\bytecode\StructureStubClearingWatchpoint.cpp" />
</span><span class="cx"> <ClCompile Include="..\bytecode\StructureStubInfo.cpp" />
</span><span class="cx"> <ClCompile Include="..\bytecode\UnlinkedCodeBlock.cpp" />
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (169147 => 169148)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-05-21 04:59:06 UTC (rev 169147)
+++ branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-05-21 05:16:40 UTC (rev 169148)
</span><span class="lines">@@ -416,6 +416,7 @@
</span><span class="cx">                 0FB14E1F18124ACE009B6B4D /* JITInlineCacheGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB14E1D18124ACE009B6B4D /* JITInlineCacheGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0FB14E211812570B009B6B4D /* DFGInlineCacheWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB14E201812570B009B6B4D /* DFGInlineCacheWrapper.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0FB14E2318130955009B6B4D /* DFGInlineCacheWrapperInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB14E2218130955009B6B4D /* DFGInlineCacheWrapperInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                0FB438A319270B1D00E1FBC9 /* StructureSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB438A219270B1D00E1FBC9 /* StructureSet.cpp */; };
</ins><span class="cx">                 0FB5467714F59B5C002C2989 /* LazyOperandValueProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB5467614F59AD1002C2989 /* LazyOperandValueProfile.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0FB5467914F5C46B002C2989 /* LazyOperandValueProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB5467814F5C468002C2989 /* LazyOperandValueProfile.cpp */; };
</span><span class="cx">                 0FB5467B14F5C7E1002C2989 /* MethodOfGettingAValueProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB5467A14F5C7D4002C2989 /* MethodOfGettingAValueProfile.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2220,6 +2221,7 @@
</span><span class="cx">                 0FB14E1D18124ACE009B6B4D /* JITInlineCacheGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITInlineCacheGenerator.h; sourceTree = "<group>"; };
</span><span class="cx">                 0FB14E201812570B009B6B4D /* DFGInlineCacheWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGInlineCacheWrapper.h; path = dfg/DFGInlineCacheWrapper.h; sourceTree = "<group>"; };
</span><span class="cx">                 0FB14E2218130955009B6B4D /* DFGInlineCacheWrapperInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGInlineCacheWrapperInlines.h; path = dfg/DFGInlineCacheWrapperInlines.h; sourceTree = "<group>"; };
</span><ins>+                0FB438A219270B1D00E1FBC9 /* StructureSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StructureSet.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 0FB4B51016B3A964003F696B /* DFGMinifiedID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGMinifiedID.h; path = dfg/DFGMinifiedID.h; sourceTree = "<group>"; };
</span><span class="cx">                 0FB4B51916B62772003F696B /* DFGAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAllocator.h; path = dfg/DFGAllocator.h; sourceTree = "<group>"; };
</span><span class="cx">                 0FB4B51A16B62772003F696B /* DFGCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGCommon.cpp; path = dfg/DFGCommon.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -5018,6 +5020,7 @@
</span><span class="cx">                                 0F5541B01613C1FB00CE3E25 /* SpecialPointer.h */,
</span><span class="cx">                                 0FD82E84141F3FDA00179C94 /* SpeculatedType.cpp */,
</span><span class="cx">                                 0FD82E4F141DAEA100179C94 /* SpeculatedType.h */,
</span><ins>+                                0FB438A219270B1D00E1FBC9 /* StructureSet.cpp */,
</ins><span class="cx">                                 0F93329B14CA7DC10085F3C6 /* StructureSet.h */,
</span><span class="cx">                                 0F766D3615AE4A1A008F363E /* StructureStubClearingWatchpoint.cpp */,
</span><span class="cx">                                 0F766D3715AE4A1A008F363E /* StructureStubClearingWatchpoint.h */,
</span><span class="lines">@@ -7178,6 +7181,7 @@
</span><span class="cx">                                 2A83638918D7D0FE0000EBCC /* FullGCActivityCallback.cpp in Sources */,
</span><span class="cx">                                 1428083A107EC0750013E7B2 /* JSStack.cpp in Sources */,
</span><span class="cx">                                 147F39D5107EC37600427A48 /* JSString.cpp in Sources */,
</span><ins>+                                0FB438A319270B1D00E1FBC9 /* StructureSet.cpp in Sources */,
</ins><span class="cx">                                 2600B5A6152BAAA70091EE5F /* JSStringJoiner.cpp in Sources */,
</span><span class="cx">                                 1482B74E0A43032800517CFC /* JSStringRef.cpp in Sources */,
</span><span class="cx">                                 146AAB380B66A94400E55F16 /* JSStringRefCF.cpp in Sources */,
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCorebytecodeStructureSetcpp"></a>
<div class="addfile"><h4>Added: branches/ftlopt/Source/JavaScriptCore/bytecode/StructureSet.cpp (0 => 169148)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/bytecode/StructureSet.cpp         (rev 0)
+++ branches/ftlopt/Source/JavaScriptCore/bytecode/StructureSet.cpp        2014-05-21 05:16:40 UTC (rev 169148)
</span><span class="lines">@@ -0,0 +1,350 @@
</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 "config.h"
+#include "StructureSet.h"
+
+#include <wtf/CommaPrinter.h>
+
+namespace JSC {
+
+StructureSet::StructureSet(const StructureSet& other)
+{
+ copyFrom(other);
+}
+
+StructureSet& StructureSet::operator=(const StructureSet& other)
+{
+ if (this == &other)
+ return *this;
+ deleteStructureListIfNecessary();
+ copyFrom(other);
+ return *this;
+}
+
+void StructureSet::clear()
+{
+ deleteStructureListIfNecessary();
+ set(0, true);
+}
+
+bool StructureSet::add(Structure* structure)
+{
+ ASSERT(structure);
+ if (isThin()) {
+ if (singleStructure() == structure)
+ return false;
+ if (!singleStructure()) {
+ set(structure);
+ return true;
+ }
+ OutOfLineList* list = OutOfLineList::create(defaultStartingSize);
+ list->m_length = 2;
+ list->list()[0] = singleStructure();
+ list->list()[1] = structure;
+ set(list);
+ return true;
+ }
+
+ return addOutOfLine(structure);
+}
+
+bool StructureSet::remove(Structure* structure)
+{
+ if (isThin()) {
+ if (singleStructure() == structure) {
+ set(0, true);
+ return true;
+ }
+ return false;
+ }
+
+ OutOfLineList* list = structureList();
+ for (unsigned i = 0; i < list->m_length; ++i) {
+ if (list->list()[i] != structure)
+ continue;
+ list->list()[i] = list->list()[--list->m_length];
+ if (!list->m_length) {
+ OutOfLineList::destroy(list);
+ set(0, true);
+ }
+ return true;
+ }
+ return false;
+}
+
+bool StructureSet::contains(Structure* structure) const
+{
+ if (isThin())
+ return singleStructure() == structure;
+
+ return containsOutOfLine(structure);
+}
+
+bool StructureSet::merge(const StructureSet& other)
+{
+ if (other.isThin()) {
+ if (other.singleStructure())
+ return add(other.singleStructure());
+ return false;
+ }
+
+ OutOfLineList* list = other.structureList();
+ if (list->m_length >= 2) {
+ if (isThin()) {
+ OutOfLineList* myNewList = OutOfLineList::create(
+ list->m_length + !!singleStructure());
+ if (singleStructure()) {
+ myNewList->m_length = 1;
+ myNewList->list()[0] = singleStructure();
+ }
+ set(myNewList);
+ }
+ bool changed = false;
+ for (unsigned i = 0; i < list->m_length; ++i)
+ changed |= addOutOfLine(list->list()[i]);
+ return changed;
+ }
+
+ ASSERT(list->m_length);
+ return add(list->list()[0]);
+}
+
+void StructureSet::filter(const StructureSet& other)
+{
+ if (other.isThin()) {
+ if (!other.singleStructure() || !contains(other.singleStructure()))
+ clear();
+ else {
+ clear();
+ set(other.singleStructure());
+ }
+ return;
+ }
+
+ if (isThin()) {
+ if (!singleStructure())
+ return;
+ if (other.containsOutOfLine(singleStructure()))
+ return;
+ clear();
+ return;
+ }
+
+ OutOfLineList* list = structureList();
+ for (unsigned i = 0; i < list->m_length; ++i) {
+ if (other.containsOutOfLine(list->list()[i]))
+ continue;
+ list->list()[i--] = list->list()[--list->m_length];
+ }
+ if (!list->m_length)
+ clear();
+}
+
+void StructureSet::exclude(const StructureSet& other)
+{
+ if (other.isThin()) {
+ if (other.singleStructure())
+ remove(other.singleStructure());
+ return;
+ }
+
+ if (isThin()) {
+ if (!singleStructure())
+ return;
+ if (other.contains(singleStructure()))
+ clear();
+ return;
+ }
+
+ OutOfLineList* list = structureList();
+ for (unsigned i = 0; i < list->m_length; ++i) {
+ if (!other.containsOutOfLine(list->list()[i]))
+ continue;
+ list->list()[i--] = list->list()[--list->m_length];
+ }
+ if (!list->m_length)
+ clear();
+}
+
+bool StructureSet::isSubsetOf(const StructureSet& other) const
+{
+ if (isThin()) {
+ if (!singleStructure())
+ return true;
+ return other.contains(singleStructure());
+ }
+
+ if (other.isThin()) {
+ if (!other.singleStructure())
+ return false;
+ OutOfLineList* list = structureList();
+ if (list->m_length >= 2)
+ return false;
+ if (list->list()[0] == other.singleStructure())
+ return true;
+ return false;
+ }
+
+ OutOfLineList* list = structureList();
+ for (unsigned i = 0; i < list->m_length; ++i) {
+ if (!other.containsOutOfLine(list->list()[i]))
+ return false;
+ }
+ return true;
+}
+
+bool StructureSet::overlaps(const StructureSet& other) const
+{
+ if (isThin()) {
+ if (!singleStructure())
+ return false;
+ return other.contains(singleStructure());
+ }
+
+ if (other.isThin()) {
+ if (!other.singleStructure())
+ return false;
+ return containsOutOfLine(other.singleStructure());
+ }
+
+ OutOfLineList* list = structureList();
+ for (unsigned i = 0; i < list->m_length; ++i) {
+ if (other.containsOutOfLine(list->list()[i]))
+ return true;
+ }
+ return false;
+}
+
+bool StructureSet::operator==(const StructureSet& other) const
+{
+ if (size() != other.size())
+ return false;
+ return isSubsetOf(other);
+}
+
+SpeculatedType StructureSet::speculationFromStructures() const
+{
+ if (isThin()) {
+ if (!singleStructure())
+ return SpecNone;
+ return speculationFromStructure(singleStructure());
+ }
+
+ SpeculatedType result = SpecNone;
+ OutOfLineList* list = structureList();
+ for (unsigned i = 0; i < list->m_length; ++i)
+ mergeSpeculation(result, speculationFromStructure(list->list()[i]));
+ return result;
+}
+
+ArrayModes StructureSet::arrayModesFromStructures() const
+{
+ if (isThin()) {
+ if (!singleStructure())
+ return 0;
+ return asArrayModes(singleStructure()->indexingType());
+ }
+
+ ArrayModes result = 0;
+ OutOfLineList* list = structureList();
+ for (unsigned i = 0; i < list->m_length; ++i)
+ mergeArrayModes(result, asArrayModes(list->list()[i]->indexingType()));
+ return result;
+}
+
+void StructureSet::dumpInContext(PrintStream& out, DumpContext* context) const
+{
+ CommaPrinter comma;
+ out.print("[");
+ for (size_t i = 0; i < size(); ++i)
+ out.print(comma, inContext(*at(i), context));
+ out.print("]");
+}
+
+void StructureSet::dump(PrintStream& out) const
+{
+ dumpInContext(out, nullptr);
+}
+
+bool StructureSet::addOutOfLine(Structure* structure)
+{
+ OutOfLineList* list = structureList();
+ for (unsigned i = 0; i < list->m_length; ++i) {
+ if (list->list()[i] == structure)
+ return false;
+ }
+
+ if (list->m_length < list->m_capacity) {
+ list->list()[list->m_length++] = structure;
+ return true;
+ }
+
+ OutOfLineList* newList = OutOfLineList::create(list->m_capacity * 2);
+ newList->m_length = list->m_length + 1;
+ for (unsigned i = list->m_length; i--;)
+ newList->list()[i] = list->list()[i];
+ newList->list()[list->m_length] = structure;
+ set(newList);
+ return true;
+}
+
+bool StructureSet::containsOutOfLine(Structure* structure) const
+{
+ OutOfLineList* list = structureList();
+ for (unsigned i = 0; i < list->m_length; ++i) {
+ if (list->list()[i] == structure)
+ return true;
+ }
+ return false;
+}
+
+void StructureSet::copyFrom(const StructureSet& other)
+{
+ if (other.isThin()) {
+ m_pointer = other.m_pointer;
+ return;
+ }
+
+ OutOfLineList* otherList = other.structureList();
+ OutOfLineList* myList = OutOfLineList::create(otherList->m_length);
+ myList->m_length = otherList->m_length;
+ for (unsigned i = otherList->m_length; i--;)
+ myList->list()[i] = otherList->list()[i];
+ set(myList);
+}
+
+StructureSet::OutOfLineList* StructureSet::OutOfLineList::create(unsigned capacity)
+{
+ return new (NotNull, fastMalloc(sizeof(OutOfLineList) + capacity * sizeof(Structure*))) OutOfLineList(0, capacity);
+}
+
+void StructureSet::OutOfLineList::destroy(OutOfLineList* list)
+{
+ fastFree(list);
+}
+
+} // namespace JSC
+
</ins></span></pre></div>
<a id="branchesftloptSourceJavaScriptCorebytecodeStructureSeth"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/bytecode/StructureSet.h (169147 => 169148)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/bytecode/StructureSet.h        2014-05-21 04:59:06 UTC (rev 169147)
+++ branches/ftlopt/Source/JavaScriptCore/bytecode/StructureSet.h        2014-05-21 05:16:40 UTC (rev 169148)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011, 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">@@ -30,167 +30,167 @@
</span><span class="cx"> #include "SpeculatedType.h"
</span><span class="cx"> #include "Structure.h"
</span><span class="cx"> #include "DumpContext.h"
</span><del>-#include <wtf/CommaPrinter.h>
-#include <wtf/Vector.h>
</del><span class="cx">
</span><span class="cx"> namespace JSC {
</span><span class="cx">
</span><del>-namespace DFG {
-class StructureAbstractValue;
-}
-
</del><span class="cx"> class StructureSet {
</span><span class="cx"> public:
</span><del>- StructureSet() { }
-
- StructureSet(Structure* structure)
</del><ins>+ StructureSet()
</ins><span class="cx"> {
</span><del>- ASSERT(structure);
- m_structures.append(structure);
</del><ins>+ set(0, true);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- void clear()
</del><ins>+ StructureSet(Structure* structure)
</ins><span class="cx"> {
</span><del>- m_structures.clear();
</del><ins>+ set(structure);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- void add(Structure* structure)
</del><ins>+ StructureSet(const StructureSet& other);
+ StructureSet& operator=(const StructureSet& other);
+
+ ~StructureSet()
</ins><span class="cx"> {
</span><del>- ASSERT(structure);
- ASSERT(!contains(structure));
- m_structures.append(structure);
</del><ins>+ deleteStructureListIfNecessary();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- bool addAll(const StructureSet& other)
</del><ins>+ void clear();
+
+ Structure* onlyStructure() const
</ins><span class="cx"> {
</span><del>- bool changed = false;
- for (size_t i = 0; i < other.size(); ++i) {
- if (contains(other[i]))
- continue;
- add(other[i]);
- changed = true;
</del><ins>+ if (isThin()) {
+ ASSERT(singleStructure());
+ return singleStructure();
</ins><span class="cx"> }
</span><del>- return changed;
</del><ins>+ ASSERT(structureList()->m_length == 1);
+ return structureList()->list()[0];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- void remove(Structure* structure)
</del><ins>+ bool isEmpty() const
</ins><span class="cx"> {
</span><del>- for (size_t i = 0; i < m_structures.size(); ++i) {
- if (m_structures[i] != structure)
- continue;
-
- m_structures[i] = m_structures.last();
- m_structures.removeLast();
- return;
- }
</del><ins>+ return isThin() && !singleStructure();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- bool contains(Structure* structure) const
</del><ins>+ bool add(Structure*);
+ bool remove(Structure*);
+ bool contains(Structure*) const;
+
+ bool merge(const StructureSet&);
+ void filter(const StructureSet&);
+ void exclude(const StructureSet&);
+
+ bool isSubsetOf(const StructureSet&) const;
+ bool isSupersetOf(const StructureSet& other) const
</ins><span class="cx"> {
</span><del>- for (size_t i = 0; i < m_structures.size(); ++i) {
- if (m_structures[i] == structure)
- return true;
- }
- return false;
</del><ins>+ return other.isSubsetOf(*this);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- bool containsOnly(Structure* structure) const
</del><ins>+ bool overlaps(const StructureSet&) const;
+
+ size_t size() const
</ins><span class="cx"> {
</span><del>- if (size() != 1)
- return false;
- return singletonStructure() == structure;
</del><ins>+ if (isThin())
+ return !!singleStructure();
+ return structureList()->m_length;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- bool isSubsetOf(const StructureSet& other) const
</del><ins>+ Structure* at(size_t i) const
</ins><span class="cx"> {
</span><del>- for (size_t i = 0; i < m_structures.size(); ++i) {
- if (!other.contains(m_structures[i]))
- return false;
</del><ins>+ if (isThin()) {
+ ASSERT(!i);
+ ASSERT(singleStructure());
+ return singleStructure();
</ins><span class="cx"> }
</span><del>- return true;
</del><ins>+ ASSERT(i < structureList()->m_length);
+ return structureList()->list()[i];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- bool isSupersetOf(const StructureSet& other) const
- {
- return other.isSubsetOf(*this);
- }
</del><ins>+ Structure* operator[](size_t i) const { return at(i); }
</ins><span class="cx">
</span><del>- bool overlaps(const StructureSet& other) const
</del><ins>+ Structure* last() const
</ins><span class="cx"> {
</span><del>- for (size_t i = 0; i < m_structures.size(); ++i) {
- if (other.contains(m_structures[i]))
- return true;
</del><ins>+ if (isThin()) {
+ ASSERT(singleStructure());
+ return singleStructure();
</ins><span class="cx"> }
</span><del>- return false;
</del><ins>+ return structureList()->list()[structureList()->m_length - 1];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- size_t size() const { return m_structures.size(); }
</del><ins>+ bool operator==(const StructureSet& other) const;
</ins><span class="cx">
</span><del>- // Call this if you know that the structure set must consist of exactly
- // one structure.
- Structure* singletonStructure() const
- {
- ASSERT(m_structures.size() == 1);
- return m_structures[0];
- }
</del><ins>+ SpeculatedType speculationFromStructures() const;
+ ArrayModes arrayModesFromStructures() const;
</ins><span class="cx">
</span><del>- Structure* at(size_t i) const { return m_structures.at(i); }
</del><ins>+ void dumpInContext(PrintStream&, DumpContext*) const;
+ void dump(PrintStream&) const;
</ins><span class="cx">
</span><del>- Structure* operator[](size_t i) const { return at(i); }
</del><ins>+private:
+ static const uintptr_t thinFlag = 1;
+ static const uintptr_t reservedFlag = 2;
+ static const uintptr_t flags = 3;
+ static const uintptr_t reservedValue = 4;
+
+ static const unsigned defaultStartingSize = 4;
</ins><span class="cx">
</span><del>- Structure* last() const { return m_structures.last(); }
</del><ins>+ bool addOutOfLine(Structure*);
+ bool containsOutOfLine(Structure*) const;
+ void copyFrom(const StructureSet&);
+
+ class OutOfLineList {
+ public:
+ static OutOfLineList* create(unsigned capacity);
+ static void destroy(OutOfLineList*);
+
+ Structure** list() { return bitwise_cast<Structure**>(this + 1); }
+
+ OutOfLineList(unsigned length, unsigned capacity)
+ : m_length(length)
+ , m_capacity(capacity)
+ {
+ }
</ins><span class="cx">
</span><del>- SpeculatedType speculationFromStructures() const
</del><ins>+ unsigned m_length;
+ unsigned m_capacity;
+ };
+
+ void deleteStructureListIfNecessary()
</ins><span class="cx"> {
</span><del>- SpeculatedType result = SpecNone;
-
- for (size_t i = 0; i < m_structures.size(); ++i)
- mergeSpeculation(result, speculationFromStructure(m_structures[i]));
-
- return result;
</del><ins>+ if (!isThin())
+ OutOfLineList::destroy(structureList());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- ArrayModes arrayModesFromStructures() const
</del><ins>+ bool isThin() const { return m_pointer & thinFlag; }
+
+ void* pointer() const
</ins><span class="cx"> {
</span><del>- ArrayModes result = 0;
-
- for (size_t i = 0; i < m_structures.size(); ++i)
- mergeArrayModes(result, asArrayModes(m_structures[i]->indexingType()));
-
- return result;
</del><ins>+ return bitwise_cast<void*>(m_pointer & ~flags);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- bool operator==(const StructureSet& other) const
</del><ins>+ Structure* singleStructure() const
</ins><span class="cx"> {
</span><del>- if (m_structures.size() != other.m_structures.size())
- return false;
-
- for (size_t i = 0; i < m_structures.size(); ++i) {
- if (!other.contains(m_structures[i]))
- return false;
- }
-
- return true;
</del><ins>+ ASSERT(isThin());
+ return static_cast<Structure*>(pointer());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- void dumpInContext(PrintStream& out, DumpContext* context) const
</del><ins>+ OutOfLineList* structureList() const
</ins><span class="cx"> {
</span><del>- CommaPrinter comma;
- out.print("[");
- for (size_t i = 0; i < m_structures.size(); ++i)
- out.print(comma, inContext(*m_structures[i], context));
- out.print("]");
</del><ins>+ ASSERT(!isThin());
+ return static_cast<OutOfLineList*>(pointer());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- void dump(PrintStream& out) const
</del><ins>+ void set(Structure* structure)
</ins><span class="cx"> {
</span><del>- dumpInContext(out, 0);
</del><ins>+ set(bitwise_cast<uintptr_t>(structure), true);
</ins><span class="cx"> }
</span><del>-
-private:
- friend class DFG::StructureAbstractValue;
-
- Vector<Structure*, 2> m_structures;
</del><ins>+ void set(OutOfLineList* structures)
+ {
+ set(bitwise_cast<uintptr_t>(structures), false);
+ }
+ void set(uintptr_t pointer, bool singleStructure)
+ {
+ m_pointer = pointer | (singleStructure ? thinFlag : 0) | (m_pointer & reservedFlag);
+ }
+
+ uintptr_t m_pointer;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoredfgDFGAbstractInterpreterInlinesh"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h (169147 => 169148)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h        2014-05-21 04:59:06 UTC (rev 169147)
+++ branches/ftlopt/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h        2014-05-21 05:16:40 UTC (rev 169148)
</span><span class="lines">@@ -1673,7 +1673,7 @@
</span><span class="cx">
</span><span class="cx"> StructureSet set;
</span><span class="cx"> for (unsigned i = node->multiGetByOffsetData().variants.size(); i--;)
</span><del>- set.addAll(node->multiGetByOffsetData().variants[i].structureSet());
</del><ins>+ set.merge(node->multiGetByOffsetData().variants[i].structureSet());
</ins><span class="cx">
</span><span class="cx"> filter(node->child1(), set);
</span><span class="cx"> forNode(node).makeHeapTop();
</span><span class="lines">@@ -1722,12 +1722,12 @@
</span><span class="cx"> const PutByIdVariant& variant = node->multiPutByOffsetData().variants[i];
</span><span class="cx"> if (variant.kind() == PutByIdVariant::Replace) {
</span><span class="cx"> if (value.m_currentKnownStructure.contains(variant.structure()))
</span><del>- newSet.addAll(variant.structure());
</del><ins>+ newSet.add(variant.structure());
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx"> ASSERT(variant.kind() == PutByIdVariant::Transition);
</span><span class="cx"> if (value.m_currentKnownStructure.contains(variant.oldStructure()))
</span><del>- newSet.addAll(variant.newStructure());
</del><ins>+ newSet.add(variant.newStructure());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Use filter(value, set) as a way of setting the structure set. This works because
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoredfgDFGByteCodeParsercpp"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp (169147 => 169148)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2014-05-21 04:59:06 UTC (rev 169147)
+++ branches/ftlopt/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2014-05-21 05:16:40 UTC (rev 169148)
</span><span class="lines">@@ -1898,6 +1898,7 @@
</span><span class="cx"> Node* ByteCodeParser::emitPrototypeChecks(
</span><span class="cx"> Structure* structure, IntendedStructureChain* chain)
</span><span class="cx"> {
</span><ins>+ ASSERT(structure);
</ins><span class="cx"> Node* base = 0;
</span><span class="cx"> m_graph.chains().addLazily(chain);
</span><span class="cx"> Structure* currentStructure = structure;
</span><span class="lines">@@ -1939,7 +1940,7 @@
</span><span class="cx"> for (unsigned variantIndex = getByIdStatus.numVariants(); variantIndex--;) {
</span><span class="cx"> if (getByIdStatus[variantIndex].chain()) {
</span><span class="cx"> emitPrototypeChecks(
</span><del>- getByIdStatus[variantIndex].structureSet().singletonStructure(),
</del><ins>+ getByIdStatus[variantIndex].structureSet().onlyStructure(),
</ins><span class="cx"> getByIdStatus[variantIndex].chain());
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1965,7 +1966,7 @@
</span><span class="cx">
</span><span class="cx"> if (variant.chain()) {
</span><span class="cx"> base = emitPrototypeChecks(
</span><del>- variant.structureSet().singletonStructure(), variant.chain());
</del><ins>+ variant.structureSet().onlyStructure(), variant.chain());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Unless we want bugs like https://bugs.webkit.org/show_bug.cgi?id=88783, we need to
</span><span class="lines">@@ -3108,7 +3109,7 @@
</span><span class="cx"> set(VirtualRegister(dst), addToGraph(GetByIdFlush, OpInfo(identifierNumber), OpInfo(prediction), get(VirtualRegister(scope))));
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- Node* base = cellConstantWithStructureCheck(globalObject, status[0].structureSet().singletonStructure());
</del><ins>+ Node* base = cellConstantWithStructureCheck(globalObject, status[0].structureSet().onlyStructure());
</ins><span class="cx"> addToGraph(Phantom, get(VirtualRegister(scope)));
</span><span class="cx"> if (JSValue specificValue = status[0].specificValue())
</span><span class="cx"> set(VirtualRegister(dst), cellConstant(specificValue.asCell()));
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoredfgDFGCSEPhasecpp"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp (169147 => 169148)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp        2014-05-21 04:59:06 UTC (rev 169147)
+++ branches/ftlopt/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp        2014-05-21 05:16:40 UTC (rev 169148)
</span><span class="lines">@@ -519,7 +519,7 @@
</span><span class="cx"> switch (node->op()) {
</span><span class="cx"> case CheckStructure:
</span><span class="cx"> if (node->child1() == child1
</span><del>- && node->structureSet().containsOnly(structure))
</del><ins>+ && node->structureSet().isSubsetOf(StructureSet(structure)))
</ins><span class="cx"> return true;
</span><span class="cx"> break;
</span><span class="cx">
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoredfgDFGNodeh"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/dfg/DFGNode.h (169147 => 169148)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/dfg/DFGNode.h        2014-05-21 04:59:06 UTC (rev 169147)
+++ branches/ftlopt/Source/JavaScriptCore/dfg/DFGNode.h        2014-05-21 05:16:40 UTC (rev 169148)
</span><span class="lines">@@ -490,13 +490,14 @@
</span><span class="cx"> ASSERT(m_op == CheckStructure || m_op == ArrayifyToStructure);
</span><span class="cx"> ASSERT(!child2());
</span><span class="cx"> ASSERT(!child3());
</span><ins>+ ASSERT(structure);
</ins><span class="cx"> m_opInfo = bitwise_cast<uintptr_t>(structure);
</span><span class="cx"> m_op = StructureTransitionWatchpoint;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void convertToStructureTransitionWatchpoint()
</span><span class="cx"> {
</span><del>- convertToStructureTransitionWatchpoint(structureSet().singletonStructure());
</del><ins>+ convertToStructureTransitionWatchpoint(structureSet().onlyStructure());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void convertToGetByOffset(unsigned storageAccessDataIndex, Edge storage)
</span></span></pre></div>
<a id="branchesftloptSourceJavaScriptCoredfgDFGTypeCheckHoistingPhasecpp"></a>
<div class="modfile"><h4>Modified: branches/ftlopt/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp (169147 => 169148)</h4>
<pre class="diff"><span>
<span class="info">--- branches/ftlopt/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp        2014-05-21 04:59:06 UTC (rev 169147)
+++ branches/ftlopt/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp        2014-05-21 05:16:40 UTC (rev 169148)
</span><span class="lines">@@ -503,7 +503,7 @@
</span><span class="cx"> noticeStructureCheck(variable, 0);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- noticeStructureCheck(variable, set.singletonStructure());
</del><ins>+ noticeStructureCheck(variable, set.onlyStructure());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void noticeCheckArray(VariableAccessData* variable, ArrayMode arrayMode)
</span></span></pre>
</div>
</div>
</body>
</html>