<!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>[180460] trunk/Source/JavaScriptCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/180460">180460</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2015-02-20 14:54:31 -0800 (Fri, 20 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Get rid of JSNameScope::m_type
https://bugs.webkit.org/show_bug.cgi?id=141851

Reviewed by Geoffrey Garen.
        
This is a big step towards getting rid of JSEnvironmentRecord::m_registers. To do it we need
to ensure that subclasses of JSEnvironmentRecord never have additional C++ fields, so that
JSEnvironmentRecord can always place &quot;registers&quot; right after the end of itself.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::isCatchScope):
(JSC::DebuggerScope::isFunctionNameScope):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/JSCatchScope.cpp: Added.
* runtime/JSCatchScope.h: Added.
(JSC::JSCatchScope::JSCatchScope):
(JSC::JSCatchScope::create):
(JSC::JSCatchScope::createStructure):
* runtime/JSFunction.cpp:
(JSC::JSFunction::addNameScopeIfNeeded):
* runtime/JSFunctionNameScope.cpp: Added.
* runtime/JSFunctionNameScope.h: Added.
(JSC::JSFunctionNameScope::JSFunctionNameScope):
(JSC::JSFunctionNameScope::create):
(JSC::JSFunctionNameScope::createStructure):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::catchScopeStructure):
(JSC::JSGlobalObject::functionNameScopeStructure):
(JSC::JSGlobalObject::nameScopeStructure): Deleted.
* runtime/JSNameScope.cpp:
(JSC::JSNameScope::create):
* runtime/JSNameScope.h:
(JSC::JSNameScope::create):
(JSC::JSNameScope::JSNameScope):
(JSC::JSNameScope::createStructure): Deleted.
(JSC::JSNameScope::isFunctionNameScope): Deleted.
(JSC::JSNameScope::isCatchScope): Deleted.
* runtime/JSObject.cpp:
(JSC::JSObject::isCatchScopeObject):
(JSC::JSObject::isFunctionNameScopeObject):
* runtime/JSObject.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoredebuggerDebuggerScopecpp">trunk/Source/JavaScriptCore/debugger/DebuggerScope.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterInterpretercpp">trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationscpp">trunk/Source/JavaScriptCore/jit/JITOperations.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntSlowPathscpp">trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSFunctioncpp">trunk/Source/JavaScriptCore/runtime/JSFunction.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjecth">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSNameScopecpp">trunk/Source/JavaScriptCore/runtime/JSNameScope.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSNameScopeh">trunk/Source/JavaScriptCore/runtime/JSNameScope.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjectcpp">trunk/Source/JavaScriptCore/runtime/JSObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjecth">trunk/Source/JavaScriptCore/runtime/JSObject.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSCatchScopecpp">trunk/Source/JavaScriptCore/runtime/JSCatchScope.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSCatchScopeh">trunk/Source/JavaScriptCore/runtime/JSCatchScope.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSFunctionNameScopecpp">trunk/Source/JavaScriptCore/runtime/JSFunctionNameScope.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSFunctionNameScopeh">trunk/Source/JavaScriptCore/runtime/JSFunctionNameScope.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -463,6 +463,7 @@
</span><span class="cx">     runtime/JSGlobalObjectDebuggable.cpp
</span><span class="cx">     runtime/JSCJSValue.cpp
</span><span class="cx">     runtime/JSCallee.cpp
</span><ins>+    runtime/JSCatchScope.cpp
</ins><span class="cx">     runtime/JSCell.cpp
</span><span class="cx">     runtime/JSConsole.cpp
</span><span class="cx">     runtime/JSDataView.cpp
</span><span class="lines">@@ -470,6 +471,7 @@
</span><span class="cx">     runtime/JSDateMath.cpp
</span><span class="cx">     runtime/JSEnvironmentRecord.cpp
</span><span class="cx">     runtime/JSFunction.cpp
</span><ins>+    runtime/JSFunctionNameScope.cpp
</ins><span class="cx">     runtime/JSGlobalObject.cpp
</span><span class="cx">     runtime/JSGlobalObjectFunctions.cpp
</span><span class="cx">     runtime/JSLock.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -1,3 +1,57 @@
</span><ins>+2015-02-20  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Get rid of JSNameScope::m_type
+        https://bugs.webkit.org/show_bug.cgi?id=141851
+
+        Reviewed by Geoffrey Garen.
+        
+        This is a big step towards getting rid of JSEnvironmentRecord::m_registers. To do it we need
+        to ensure that subclasses of JSEnvironmentRecord never have additional C++ fields, so that
+        JSEnvironmentRecord can always place &quot;registers&quot; right after the end of itself.
+
+        * CMakeLists.txt:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * debugger/DebuggerScope.cpp:
+        (JSC::DebuggerScope::isCatchScope):
+        (JSC::DebuggerScope::isFunctionNameScope):
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::execute):
+        * jit/JITOperations.cpp:
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+        * runtime/JSCatchScope.cpp: Added.
+        * runtime/JSCatchScope.h: Added.
+        (JSC::JSCatchScope::JSCatchScope):
+        (JSC::JSCatchScope::create):
+        (JSC::JSCatchScope::createStructure):
+        * runtime/JSFunction.cpp:
+        (JSC::JSFunction::addNameScopeIfNeeded):
+        * runtime/JSFunctionNameScope.cpp: Added.
+        * runtime/JSFunctionNameScope.h: Added.
+        (JSC::JSFunctionNameScope::JSFunctionNameScope):
+        (JSC::JSFunctionNameScope::create):
+        (JSC::JSFunctionNameScope::createStructure):
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::init):
+        (JSC::JSGlobalObject::visitChildren):
+        * runtime/JSGlobalObject.h:
+        (JSC::JSGlobalObject::catchScopeStructure):
+        (JSC::JSGlobalObject::functionNameScopeStructure):
+        (JSC::JSGlobalObject::nameScopeStructure): Deleted.
+        * runtime/JSNameScope.cpp:
+        (JSC::JSNameScope::create):
+        * runtime/JSNameScope.h:
+        (JSC::JSNameScope::create):
+        (JSC::JSNameScope::JSNameScope):
+        (JSC::JSNameScope::createStructure): Deleted.
+        (JSC::JSNameScope::isFunctionNameScope): Deleted.
+        (JSC::JSNameScope::isCatchScope): Deleted.
+        * runtime/JSObject.cpp:
+        (JSC::JSObject::isCatchScopeObject):
+        (JSC::JSObject::isFunctionNameScopeObject):
+        * runtime/JSObject.h:
+
</ins><span class="cx"> 2015-02-20  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [JSObjCClassInfo reallocateConstructorAndOrPrototype] should also reallocate super class prototype chain.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -730,12 +730,14 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSBoundFunction.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSCJSValue.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSCallee.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\runtime\JSCatchScope.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSCell.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSConsole.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSDataView.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSDataViewPrototype.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSDateMath.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSFunction.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\runtime\JSFunctionNameScope.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSGlobalObject.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSGlobalObjectFunctions.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\runtime\JSLock.cpp&quot; /&gt;
</span><span class="lines">@@ -1505,6 +1507,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSCJSValue.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSCJSValueInlines.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSCallee.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\runtime\JSCatchScope.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSCell.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSConsole.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSDataView.h&quot; /&gt;
</span><span class="lines">@@ -1515,6 +1518,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSFloat32Array.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSFloat64Array.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSFunction.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\runtime\JSFunctionNameScope.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSGenericTypedArrayView.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSGenericTypedArrayViewConstructor.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\JSGenericTypedArrayViewConstructorInlines.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -591,6 +591,10 @@
</span><span class="cx">                 0FD8A32A17D51F5700CA2C40 /* DFGToFTLDeferredCompilationCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD8A32217D51F5700CA2C40 /* DFGToFTLDeferredCompilationCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0FD8A32B17D51F5700CA2C40 /* DFGToFTLForOSREntryDeferredCompilationCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD8A32317D51F5700CA2C40 /* DFGToFTLForOSREntryDeferredCompilationCallback.cpp */; };
</span><span class="cx">                 0FD8A32C17D51F5700CA2C40 /* DFGToFTLForOSREntryDeferredCompilationCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD8A32417D51F5700CA2C40 /* DFGToFTLForOSREntryDeferredCompilationCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                0FD949821A97DB9600E28966 /* JSCatchScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD9497E1A97DB9600E28966 /* JSCatchScope.cpp */; };
+                0FD949831A97DB9600E28966 /* JSCatchScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD9497F1A97DB9600E28966 /* JSCatchScope.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                0FD949841A97DB9600E28966 /* JSFunctionNameScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD949801A97DB9600E28966 /* JSFunctionNameScope.cpp */; };
+                0FD949851A97DB9600E28966 /* JSFunctionNameScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD949811A97DB9600E28966 /* JSFunctionNameScope.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 0FDB2CC9173DA520007B3C1B /* FTLAbbreviatedTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FDB2CC7173DA51E007B3C1B /* FTLAbbreviatedTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0FDB2CCA173DA523007B3C1B /* FTLValueFromBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FDB2CC8173DA51E007B3C1B /* FTLValueFromBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0FDB2CE7174830A2007B3C1B /* DFGWorklist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FDB2CE5174830A2007B3C1B /* DFGWorklist.cpp */; };
</span><span class="lines">@@ -2281,6 +2285,10 @@
</span><span class="cx">                 0FD8A32217D51F5700CA2C40 /* DFGToFTLDeferredCompilationCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGToFTLDeferredCompilationCallback.h; path = dfg/DFGToFTLDeferredCompilationCallback.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FD8A32317D51F5700CA2C40 /* DFGToFTLForOSREntryDeferredCompilationCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGToFTLForOSREntryDeferredCompilationCallback.cpp; path = dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FD8A32417D51F5700CA2C40 /* DFGToFTLForOSREntryDeferredCompilationCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGToFTLForOSREntryDeferredCompilationCallback.h; path = dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                0FD9497E1A97DB9600E28966 /* JSCatchScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCatchScope.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0FD9497F1A97DB9600E28966 /* JSCatchScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCatchScope.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0FD949801A97DB9600E28966 /* JSFunctionNameScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFunctionNameScope.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0FD949811A97DB9600E28966 /* JSFunctionNameScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFunctionNameScope.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0FDB2CC7173DA51E007B3C1B /* FTLAbbreviatedTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FTLAbbreviatedTypes.h; path = ftl/FTLAbbreviatedTypes.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FDB2CC8173DA51E007B3C1B /* FTLValueFromBlock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FTLValueFromBlock.h; path = ftl/FTLValueFromBlock.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FDB2CE5174830A2007B3C1B /* DFGWorklist.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGWorklist.cpp; path = dfg/DFGWorklist.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4340,6 +4348,8 @@
</span><span class="cx">                                 86FA9E90142BBB2E001773B7 /* JSBoundFunction.h */,
</span><span class="cx">                                 657CF45619BF6662004ACBF2 /* JSCallee.cpp */,
</span><span class="cx">                                 657CF45719BF6662004ACBF2 /* JSCallee.h */,
</span><ins>+                                0FD9497E1A97DB9600E28966 /* JSCatchScope.cpp */,
+                                0FD9497F1A97DB9600E28966 /* JSCatchScope.h */,
</ins><span class="cx">                                 BC7F8FBA0E19D1EF008632C0 /* JSCell.cpp */,
</span><span class="cx">                                 BC1167D80E19BCC9008066DD /* JSCell.h */,
</span><span class="cx">                                 0F97496F1687ADE200A4FF6A /* JSCellInlines.h */,
</span><span class="lines">@@ -4364,6 +4374,8 @@
</span><span class="cx">                                 F692A85E0255597D01FF60F7 /* JSFunction.cpp */,
</span><span class="cx">                                 F692A85F0255597D01FF60F7 /* JSFunction.h */,
</span><span class="cx">                                 A72028B91797603D0098028C /* JSFunctionInlines.h */,
</span><ins>+                                0FD949801A97DB9600E28966 /* JSFunctionNameScope.cpp */,
+                                0FD949811A97DB9600E28966 /* JSFunctionNameScope.h */,
</ins><span class="cx">                                 0F2B66C317B6B5AB00A7AE3F /* JSGenericTypedArrayView.h */,
</span><span class="cx">                                 0F2B66C417B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructor.h */,
</span><span class="cx">                                 0F2B66C517B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructorInlines.h */,
</span><span class="lines">@@ -5662,6 +5674,7 @@
</span><span class="cx">                                 0FFB921C16D02F110055A5DB /* DFGOSRExitCompilationInfo.h in Headers */,
</span><span class="cx">                                 0FC0977114693AF500CF2442 /* DFGOSRExitCompiler.h in Headers */,
</span><span class="cx">                                 0F7025AA1714B0FC00382C0E /* DFGOSRExitCompilerCommon.h in Headers */,
</span><ins>+                                0FD949851A97DB9600E28966 /* JSFunctionNameScope.h in Headers */,
</ins><span class="cx">                                 0FEFC9AB1681A3B600567F53 /* DFGOSRExitJumpPlaceholder.h in Headers */,
</span><span class="cx">                                 0F4CED5F18CEA7AB00802FE0 /* PolymorphicGetByIdList.h in Headers */,
</span><span class="cx">                                 0F235BEE17178E7300690C7F /* DFGOSRExitPreparation.h in Headers */,
</span><span class="lines">@@ -6013,6 +6026,7 @@
</span><span class="cx">                                 0F2B9CE719D0BA7D00B1D1B5 /* DFGObjectAllocationSinkingPhase.h in Headers */,
</span><span class="cx">                                 A7CA3AE817DA41AE006538AF /* JSWeakMap.h in Headers */,
</span><span class="cx">                                 A7482E93116A7CAD003B0712 /* JSWeakObjectMapRefInternal.h in Headers */,
</span><ins>+                                0FD949831A97DB9600E28966 /* JSCatchScope.h in Headers */,
</ins><span class="cx">                                 A7482B9311671147003B0712 /* JSWeakObjectMapRefPrivate.h in Headers */,
</span><span class="cx">                                 1442566215EDE98D0066A49B /* JSWithScope.h in Headers */,
</span><span class="cx">                                 86E3C619167BABEE006D760A /* JSWrapperMap.h in Headers */,
</span><span class="lines">@@ -7108,6 +7122,7 @@
</span><span class="cx">                                 1440FCE40A51E46B0005F061 /* JSClassRef.cpp in Sources */,
</span><span class="cx">                                 86E3C616167BABEE006D760A /* JSContext.mm in Sources */,
</span><span class="cx">                                 14BD5A300A3E91F600BAF59C /* JSContextRef.cpp in Sources */,
</span><ins>+                                0FD949821A97DB9600E28966 /* JSCatchScope.cpp in Sources */,
</ins><span class="cx">                                 A72028B61797601E0098028C /* JSCTestRunnerUtils.cpp in Sources */,
</span><span class="cx">                                 0F2B66EB17B6B5AB00A7AE3F /* JSDataView.cpp in Sources */,
</span><span class="cx">                                 0F2B66ED17B6B5AB00A7AE3F /* JSDataViewPrototype.cpp in Sources */,
</span><span class="lines">@@ -7185,6 +7200,7 @@
</span><span class="cx">                                 0F4680D214BBD16500BFE272 /* LLIntData.cpp in Sources */,
</span><span class="cx">                                 0F38B01117CF078000B144D3 /* LLIntEntrypoint.cpp in Sources */,
</span><span class="cx">                                 0F4680A814BA7FAB00BFE272 /* LLIntExceptions.cpp in Sources */,
</span><ins>+                                0FD949841A97DB9600E28966 /* JSFunctionNameScope.cpp in Sources */,
</ins><span class="cx">                                 0F4680A414BA7F8D00BFE272 /* LLIntSlowPaths.cpp in Sources */,
</span><span class="cx">                                 0F0B839C14BCF46300885B4F /* LLIntThunks.cpp in Sources */,
</span><span class="cx">                                 0FCEFACD1805E75500472CE4 /* LLVMAPI.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggerScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/DebuggerScope.cpp (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/DebuggerScope.cpp        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/debugger/DebuggerScope.cpp        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -157,12 +157,12 @@
</span><span class="cx"> 
</span><span class="cx"> bool DebuggerScope::isCatchScope() const
</span><span class="cx"> {
</span><del>-    return m_scope-&gt;isNameScopeObject() &amp;&amp; reinterpret_cast&lt;JSNameScope*&gt;(m_scope.get())-&gt;isCatchScope();
</del><ins>+    return m_scope-&gt;isCatchScopeObject();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool DebuggerScope::isFunctionNameScope() const
</span><span class="cx"> {
</span><del>-    return m_scope-&gt;isNameScopeObject() &amp;&amp; reinterpret_cast&lt;JSNameScope*&gt;(m_scope.get())-&gt;isFunctionNameScope();
</del><ins>+    return m_scope-&gt;isFunctionNameScopeObject();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool DebuggerScope::isWithScope() const
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -1089,7 +1089,8 @@
</span><span class="cx">     } else {
</span><span class="cx">         for (JSScope* node = scope; ; node = node-&gt;next()) {
</span><span class="cx">             RELEASE_ASSERT(node);
</span><del>-            if (node-&gt;isVariableObject() &amp;&amp; !node-&gt;isNameScopeObject()) {
</del><ins>+            if (node-&gt;isVariableObject()) {
+                ASSERT(!node-&gt;isNameScopeObject());
</ins><span class="cx">                 variableObject = node;
</span><span class="cx">                 break;
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.cpp (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -1278,7 +1278,7 @@
</span><span class="cx">     // This should be changed to pass in the new scope.
</span><span class="cx">     JSScope* currentScope = exec-&gt;uncheckedR(dst).Register::scope();
</span><span class="cx">     JSNameScope::Type scopeType = static_cast&lt;JSNameScope::Type&gt;(type);
</span><del>-    JSNameScope* scope = JSNameScope::create(exec, currentScope, *identifier, JSValue::decode(encodedValue), attibutes, scopeType);
</del><ins>+    JSNameScope* scope = JSNameScope::create(vm, exec-&gt;lexicalGlobalObject(), currentScope, *identifier, JSValue::decode(encodedValue), attibutes, scopeType);
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: This won't work if this operation is called from the DFG or FTL.
</span><span class="cx">     // This should be changed to return the new scope.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011, 2012, 2013, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011-2015 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">@@ -1290,7 +1290,7 @@
</span><span class="cx">     int scopeReg = pc[1].u.operand;
</span><span class="cx">     JSScope* currentScope = exec-&gt;uncheckedR(scopeReg).Register::scope();
</span><span class="cx">     JSNameScope::Type type = static_cast&lt;JSNameScope::Type&gt;(pc[5].u.operand);
</span><del>-    JSNameScope* scope = JSNameScope::create(exec, currentScope, codeBlock-&gt;identifier(pc[2].u.operand), LLINT_OP(3).jsValue(), pc[4].u.operand, type);
</del><ins>+    JSNameScope* scope = JSNameScope::create(vm, exec-&gt;lexicalGlobalObject(), currentScope, codeBlock-&gt;identifier(pc[2].u.operand), LLINT_OP(3).jsValue(), pc[4].u.operand, type);
</ins><span class="cx">     exec-&gt;uncheckedR(scopeReg) = scope;
</span><span class="cx">     LLINT_END();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSCatchScopecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/runtime/JSCatchScope.cpp (0 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSCatchScope.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/runtime/JSCatchScope.cpp        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+/*
+ * Copyright (C) 2015 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;JSCatchScope.h&quot;
+
+#include &quot;JSCInlines.h&quot;
+
+namespace JSC {
+
+const ClassInfo JSCatchScope::s_info = { &quot;CatchScope&quot;, &amp;Base::s_info, 0, CREATE_METHOD_TABLE(JSCatchScope) };
+
+} // namespace JSC
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSCatchScopeh"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/runtime/JSCatchScope.h (0 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSCatchScope.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/runtime/JSCatchScope.h        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2015 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 JSCatchScope_h
+#define JSCatchScope_h
+
+#include &quot;JSNameScope.h&quot;
+
+namespace JSC {
+
+class JSCatchScope : public JSNameScope {
+public:
+    typedef JSNameScope Base;
+
+private:
+    friend class JSNameScope;
+    
+    JSCatchScope(VM&amp; vm, JSGlobalObject* globalObject, JSScope* next)
+        : Base(vm, globalObject-&gt;catchScopeStructure(), next)
+    {
+    }
+    
+public:
+    static JSCatchScope* create(VM&amp; vm, JSGlobalObject* globalObject, JSScope* currentScope, const Identifier&amp; identifier, JSValue value, unsigned attributes)
+    {
+        return Base::create&lt;JSCatchScope&gt;(vm, globalObject, currentScope, identifier, value, attributes);
+    }
+    
+    static Structure* createStructure(VM&amp; vm, JSGlobalObject* globalObject, JSValue proto)
+    {
+        return Structure::create(vm, globalObject, proto, TypeInfo(NameScopeObjectType, StructureFlags), info());
+    }
+    
+    DECLARE_INFO;
+};
+
+} // namespace JSC
+
+#endif // JSCatchScope_h
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSFunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSFunction.cpp (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSFunction.cpp        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/runtime/JSFunction.cpp        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx">  *  Copyright (C) 1999-2002 Harri Porten (porten@kde.org)
</span><span class="cx">  *  Copyright (C) 2001 Peter Kelly (pmk@post.com)
</span><del>- *  Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
</del><ins>+ *  Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *  Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca)
</span><span class="cx">  *  Copyright (C) 2007 Maks Orlovich
</span><span class="cx">  *
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx"> #include &quot;JSArray.h&quot;
</span><span class="cx"> #include &quot;JSBoundFunction.h&quot;
</span><span class="cx"> #include &quot;JSFunctionInlines.h&quot;
</span><ins>+#include &quot;JSFunctionNameScope.h&quot; 
</ins><span class="cx"> #include &quot;JSGlobalObject.h&quot;
</span><del>-#include &quot;JSNameScope.h&quot; 
</del><span class="cx"> #include &quot;JSNotAnObject.h&quot;
</span><span class="cx"> #include &quot;Interpreter.h&quot;
</span><span class="cx"> #include &quot;ObjectConstructor.h&quot;
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx">         return;
</span><span class="cx">     if (!functionNameScopeIsDynamic(executable-&gt;usesEval(), executable-&gt;isStrictMode()))
</span><span class="cx">         return;
</span><del>-    setScope(vm, JSNameScope::create(vm, scope()-&gt;globalObject(), executable-&gt;name(), this, ReadOnly | DontDelete, scope(), JSNameScope::FunctionNameScope));
</del><ins>+    setScope(vm, JSFunctionNameScope::create(vm, scope()-&gt;globalObject(), scope(), executable-&gt;name(), this, ReadOnly | DontDelete));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSFunction* JSFunction::createBuiltinFunction(VM&amp; vm, FunctionExecutable* executable, JSGlobalObject* globalObject)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSFunctionNameScopecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/runtime/JSFunctionNameScope.cpp (0 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSFunctionNameScope.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/runtime/JSFunctionNameScope.cpp        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+/*
+ * Copyright (C) 2015 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;JSFunctionNameScope.h&quot;
+
+#include &quot;JSCInlines.h&quot;
+
+namespace JSC {
+
+const ClassInfo JSFunctionNameScope::s_info = { &quot;FunctionNameScope&quot;, &amp;Base::s_info, 0, CREATE_METHOD_TABLE(JSFunctionNameScope) };
+
+} // namespace JSC
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSFunctionNameScopeh"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/runtime/JSFunctionNameScope.h (0 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSFunctionNameScope.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/runtime/JSFunctionNameScope.h        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2015 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 JSFunctionNameScope_h
+#define JSFunctionNameScope_h
+
+#include &quot;JSNameScope.h&quot;
+
+namespace JSC {
+
+class JSFunctionNameScope : public JSNameScope {
+public:
+    typedef JSNameScope Base;
+
+private:
+    friend class JSNameScope;
+    
+    JSFunctionNameScope(VM&amp; vm, JSGlobalObject* globalObject, JSScope* next)
+        : Base(vm, globalObject-&gt;catchScopeStructure(), next)
+    {
+    }
+    
+public:
+    static JSFunctionNameScope* create(VM&amp; vm, JSGlobalObject* globalObject, JSScope* currentScope, const Identifier&amp; identifier, JSValue value, unsigned attributes)
+    {
+        return Base::create&lt;JSFunctionNameScope&gt;(vm, globalObject, currentScope, identifier, value, attributes);
+    }
+    
+    static Structure* createStructure(VM&amp; vm, JSGlobalObject* globalObject, JSValue proto)
+    {
+        return Structure::create(vm, globalObject, proto, TypeInfo(NameScopeObjectType, StructureFlags), info());
+    }
+    
+    DECLARE_INFO;
+};
+
+} // namespace JSC
+
+#endif // JSFunctionNameScope_h
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -65,10 +65,12 @@
</span><span class="cx"> #include &quot;JSCallbackConstructor.h&quot;
</span><span class="cx"> #include &quot;JSCallbackFunction.h&quot;
</span><span class="cx"> #include &quot;JSCallbackObject.h&quot;
</span><ins>+#include &quot;JSCatchScope.h&quot;
</ins><span class="cx"> #include &quot;JSConsole.h&quot;
</span><span class="cx"> #include &quot;JSDataView.h&quot;
</span><span class="cx"> #include &quot;JSDataViewPrototype.h&quot;
</span><span class="cx"> #include &quot;JSFunction.h&quot;
</span><ins>+#include &quot;JSFunctionNameScope.h&quot;
</ins><span class="cx"> #include &quot;JSGenericTypedArrayViewConstructorInlines.h&quot;
</span><span class="cx"> #include &quot;JSGenericTypedArrayViewInlines.h&quot;
</span><span class="cx"> #include &quot;JSGenericTypedArrayViewPrototypeInlines.h&quot;
</span><span class="lines">@@ -77,7 +79,6 @@
</span><span class="cx"> #include &quot;JSLock.h&quot;
</span><span class="cx"> #include &quot;JSMap.h&quot;
</span><span class="cx"> #include &quot;JSMapIterator.h&quot;
</span><del>-#include &quot;JSNameScope.h&quot;
</del><span class="cx"> #include &quot;JSONObject.h&quot;
</span><span class="cx"> #include &quot;JSSet.h&quot;
</span><span class="cx"> #include &quot;JSSetIterator.h&quot;
</span><span class="lines">@@ -265,7 +266,8 @@
</span><span class="cx">     m_typedArrays[toIndex(TypeFloat64)].structure.set(vm, this, JSFloat64Array::createStructure(vm, this, m_typedArrays[toIndex(TypeFloat64)].prototype.get()));
</span><span class="cx">     m_typedArrays[toIndex(TypeDataView)].structure.set(vm, this, JSDataView::createStructure(vm, this, m_typedArrays[toIndex(TypeDataView)].prototype.get()));
</span><span class="cx">     
</span><del>-    m_nameScopeStructure.set(vm, this, JSNameScope::createStructure(vm, this, jsNull()));
</del><ins>+    m_catchScopeStructure.set(vm, this, JSCatchScope::createStructure(vm, this, jsNull()));
+    m_functionNameScopeStructure.set(vm, this, JSFunctionNameScope::createStructure(vm, this, jsNull()));
</ins><span class="cx">     m_lexicalEnvironmentStructure.set(vm, this, JSLexicalEnvironment::createStructure(vm, this));
</span><span class="cx">     m_strictEvalActivationStructure.set(vm, this, StrictEvalActivation::createStructure(vm, this, jsNull()));
</span><span class="cx">     m_debuggerScopeStructure.set(m_vm, this, DebuggerScope::createStructure(m_vm, this));
</span><span class="lines">@@ -676,7 +678,8 @@
</span><span class="cx">     visitor.append(&amp;thisObject-&gt;m_withScopeStructure);
</span><span class="cx">     visitor.append(&amp;thisObject-&gt;m_strictEvalActivationStructure);
</span><span class="cx">     visitor.append(&amp;thisObject-&gt;m_lexicalEnvironmentStructure);
</span><del>-    visitor.append(&amp;thisObject-&gt;m_nameScopeStructure);
</del><ins>+    visitor.append(&amp;thisObject-&gt;m_catchScopeStructure);
+    visitor.append(&amp;thisObject-&gt;m_functionNameScopeStructure);
</ins><span class="cx">     visitor.append(&amp;thisObject-&gt;m_argumentsStructure);
</span><span class="cx">     for (unsigned i = 0; i &lt; NumberOfIndexingShapes; ++i)
</span><span class="cx">         visitor.append(&amp;thisObject-&gt;m_originalArrayStructureForIndexingShape[i]);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -197,7 +197,8 @@
</span><span class="cx">     WriteBarrier&lt;Structure&gt; m_withScopeStructure;
</span><span class="cx">     WriteBarrier&lt;Structure&gt; m_strictEvalActivationStructure;
</span><span class="cx">     WriteBarrier&lt;Structure&gt; m_lexicalEnvironmentStructure;
</span><del>-    WriteBarrier&lt;Structure&gt; m_nameScopeStructure;
</del><ins>+    WriteBarrier&lt;Structure&gt; m_catchScopeStructure;
+    WriteBarrier&lt;Structure&gt; m_functionNameScopeStructure;
</ins><span class="cx">     WriteBarrier&lt;Structure&gt; m_argumentsStructure;
</span><span class="cx">         
</span><span class="cx">     // Lists the actual structures used for having these particular indexing shapes.
</span><span class="lines">@@ -408,7 +409,8 @@
</span><span class="cx">     Structure* withScopeStructure() const { return m_withScopeStructure.get(); }
</span><span class="cx">     Structure* strictEvalActivationStructure() const { return m_strictEvalActivationStructure.get(); }
</span><span class="cx">     Structure* activationStructure() const { return m_lexicalEnvironmentStructure.get(); }
</span><del>-    Structure* nameScopeStructure() const { return m_nameScopeStructure.get(); }
</del><ins>+    Structure* catchScopeStructure() const { return m_catchScopeStructure.get(); }
+    Structure* functionNameScopeStructure() const { return m_functionNameScopeStructure.get(); }
</ins><span class="cx">     Structure* argumentsStructure() const { return m_argumentsStructure.get(); }
</span><span class="cx">     Structure* originalArrayStructureForIndexingType(IndexingType indexingType) const
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSNameScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSNameScope.cpp (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSNameScope.cpp        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/runtime/JSNameScope.cpp        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2008, 2009, 2012 Apple Inc. All Rights Reserved.
</del><ins>+ * Copyright (C) 2008, 2009, 2012, 2015 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">@@ -28,11 +28,24 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Error.h&quot;
</span><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><ins>+#include &quot;JSCatchScope.h&quot;
+#include &quot;JSFunctionNameScope.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><span class="cx"> const ClassInfo JSNameScope::s_info = { &quot;NameScope&quot;, &amp;Base::s_info, 0, CREATE_METHOD_TABLE(JSNameScope) };
</span><span class="cx"> 
</span><ins>+JSNameScope* JSNameScope::create(VM&amp; vm, JSGlobalObject* globalObject, JSScope* currentScope, const Identifier&amp; identifier, JSValue value, unsigned attributes, Type type)
+{
+    switch (type) {
+    case CatchScope:
+        return JSCatchScope::create(vm, globalObject, currentScope, identifier, value, attributes);
+    case FunctionNameScope:
+        return JSFunctionNameScope::create(vm, globalObject, currentScope, identifier, value, attributes);
+    }
+    RELEASE_ASSERT_NOT_REACHED();
+}
+
</ins><span class="cx"> void JSNameScope::visitChildren(JSCell* cell, SlotVisitor&amp; visitor)
</span><span class="cx"> {
</span><span class="cx">     JSNameScope* thisObject = jsCast&lt;JSNameScope*&gt;(cell);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSNameScopeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSNameScope.h (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSNameScope.h        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/runtime/JSNameScope.h        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved.
</del><ins>+ * Copyright (C) 2008, 2009, 2015 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">@@ -41,33 +41,23 @@
</span><span class="cx">         FunctionNameScope
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    static JSNameScope* create(ExecState* exec, JSScope* currentScope, const Identifier&amp; identifier, JSValue value, unsigned attributes, Type type)
</del><ins>+    template&lt;typename T&gt;
+    static T* create(VM&amp; vm, JSGlobalObject* globalObject, JSScope* currentScope, const Identifier&amp; identifier, JSValue value, unsigned attributes)
</ins><span class="cx">     {
</span><del>-        VM&amp; vm = exec-&gt;vm();
-        JSNameScope* scopeObject = new (NotNull, allocateCell&lt;JSNameScope&gt;(vm.heap)) JSNameScope(vm, exec-&gt;lexicalGlobalObject(), currentScope, type);
</del><ins>+        T* scopeObject = new (NotNull, allocateCell&lt;T&gt;(vm.heap)) T(vm, globalObject, currentScope);
</ins><span class="cx">         scopeObject-&gt;finishCreation(vm, identifier, value, attributes);
</span><span class="cx">         return scopeObject;
</span><span class="cx">     }
</span><ins>+    
+    static JSNameScope* create(VM&amp;, JSGlobalObject*, JSScope* currentScope, const Identifier&amp;, JSValue, unsigned attributes, Type);
</ins><span class="cx"> 
</span><del>-    static JSNameScope* create(VM&amp; vm, JSGlobalObject* globalObject, const Identifier&amp; identifier, JSValue value, unsigned attributes, JSScope* next, Type type)
-    {
-        JSNameScope* scopeObject = new (NotNull, allocateCell&lt;JSNameScope&gt;(vm.heap)) JSNameScope(vm, globalObject, next, type);
-        scopeObject-&gt;finishCreation(vm, identifier, value, attributes);
-        return scopeObject;
-    }
-
</del><span class="cx">     static void visitChildren(JSCell*, SlotVisitor&amp;);
</span><span class="cx">     static JSValue toThis(JSCell*, ExecState*, ECMAMode);
</span><span class="cx">     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&amp;);
</span><span class="cx">     static void put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&amp;);
</span><span class="cx"> 
</span><del>-    static Structure* createStructure(VM&amp; vm, JSGlobalObject* globalObject, JSValue proto) { return Structure::create(vm, globalObject, proto, TypeInfo(NameScopeObjectType, StructureFlags), info()); }
-
</del><span class="cx">     DECLARE_INFO;
</span><span class="cx"> 
</span><del>-    bool isFunctionNameScope() const { return m_type == FunctionNameScope; }
-    bool isCatchScope() const { return m_type == CatchScope; }
-
</del><span class="cx">     JSValue value() const { return m_registerStore.get(); }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="lines">@@ -80,20 +70,18 @@
</span><span class="cx"> 
</span><span class="cx">     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | Base::StructureFlags;
</span><span class="cx"> 
</span><del>-private:
-    JSNameScope(VM&amp; vm, JSGlobalObject* globalObject, JSScope* next, Type type)
</del><ins>+    JSNameScope(VM&amp; vm, Structure* structure, JSScope* next)
</ins><span class="cx">         : Base(
</span><span class="cx">             vm,
</span><del>-            globalObject-&gt;nameScopeStructure(),
</del><ins>+            structure,
</ins><span class="cx">             reinterpret_cast&lt;Register*&gt;(&amp;m_registerStore + 1),
</span><span class="cx">             next
</span><span class="cx">         )
</span><del>-        , m_type(type)
</del><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+private:
</ins><span class="cx">     WriteBarrier&lt;Unknown&gt; m_registerStore;
</span><del>-    Type m_type;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.cpp (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx">  *  Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
</span><span class="cx">  *  Copyright (C) 2001 Peter Kelly (pmk@post.com)
</span><del>- *  Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2012, 2013, 2014 Apple Inc. All rights reserved.
</del><ins>+ *  Copyright (C) 2003-2006, 2008, 2009, 2012-2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *  Copyright (C) 2007 Eric Seidel (eric@webkit.org)
</span><span class="cx">  *
</span><span class="cx">  *  This library is free software; you can redistribute it and/or
</span><span class="lines">@@ -34,7 +34,9 @@
</span><span class="cx"> #include &quot;Executable.h&quot;
</span><span class="cx"> #include &quot;GetterSetter.h&quot;
</span><span class="cx"> #include &quot;IndexingHeaderInlines.h&quot;
</span><ins>+#include &quot;JSCatchScope.h&quot;
</ins><span class="cx"> #include &quot;JSFunction.h&quot;
</span><ins>+#include &quot;JSFunctionNameScope.h&quot;
</ins><span class="cx"> #include &quot;JSGlobalObject.h&quot;
</span><span class="cx"> #include &quot;Lookup.h&quot;
</span><span class="cx"> #include &quot;NativeErrorConstructor.h&quot;
</span><span class="lines">@@ -1620,6 +1622,16 @@
</span><span class="cx">     return jsCast&lt;JSObject*&gt;(cell);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool JSObject::isCatchScopeObject() const
+{
+    return inherits(JSCatchScope::info());
+}
+
+bool JSObject::isFunctionNameScopeObject() const
+{
+    return inherits(JSFunctionNameScope::info());
+}
+
</ins><span class="cx"> void JSObject::seal(VM&amp; vm)
</span><span class="cx"> {
</span><span class="cx">     if (isSealed(vm))
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.h (180459 => 180460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.h        2015-02-20 22:46:07 UTC (rev 180459)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.h        2015-02-20 22:54:31 UTC (rev 180460)
</span><span class="lines">@@ -593,6 +593,8 @@
</span><span class="cx">     bool isVariableObject() const;
</span><span class="cx">     bool isStaticScopeObject() const;
</span><span class="cx">     bool isNameScopeObject() const;
</span><ins>+    bool isCatchScopeObject() const;
+    bool isFunctionNameScopeObject() const;
</ins><span class="cx">     bool isActivationObject() const;
</span><span class="cx">     bool isErrorInstance() const;
</span><span class="cx">     bool isWithScope() const;
</span><span class="lines">@@ -1131,7 +1133,6 @@
</span><span class="cx">     return type == NameScopeObjectType || type == ActivationObjectType;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> inline bool JSObject::isNameScopeObject() const
</span><span class="cx"> {
</span><span class="cx">     return type() == NameScopeObjectType;
</span></span></pre>
</div>
</div>

</body>
</html>