<!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>[188136] 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/188136">188136</a></dd>
<dt>Author</dt> <dd>saambarati1@gmail.com</dd>
<dt>Date</dt> <dd>2015-08-07 10:41:22 -0700 (Fri, 07 Aug 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Interpreter::unwind shouldn't be responsible for assigning the correct scope.
https://bugs.webkit.org/show_bug.cgi?id=147666

Reviewed by Geoffrey Garen.

If we make the bytecode generator know about every local scope it
creates, and if we give each local scope a unique register, the
bytecode generator has all the information it needs to assign
the correct scope to a catch handler. Because the bytecode generator
knows this information, it's a better separation of responsibilties
for it to set up the proper scope instead of relying on the exception
handling runtime to find the scope.

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
* bytecode/HandlerInfo.h:
(JSC::UnlinkedHandlerInfo::UnlinkedHandlerInfo):
(JSC::HandlerInfo::initialize):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):
(JSC::BytecodeGenerator::emitGetScope):
(JSC::BytecodeGenerator::emitPushWithScope):
(JSC::BytecodeGenerator::emitGetParentScope):
(JSC::BytecodeGenerator::emitPopScope):
(JSC::BytecodeGenerator::emitPopWithScope):
(JSC::BytecodeGenerator::allocateAndEmitScope):
(JSC::BytecodeGenerator::emitComplexPopScopes):
(JSC::BytecodeGenerator::pushTry):
(JSC::BytecodeGenerator::popTryAndEmitCatch):
(JSC::BytecodeGenerator::localScopeDepth):
(JSC::BytecodeGenerator::calculateTargetScopeDepthForExceptionHandler): Deleted.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::WithNode::emitBytecode):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwind):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::compileOpStrictEq):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_to_number):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
* runtime/JSScope.cpp:
(JSC::JSScope::objectAtScope):
(JSC::isUnscopable):
(JSC::JSScope::depth): Deleted.
* runtime/JSScope.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeBytecodeListjson">trunk/Source/JavaScriptCore/bytecode/BytecodeList.json</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeBytecodeUseDefh">trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeHandlerInfoh">trunk/Source/JavaScriptCore/bytecode/HandlerInfo.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerNodesCodegencpp">trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterInterpretercpp">trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOpcodescpp">trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOpcodes32_64cpp">trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationscpp">trunk/Source/JavaScriptCore/jit/JITOperations.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationsh">trunk/Source/JavaScriptCore/jit/JITOperations.h</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntSlowPathscpp">trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntSlowPathsh">trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLowLevelInterpreterasm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonSlowPathscpp">trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonSlowPathsh">trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSScopecpp">trunk/Source/JavaScriptCore/runtime/JSScope.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSScopeh">trunk/Source/JavaScriptCore/runtime/JSScope.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -1,3 +1,67 @@
</span><ins>+2015-08-07  Saam barati  &lt;saambarati1@gmail.com&gt;
+
+        Interpreter::unwind shouldn't be responsible for assigning the correct scope.
+        https://bugs.webkit.org/show_bug.cgi?id=147666
+
+        Reviewed by Geoffrey Garen.
+
+        If we make the bytecode generator know about every local scope it 
+        creates, and if we give each local scope a unique register, the
+        bytecode generator has all the information it needs to assign
+        the correct scope to a catch handler. Because the bytecode generator
+        knows this information, it's a better separation of responsibilties
+        for it to set up the proper scope instead of relying on the exception
+        handling runtime to find the scope.
+
+        * bytecode/BytecodeList.json:
+        * bytecode/BytecodeUseDef.h:
+        (JSC::computeUsesForBytecodeOffset):
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::dumpBytecode):
+        (JSC::CodeBlock::CodeBlock):
+        * bytecode/HandlerInfo.h:
+        (JSC::UnlinkedHandlerInfo::UnlinkedHandlerInfo):
+        (JSC::HandlerInfo::initialize):
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::generate):
+        (JSC::BytecodeGenerator::pushLexicalScopeInternal):
+        (JSC::BytecodeGenerator::emitGetScope):
+        (JSC::BytecodeGenerator::emitPushWithScope):
+        (JSC::BytecodeGenerator::emitGetParentScope):
+        (JSC::BytecodeGenerator::emitPopScope):
+        (JSC::BytecodeGenerator::emitPopWithScope):
+        (JSC::BytecodeGenerator::allocateAndEmitScope):
+        (JSC::BytecodeGenerator::emitComplexPopScopes):
+        (JSC::BytecodeGenerator::pushTry):
+        (JSC::BytecodeGenerator::popTryAndEmitCatch):
+        (JSC::BytecodeGenerator::localScopeDepth):
+        (JSC::BytecodeGenerator::calculateTargetScopeDepthForExceptionHandler): Deleted.
+        * bytecompiler/BytecodeGenerator.h:
+        * bytecompiler/NodesCodegen.cpp:
+        (JSC::WithNode::emitBytecode):
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::unwind):
+        * jit/JITOpcodes.cpp:
+        (JSC::JIT::emit_op_push_with_scope):
+        (JSC::JIT::compileOpStrictEq):
+        * jit/JITOpcodes32_64.cpp:
+        (JSC::JIT::emit_op_push_with_scope):
+        (JSC::JIT::emit_op_to_number):
+        * jit/JITOperations.cpp:
+        * jit/JITOperations.h:
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+        * llint/LLIntSlowPaths.h:
+        * llint/LowLevelInterpreter.asm:
+        * runtime/CommonSlowPaths.cpp:
+        (JSC::SLOW_PATH_DECL):
+        * runtime/CommonSlowPaths.h:
+        * runtime/JSScope.cpp:
+        (JSC::JSScope::objectAtScope):
+        (JSC::isUnscopable):
+        (JSC::JSScope::depth): Deleted.
+        * runtime/JSScope.h:
+
</ins><span class="cx"> 2015-08-07  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add MacroAssembler::patchableBranch64 and fix ARM64's patchableBranchPtr
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeBytecodeListjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/BytecodeList.json (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/BytecodeList.json        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/bytecode/BytecodeList.json        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">             { &quot;name&quot; : &quot;op_put_to_scope&quot;, &quot;length&quot; : 7 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_get_from_arguments&quot;, &quot;length&quot; : 5 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_put_to_arguments&quot;, &quot;length&quot; : 4 },
</span><del>-            { &quot;name&quot; : &quot;op_push_with_scope&quot;, &quot;length&quot; : 3 },
</del><ins>+            { &quot;name&quot; : &quot;op_push_with_scope&quot;, &quot;length&quot; : 4 },
</ins><span class="cx">             { &quot;name&quot; : &quot;op_create_lexical_environment&quot;, &quot;length&quot; : 5 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_get_parent_scope&quot;, &quot;length&quot; : 3 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_catch&quot;, &quot;length&quot; : 3 },
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeBytecodeUseDefh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -116,7 +116,6 @@
</span><span class="cx">     case op_get_enumerable_length:
</span><span class="cx">     case op_new_func_exp:
</span><span class="cx">     case op_to_index_string:
</span><del>-    case op_push_with_scope:
</del><span class="cx">     case op_create_lexical_environment:
</span><span class="cx">     case op_resolve_scope:
</span><span class="cx">     case op_get_from_scope:
</span><span class="lines">@@ -177,6 +176,7 @@
</span><span class="cx">     case op_stricteq:
</span><span class="cx">     case op_neq:
</span><span class="cx">     case op_eq:
</span><ins>+    case op_push_with_scope:
</ins><span class="cx">     case op_del_by_val: {
</span><span class="cx">         functor(codeBlock, instruction, opcodeID, instruction[2].u.operand);
</span><span class="cx">         functor(codeBlock, instruction, opcodeID, instruction[3].u.operand);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -644,8 +644,8 @@
</span><span class="cx">         unsigned i = 0;
</span><span class="cx">         do {
</span><span class="cx">             HandlerInfo&amp; handler = m_rareData-&gt;m_exceptionHandlers[i];
</span><del>-            out.printf(&quot;\t %d: { start: [%4d] end: [%4d] target: [%4d] depth: [%4d] } %s\n&quot;,
-                i + 1, handler.start, handler.end, handler.target, handler.scopeDepth, handler.typeName());
</del><ins>+            out.printf(&quot;\t %d: { start: [%4d] end: [%4d] target: [%4d] } %s\n&quot;,
+                i + 1, handler.start, handler.end, handler.target, handler.typeName());
</ins><span class="cx">             ++i;
</span><span class="cx">         } while (i &lt; m_rareData-&gt;m_exceptionHandlers.size());
</span><span class="cx">     }
</span><span class="lines">@@ -1429,8 +1429,9 @@
</span><span class="cx">         case op_push_with_scope: {
</span><span class="cx">             int dst = (++it)-&gt;u.operand;
</span><span class="cx">             int newScope = (++it)-&gt;u.operand;
</span><ins>+            int currentScope = (++it)-&gt;u.operand;
</ins><span class="cx">             printLocationAndOp(out, exec, location, it, &quot;push_with_scope&quot;);
</span><del>-            out.printf(&quot;%s, %s&quot;, registerName(dst).data(), registerName(newScope).data());
</del><ins>+            out.printf(&quot;%s, %s, %s&quot;, registerName(dst).data(), registerName(newScope).data(), registerName(currentScope).data());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_get_parent_scope: {
</span><span class="lines">@@ -1789,15 +1790,13 @@
</span><span class="cx">         }
</span><span class="cx">         if (size_t count = unlinkedCodeBlock-&gt;numberOfExceptionHandlers()) {
</span><span class="cx">             m_rareData-&gt;m_exceptionHandlers.resizeToFit(count);
</span><del>-            size_t nonLocalScopeDepth = scope-&gt;depth();
</del><span class="cx">             for (size_t i = 0; i &lt; count; i++) {
</span><span class="cx">                 const UnlinkedHandlerInfo&amp; unlinkedHandler = unlinkedCodeBlock-&gt;exceptionHandler(i);
</span><span class="cx">                 HandlerInfo&amp; handler = m_rareData-&gt;m_exceptionHandlers[i];
</span><span class="cx"> #if ENABLE(JIT)
</span><del>-                handler.initialize(unlinkedHandler, nonLocalScopeDepth,
-                    CodeLocationLabel(MacroAssemblerCodePtr::createFromExecutableAddress(LLInt::getCodePtr(op_catch))));
</del><ins>+                handler.initialize(unlinkedHandler, CodeLocationLabel(MacroAssemblerCodePtr::createFromExecutableAddress(LLInt::getCodePtr(op_catch))));
</ins><span class="cx"> #else
</span><del>-                handler.initialize(unlinkedHandler, nonLocalScopeDepth);
</del><ins>+                handler.initialize(unlinkedHandler);
</ins><span class="cx"> #endif
</span><span class="cx">             }
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeHandlerInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/HandlerInfo.h (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/HandlerInfo.h        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/bytecode/HandlerInfo.h        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -61,36 +61,33 @@
</span><span class="cx">     uint32_t start;
</span><span class="cx">     uint32_t end;
</span><span class="cx">     uint32_t target;
</span><del>-    uint32_t scopeDepth : 30;
</del><span class="cx">     uint32_t typeBits : 2; // HandlerType
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> struct UnlinkedHandlerInfo : public HandlerInfoBase {
</span><del>-    UnlinkedHandlerInfo(uint32_t start, uint32_t end, uint32_t target, uint32_t scopeDepth, HandlerType handlerType)
</del><ins>+    UnlinkedHandlerInfo(uint32_t start, uint32_t end, uint32_t target, HandlerType handlerType)
</ins><span class="cx">     {
</span><span class="cx">         this-&gt;start = start;
</span><span class="cx">         this-&gt;end = end;
</span><span class="cx">         this-&gt;target = target;
</span><del>-        this-&gt;scopeDepth = scopeDepth;
</del><span class="cx">         setType(handlerType);
</span><span class="cx">         ASSERT(type() == handlerType);
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> struct HandlerInfo : public HandlerInfoBase {
</span><del>-    void initialize(const UnlinkedHandlerInfo&amp; unlinkedInfo, size_t nonLocalScopeDepth)
</del><ins>+    void initialize(const UnlinkedHandlerInfo&amp; unlinkedInfo)
</ins><span class="cx">     {
</span><span class="cx">         start = unlinkedInfo.start;
</span><span class="cx">         end = unlinkedInfo.end;
</span><span class="cx">         target = unlinkedInfo.target;
</span><del>-        scopeDepth = unlinkedInfo.scopeDepth + nonLocalScopeDepth;
</del><span class="cx">         typeBits = unlinkedInfo.typeBits;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(JIT)
</span><del>-    void initialize(const UnlinkedHandlerInfo&amp; unlinkedInfo, size_t nonLocalScopeDepth, CodeLocationLabel label)
</del><ins>+    void initialize(const UnlinkedHandlerInfo&amp; unlinkedInfo, CodeLocationLabel label)
</ins><span class="cx">     {
</span><del>-        initialize(unlinkedInfo, nonLocalScopeDepth);
</del><ins>+        initialize(unlinkedInfo);
</ins><span class="cx">         nativeCode = label;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -74,29 +74,16 @@
</span><span class="cx"> 
</span><span class="cx">     {
</span><span class="cx">         RefPtr&lt;RegisterID&gt; temp = newTemporary();
</span><del>-        RefPtr&lt;RegisterID&gt; globalScope;
</del><ins>+        RefPtr&lt;RegisterID&gt; globalScope = m_topMostScope;
</ins><span class="cx">         for (auto functionPair : m_functionsToInitialize) {
</span><span class="cx">             FunctionBodyNode* functionBody = functionPair.first;
</span><span class="cx">             FunctionVariableType functionType = functionPair.second;
</span><span class="cx">             emitNewFunction(temp.get(), functionBody);
</span><span class="cx">             if (functionType == NormalFunctionVariable)
</span><span class="cx">                 initializeVariable(variable(functionBody-&gt;ident()) , temp.get());
</span><del>-            else if (functionType == GlobalFunctionVariable) {
-                if (!globalScope) {
-                    if (m_symbolTableStack.isEmpty() || !m_symbolTableStack.first().m_scope) {
-                        // We haven't allocated a lexical scope on top of the global object, so scopeRegister() will correspond to the global scope.
-                        globalScope = scopeRegister();
-                    } else {
-                        // We know this will resolve to the global object because our parser doesn't allow
-                        // &quot;let&quot; variables to have the same names as functions.
-                        ASSERT(m_scopeNode-&gt;lexicalVariables().hasCapturedVariables());
-                        RefPtr&lt;RegisterID&gt; globalObjectScope = emitResolveScope(nullptr, Variable(functionBody-&gt;ident()));
-                        globalScope = newBlockScopeVariable();
-                        emitMove(globalScope.get(), globalObjectScope.get());
-                    }
-                }
</del><ins>+            else if (functionType == GlobalFunctionVariable)
</ins><span class="cx">                 emitPutToScope(globalScope.get(), Variable(functionBody-&gt;ident()), temp.get(), ThrowIfNotFound);
</span><del>-            } else
</del><ins>+            else
</ins><span class="cx">                 RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -137,11 +124,9 @@
</span><span class="cx">         if (end &lt;= start)
</span><span class="cx">             continue;
</span><span class="cx">         
</span><del>-        ASSERT(range.tryData-&gt;targetScopeDepth != UINT_MAX);
</del><span class="cx">         ASSERT(range.tryData-&gt;handlerType != HandlerType::Illegal);
</span><span class="cx">         UnlinkedHandlerInfo info(static_cast&lt;uint32_t&gt;(start), static_cast&lt;uint32_t&gt;(end),
</span><del>-            static_cast&lt;uint32_t&gt;(range.tryData-&gt;target-&gt;bind()), range.tryData-&gt;targetScopeDepth,
-            range.tryData-&gt;handlerType);
</del><ins>+            static_cast&lt;uint32_t&gt;(range.tryData-&gt;target-&gt;bind()), range.tryData-&gt;handlerType);
</ins><span class="cx">         m_codeBlock-&gt;addExceptionHandler(info);
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -2635,13 +2620,21 @@
</span><span class="cx">     instructions().append(scopeRegister()-&gt;index());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RegisterID* BytecodeGenerator::emitPushWithScope(RegisterID* dst, RegisterID* scope)
</del><ins>+RegisterID* BytecodeGenerator::emitPushWithScope(RegisterID* objectScope)
</ins><span class="cx"> {
</span><span class="cx">     pushScopedControlFlowContext();
</span><ins>+    RegisterID* newScope = newBlockScopeVariable();
+    newScope-&gt;ref();
</ins><span class="cx"> 
</span><del>-    RegisterID* result = emitUnaryOp(op_push_with_scope, dst, scope);
-    m_symbolTableStack.append(SymbolTableStackEntry{ Strong&lt;SymbolTable&gt;(), nullptr, true, 0 });
-    return result;
</del><ins>+    emitOpcode(op_push_with_scope);
+    instructions().append(newScope-&gt;index());
+    instructions().append(objectScope-&gt;index());
+    instructions().append(scopeRegister()-&gt;index());
+
+    emitMove(scopeRegister(), newScope);
+    m_symbolTableStack.append(SymbolTableStackEntry{ Strong&lt;SymbolTable&gt;(), newScope, true, 0 });
+
+    return newScope;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RegisterID* BytecodeGenerator::emitGetParentScope(RegisterID* dst, RegisterID* scope)
</span><span class="lines">@@ -2658,11 +2651,12 @@
</span><span class="cx">     emitMove(dst, parentScope.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void BytecodeGenerator::emitPopWithScope(RegisterID* srcDst)
</del><ins>+void BytecodeGenerator::emitPopWithScope()
</ins><span class="cx"> {
</span><del>-    emitPopScope(srcDst, srcDst);
</del><ins>+    emitPopScope(scopeRegister(), scopeRegister());
</ins><span class="cx">     popScopedControlFlowContext();
</span><span class="cx">     SymbolTableStackEntry stackEntry = m_symbolTableStack.takeLast();
</span><ins>+    stackEntry.m_scope-&gt;deref();
</ins><span class="cx">     RELEASE_ASSERT(stackEntry.m_isWithScope);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2841,6 +2835,8 @@
</span><span class="cx">     m_scopeRegister-&gt;ref();
</span><span class="cx">     m_codeBlock-&gt;setScopeRegister(scopeRegister()-&gt;virtualRegister());
</span><span class="cx">     emitGetScope();
</span><ins>+    m_topMostScope = addVar();
+    emitMove(m_topMostScope, scopeRegister());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void BytecodeGenerator::emitComplexPopScopes(RegisterID* scope, ControlFlowContext* topScope, ControlFlowContext* bottomScope)
</span><span class="lines">@@ -2998,7 +2994,6 @@
</span><span class="cx"> {
</span><span class="cx">     TryData tryData;
</span><span class="cx">     tryData.target = newLabel();
</span><del>-    tryData.targetScopeDepth = UINT_MAX;
</del><span class="cx">     tryData.handlerType = HandlerType::Illegal;
</span><span class="cx">     m_tryData.append(tryData);
</span><span class="cx">     TryData* result = &amp;m_tryData.last();
</span><span class="lines">@@ -3026,27 +3021,24 @@
</span><span class="cx">     m_tryContextStack.removeLast();
</span><span class="cx">     
</span><span class="cx">     emitLabel(tryRange.tryData-&gt;target.get());
</span><del>-    tryRange.tryData-&gt;targetScopeDepth = calculateTargetScopeDepthForExceptionHandler();
</del><span class="cx">     tryRange.tryData-&gt;handlerType = handlerType;
</span><span class="cx"> 
</span><span class="cx">     emitOpcode(op_catch);
</span><span class="cx">     instructions().append(exceptionRegister-&gt;index());
</span><span class="cx">     instructions().append(thrownValueRegister-&gt;index());
</span><del>-}
</del><span class="cx"> 
</span><del>-int BytecodeGenerator::calculateTargetScopeDepthForExceptionHandler() const
-{
-    int depth = localScopeDepth();
-
-    // Currently, we're maintaing compatibility with how things are done and letting the exception handling
-    // code take into consideration the base activation of the function. There is no reason we shouldn't
-    // be able to calculate the exact depth here and let the exception handler not worry if there is a base
-    // activation or not.
-    if (m_lexicalEnvironmentRegister)
-        depth--;
-
-    ASSERT(depth &gt;= 0);
-    return depth;
</del><ins>+    bool foundLocalScope = false;
+    for (unsigned i = m_symbolTableStack.size(); i--; ) {
+        // Note that if we don't find a local scope in the current function/program, 
+        // we must grab the outer-most scope of this bytecode generation.
+        if (m_symbolTableStack[i].m_scope) {
+            foundLocalScope = true;
+            emitMove(scopeRegister(), m_symbolTableStack[i].m_scope);
+            break;
+        }
+    }
+    if (!foundLocalScope)
+        emitMove(scopeRegister(), m_topMostScope);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int BytecodeGenerator::localScopeDepth() const
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -176,7 +176,6 @@
</span><span class="cx"> 
</span><span class="cx">     struct TryData {
</span><span class="cx">         RefPtr&lt;Label&gt; target;
</span><del>-        unsigned targetScopeDepth;
</del><span class="cx">         HandlerType handlerType;
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="lines">@@ -593,10 +592,8 @@
</span><span class="cx">         void emitPopCatchScope(VariableEnvironment&amp;);
</span><span class="cx"> 
</span><span class="cx">         void emitGetScope();
</span><del>-        RegisterID* emitPushWithScope(RegisterID* dst, RegisterID* scope);
-        void emitPopScope(RegisterID* dst, RegisterID* scope);
-        void emitPopWithScope(RegisterID* srcDst);
-        RegisterID* emitGetParentScope(RegisterID* dst, RegisterID* scope);
</del><ins>+        RegisterID* emitPushWithScope(RegisterID* objectScope);
+        void emitPopWithScope();
</ins><span class="cx"> 
</span><span class="cx">         void emitDebugHook(DebugHookID, unsigned line, unsigned charOffset, unsigned lineStart);
</span><span class="cx"> 
</span><span class="lines">@@ -636,6 +633,8 @@
</span><span class="cx">         enum class ScopeRegisterType { Var, Block };
</span><span class="cx">         void pushLexicalScopeInternal(VariableEnvironment&amp;, bool canOptimizeTDZChecks, RegisterID** constantSymbolTableResult, TDZRequirement, ScopeType, ScopeRegisterType);
</span><span class="cx">         void popLexicalScopeInternal(VariableEnvironment&amp;, TDZRequirement);
</span><ins>+        void emitPopScope(RegisterID* dst, RegisterID* scope);
+        RegisterID* emitGetParentScope(RegisterID* dst, RegisterID* scope);
</ins><span class="cx">     public:
</span><span class="cx">         void pushLexicalScope(VariableEnvironmentNode*, bool canOptimizeTDZChecks, RegisterID** constantSymbolTableResult = nullptr);
</span><span class="cx">         void popLexicalScope(VariableEnvironmentNode*);
</span><span class="lines">@@ -767,6 +766,7 @@
</span><span class="cx">         RegisterID m_thisRegister;
</span><span class="cx">         RegisterID m_calleeRegister;
</span><span class="cx">         RegisterID* m_scopeRegister { nullptr };
</span><ins>+        RegisterID* m_topMostScope { nullptr };
</ins><span class="cx">         RegisterID* m_argumentsRegister { nullptr };
</span><span class="cx">         RegisterID* m_lexicalEnvironmentRegister { nullptr };
</span><span class="cx">         RegisterID* m_emptyValueRegister { nullptr };
</span><span class="lines">@@ -783,7 +783,6 @@
</span><span class="cx">         int m_localScopeDepth { 0 };
</span><span class="cx">         const CodeType m_codeType;
</span><span class="cx"> 
</span><del>-        int calculateTargetScopeDepthForExceptionHandler() const;
</del><span class="cx">         int localScopeDepth() const;
</span><span class="cx">         void pushScopedControlFlowContext();
</span><span class="cx">         void popScopedControlFlowContext();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -2574,9 +2574,9 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;RegisterID&gt; scope = generator.emitNode(m_expr);
</span><span class="cx">     generator.emitExpressionInfo(m_divot, m_divot - m_expressionLength, m_divot);
</span><del>-    generator.emitPushWithScope(generator.scopeRegister(), scope.get());
</del><ins>+    generator.emitPushWithScope(scope.get());
</ins><span class="cx">     generator.emitNode(dst, m_statement);
</span><del>-    generator.emitPopWithScope(generator.scopeRegister());
</del><ins>+    generator.emitPopWithScope();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // ------------------------------ CaseClauseNode --------------------------------
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -705,21 +705,6 @@
</span><span class="cx">     if (LegacyProfiler* profiler = vm.enabledProfiler())
</span><span class="cx">         profiler-&gt;exceptionUnwind(callFrame);
</span><span class="cx"> 
</span><del>-    // Unwind the scope chain within the exception handler's call frame.
-    int targetScopeDepth = handler-&gt;scopeDepth;
-    if (codeBlock-&gt;needsActivation() &amp;&amp; callFrame-&gt;hasActivation())
-        ++targetScopeDepth;
-
-    int scopeRegisterOffset = codeBlock-&gt;scopeRegister().offset();
-    JSScope* scope = callFrame-&gt;scope(scopeRegisterOffset);
-    int scopeDelta = scope-&gt;depth() - targetScopeDepth;
-    RELEASE_ASSERT(scopeDelta &gt;= 0);
-
-    while (scopeDelta--)
-        scope = scope-&gt;next();
-
-    callFrame-&gt;setScope(scopeRegisterOffset, scope);
-
</del><span class="cx">     return handler;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -425,9 +425,8 @@
</span><span class="cx"> 
</span><span class="cx"> void JIT::emit_op_push_with_scope(Instruction* currentInstruction)
</span><span class="cx"> {
</span><del>-    int dst = currentInstruction[1].u.operand;
-    emitGetVirtualRegister(currentInstruction[2].u.operand, regT0);
-    callOperation(operationPushWithScope, dst, regT0);
</del><ins>+    JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_push_with_scope);
+    slowPathCall.call();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JIT::compileOpStrictEq(Instruction* currentInstruction, CompileOpStrictEqType type)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodes32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -748,9 +748,8 @@
</span><span class="cx"> 
</span><span class="cx"> void JIT::emit_op_push_with_scope(Instruction* currentInstruction)
</span><span class="cx"> {
</span><del>-    int dst = currentInstruction[1].u.operand;
-    emitLoad(currentInstruction[2].u.operand, regT1, regT0);
-    callOperation(operationPushWithScope, dst, regT1, regT0);
</del><ins>+    JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_push_with_scope);
+    slowPathCall.call();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JIT::emit_op_to_number(Instruction* currentInstruction)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.cpp (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -1339,21 +1339,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void JIT_OPERATION operationPushWithScope(ExecState* exec, int32_t dst, EncodedJSValue encodedValue)
-{
-    VM&amp; vm = exec-&gt;vm();
-    NativeCallFrameTracer tracer(&amp;vm, exec);
-
-    JSObject* o = JSValue::decode(encodedValue).toObject(exec);
-    if (vm.exception())
-        return;
-
-    // FIXME: This won't work if this operation is called from the DFG or FTL.
-    // This should be changed to pass in the old scope and return the new scope.
-    JSScope* currentScope = exec-&gt;uncheckedR(dst).Register::scope();
-    exec-&gt;uncheckedR(dst) = JSWithScope::create(exec, o, currentScope);
-}
-
</del><span class="cx"> void JIT_OPERATION operationPopScope(ExecState* exec, int32_t scopeReg)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.h (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.h        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.h        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -308,7 +308,6 @@
</span><span class="cx"> void JIT_OPERATION operationPutGetterSetter(ExecState*, JSCell*, Identifier*, JSCell*, JSCell*) WTF_INTERNAL;
</span><span class="cx"> #endif
</span><span class="cx"> void JIT_OPERATION operationPushFunctionNameScope(ExecState*, int32_t, SymbolTable*, EncodedJSValue) WTF_INTERNAL;
</span><del>-void JIT_OPERATION operationPushWithScope(ExecState*, int32_t, EncodedJSValue) WTF_INTERNAL;
</del><span class="cx"> void JIT_OPERATION operationPopScope(ExecState*, int32_t) WTF_INTERNAL;
</span><span class="cx"> void JIT_OPERATION operationProfileDidCall(ExecState*, EncodedJSValue) WTF_INTERNAL;
</span><span class="cx"> void JIT_OPERATION operationProfileWillCall(ExecState*, EncodedJSValue) WTF_INTERNAL;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -1263,20 +1263,6 @@
</span><span class="cx">     LLINT_RETURN(LLINT_OP_C(2).jsValue().toPrimitive(exec));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LLINT_SLOW_PATH_DECL(slow_path_push_with_scope)
-{
-    LLINT_BEGIN();
-    JSValue v = LLINT_OP_C(2).jsValue();
-    JSObject* o = v.toObject(exec);
-    LLINT_CHECK_EXCEPTION();
-
-    int scopeReg = pc[1].u.operand;
-    JSScope* currentScope = exec-&gt;uncheckedR(scopeReg).Register::scope();
-    exec-&gt;uncheckedR(scopeReg) = JSWithScope::create(exec, o, currentScope);
-    
-    LLINT_END();
-}
-
</del><span class="cx"> LLINT_SLOW_PATH_DECL(slow_path_throw)
</span><span class="cx"> {
</span><span class="cx">     LLINT_BEGIN();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -106,7 +106,6 @@
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_tear_off_arguments);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_strcat);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_to_primitive);
</span><del>-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_with_scope);
</del><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw_static_error);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_handle_watchdog_timer);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreterasm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -1283,8 +1283,8 @@
</span><span class="cx"> 
</span><span class="cx"> _llint_op_push_with_scope:
</span><span class="cx">     traceExecution()
</span><del>-    callSlowPath(_llint_slow_path_push_with_scope)
-    dispatch(3)
</del><ins>+    callSlowPath(_slow_path_push_with_scope)
+    dispatch(4)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> _llint_op_create_lexical_environment:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -649,4 +649,15 @@
</span><span class="cx">     RETURN(newScope);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+SLOW_PATH_DECL(slow_path_push_with_scope)
+{
+    BEGIN();
+    JSObject* newScope = OP_C(2).jsValue().toObject(exec);
+    CHECK_EXCEPTION();
+
+    int scopeReg = pc[3].u.operand;
+    JSScope* currentScope = exec-&gt;uncheckedR(scopeReg).Register::scope();
+    RETURN(JSWithScope::create(exec, newScope, currentScope));
+}
+
</ins><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonSlowPathsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -234,6 +234,7 @@
</span><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_to_index_string);
</span><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_profile_type_clear_log);
</span><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_create_lexical_environment);
</span><ins>+SLOW_PATH_HIDDEN_DECL(slow_path_push_with_scope);
</ins><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSScope.cpp (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSScope.cpp        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/runtime/JSScope.cpp        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -124,14 +124,6 @@
</span><span class="cx">     return object;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int JSScope::depth()
-{
-    int depth = 0;
-    for (JSScope* scope = this; scope; scope = scope-&gt;next())
-        ++depth;
-    return depth;
-}
-
</del><span class="cx"> // When an exception occurs, the result of isUnscopable becomes false.
</span><span class="cx"> static inline bool isUnscopable(ExecState* exec, JSScope* scope, JSObject* object, const Identifier&amp; ident)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSScopeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSScope.h (188135 => 188136)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSScope.h        2015-08-07 17:31:27 UTC (rev 188135)
+++ trunk/Source/JavaScriptCore/runtime/JSScope.h        2015-08-07 17:41:22 UTC (rev 188136)
</span><span class="lines">@@ -171,7 +171,6 @@
</span><span class="cx">     ScopeChainIterator begin();
</span><span class="cx">     ScopeChainIterator end();
</span><span class="cx">     JSScope* next();
</span><del>-    int depth();
</del><span class="cx"> 
</span><span class="cx">     JSGlobalObject* globalObject();
</span><span class="cx">     VM* vm();
</span></span></pre>
</div>
</div>

</body>
</html>