<!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>[176109] 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/176109">176109</a></dd>
<dt>Author</dt> <dd>msaboff@apple.com</dd>
<dt>Date</dt> <dd>2014-11-13 17:07:48 -0800 (Thu, 13 Nov 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add scope operand to op_new_func* byte codes
https://bugs.webkit.org/show_bug.cgi?id=138707

Reviewed by Mark Lam.

Added scope operand to op_new_func and op_new_func_expr to replace the implicit use
of exec-&gt;scope().

* bytecode/BytecodeList.json: Increased size of op_new_func &amp; op_new_func_expr bytecodes.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode): Added scope operand to dump output.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitNewFunctionInternal):
(JSC::BytecodeGenerator::emitNewFunctionExpression):
Emit scope operand.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
Added new scope source nodes to NewFunction, NewFunctionExpression &amp; NewFunctionNoCheck.
        
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewFunctionNoCheck):
(JSC::DFG::SpeculativeJIT::compileNewFunctionExpression):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
Use scope children when making new function JIT_Operation calls.  Use JSScope* value instead of
exec-&gt;scope().

* dfg/DFGOperations.h:
* dfg/DFGOperations.cpp:
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_new_func):
(JSC::JIT::emit_op_new_func_exp):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
Added new Jsc JIT_Operation parameter type for JSScope* values.  Created declarations and
definitions for new JIT_Operations with Jsc parameters.  Use the JSScope* parameters in lieu
of exec-&gt;scope() in operationNewFunction().
Removed comment for unused Jsa (JSLexicalEnvironment*) JIT_Operation parameter type.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
Use the scope operand instead of exec-&gt;scope().

* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
Changed the operand indecies for added scope operand.</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="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp">trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGFixupPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGOperationscpp">trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGOperationsh">trunk/Source/JavaScriptCore/dfg/DFGOperations.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJITcpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJITh">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITh">trunk/Source/JavaScriptCore/jit/JIT.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITInlinesh">trunk/Source/JavaScriptCore/jit/JITInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOpcodescpp">trunk/Source/JavaScriptCore/jit/JITOpcodes.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="#trunkSourceJavaScriptCorellintLowLevelInterpreterasm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLowLevelInterpreter32_64asm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLowLevelInterpreter64asm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -1,3 +1,65 @@
</span><ins>+2014-11-13  Michael Saboff  &lt;msaboff@apple.com&gt;
+
+        Add scope operand to op_new_func* byte codes
+        https://bugs.webkit.org/show_bug.cgi?id=138707
+
+        Reviewed by Mark Lam.
+
+        Added scope operand to op_new_func and op_new_func_expr to replace the implicit use
+        of exec-&gt;scope().
+
+        * bytecode/BytecodeList.json: Increased size of op_new_func &amp; op_new_func_expr bytecodes.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::dumpBytecode): Added scope operand to dump output.
+
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::emitNewFunctionInternal):
+        (JSC::BytecodeGenerator::emitNewFunctionExpression):
+        Emit scope operand.
+
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::parseBlock):
+        * dfg/DFGFixupPhase.cpp:
+        (JSC::DFG::FixupPhase::fixupNode):
+        Added new scope source nodes to NewFunction, NewFunctionExpression &amp; NewFunctionNoCheck.
+        
+        * dfg/DFGSpeculativeJIT.cpp:
+        (JSC::DFG::SpeculativeJIT::compileNewFunctionNoCheck):
+        (JSC::DFG::SpeculativeJIT::compileNewFunctionExpression):
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        Use scope children when making new function JIT_Operation calls.  Use JSScope* value instead of
+        exec-&gt;scope().
+
+        * dfg/DFGOperations.h:
+        * dfg/DFGOperations.cpp:
+        * dfg/DFGSpeculativeJIT.h:
+        (JSC::DFG::SpeculativeJIT::callOperation):
+        * jit/JIT.h:
+        * jit/JITInlines.h:
+        (JSC::JIT::callOperation):
+        * jit/JITOpcodes.cpp:
+        (JSC::JIT::emit_op_new_func):
+        (JSC::JIT::emit_op_new_func_exp):
+        * jit/JITOperations.cpp:
+        * jit/JITOperations.h:
+        Added new Jsc JIT_Operation parameter type for JSScope* values.  Created declarations and
+        definitions for new JIT_Operations with Jsc parameters.  Use the JSScope* parameters in lieu
+        of exec-&gt;scope() in operationNewFunction().
+        Removed comment for unused Jsa (JSLexicalEnvironment*) JIT_Operation parameter type.
+
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+        Use the scope operand instead of exec-&gt;scope().
+
+        * llint/LowLevelInterpreter.asm:
+        * llint/LowLevelInterpreter32_64.asm:
+        * llint/LowLevelInterpreter64.asm:
+        Changed the operand indecies for added scope operand.
+
</ins><span class="cx"> 2014-11-13  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Change X86/64 JIT probes to save/restore xmm regs as double instead of __m128. [Follow up]
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeBytecodeListjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/BytecodeList.json (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/BytecodeList.json        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/bytecode/BytecodeList.json        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -93,8 +93,8 @@
</span><span class="cx">             { &quot;name&quot; : &quot;op_switch_imm&quot;, &quot;length&quot; : 4 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_switch_char&quot;, &quot;length&quot; : 4 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_switch_string&quot;, &quot;length&quot; : 4 },
</span><del>-            { &quot;name&quot; : &quot;op_new_func&quot;, &quot;length&quot; : 4 },
-            { &quot;name&quot; : &quot;op_new_func_exp&quot;, &quot;length&quot; : 3 },
</del><ins>+            { &quot;name&quot; : &quot;op_new_func&quot;, &quot;length&quot; : 5 },
+            { &quot;name&quot; : &quot;op_new_func_exp&quot;, &quot;length&quot; : 4 },
</ins><span class="cx">             { &quot;name&quot; : &quot;op_call&quot;, &quot;length&quot; : 9 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_call_eval&quot;, &quot;length&quot; : 9 },
</span><span class="cx">             { &quot;name&quot; : &quot;op_call_varargs&quot;, &quot;length&quot; : 9 },
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -1271,17 +1271,19 @@
</span><span class="cx">         }
</span><span class="cx">         case op_new_func: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><ins>+            int r1 = (++it)-&gt;u.operand;
</ins><span class="cx">             int f0 = (++it)-&gt;u.operand;
</span><span class="cx">             int shouldCheck = (++it)-&gt;u.operand;
</span><span class="cx">             printLocationAndOp(out, exec, location, it, &quot;new_func&quot;);
</span><del>-            out.printf(&quot;%s, f%d, %s&quot;, registerName(r0).data(), f0, shouldCheck ? &quot;&lt;Checked&gt;&quot; : &quot;&lt;Unchecked&gt;&quot;);
</del><ins>+            out.printf(&quot;%s, %s, f%d, %s&quot;, registerName(r0).data(), registerName(r1).data(), f0, shouldCheck ? &quot;&lt;Checked&gt;&quot; : &quot;&lt;Unchecked&gt;&quot;);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_new_func_exp: {
</span><span class="cx">             int r0 = (++it)-&gt;u.operand;
</span><ins>+            int r1 = (++it)-&gt;u.operand;
</ins><span class="cx">             int f0 = (++it)-&gt;u.operand;
</span><span class="cx">             printLocationAndOp(out, exec, location, it, &quot;new_func_exp&quot;);
</span><del>-            out.printf(&quot;%s, f%d&quot;, registerName(r0).data(), f0);
</del><ins>+            out.printf(&quot;%s, %s, f%d&quot;, registerName(r0).data(), registerName(r1).data(), f0);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_call: {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -1715,6 +1715,7 @@
</span><span class="cx"> {
</span><span class="cx">     emitOpcode(op_new_func);
</span><span class="cx">     instructions().append(dst-&gt;index());
</span><ins>+    instructions().append(scopeRegister()-&gt;index());
</ins><span class="cx">     instructions().append(index);
</span><span class="cx">     instructions().append(doNullCheck);
</span><span class="cx">     return dst;
</span><span class="lines">@@ -1735,6 +1736,7 @@
</span><span class="cx"> 
</span><span class="cx">     emitOpcode(op_new_func_exp);
</span><span class="cx">     instructions().append(r0-&gt;index());
</span><ins>+    instructions().append(scopeRegister()-&gt;index());
</ins><span class="cx">     instructions().append(index);
</span><span class="cx">     return r0;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -3433,22 +3433,22 @@
</span><span class="cx">         }
</span><span class="cx">             
</span><span class="cx">         case op_new_func: {
</span><del>-            if (!currentInstruction[3].u.operand) {
</del><ins>+            if (!currentInstruction[4].u.operand) {
</ins><span class="cx">                 set(VirtualRegister(currentInstruction[1].u.operand),
</span><del>-                    addToGraph(NewFunctionNoCheck, OpInfo(currentInstruction[2].u.operand)));
</del><ins>+                    addToGraph(NewFunctionNoCheck, OpInfo(currentInstruction[3].u.operand), get(VirtualRegister(currentInstruction[2].u.operand))));
</ins><span class="cx">             } else {
</span><span class="cx">                 set(VirtualRegister(currentInstruction[1].u.operand),
</span><span class="cx">                     addToGraph(
</span><span class="cx">                         NewFunction,
</span><del>-                        OpInfo(currentInstruction[2].u.operand),
-                        get(VirtualRegister(currentInstruction[1].u.operand))));
</del><ins>+                        OpInfo(currentInstruction[3].u.operand),
+                        get(VirtualRegister(currentInstruction[1].u.operand)), get(VirtualRegister(currentInstruction[2].u.operand))));
</ins><span class="cx">             }
</span><span class="cx">             NEXT_OPCODE(op_new_func);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         case op_new_func_exp: {
</span><span class="cx">             set(VirtualRegister(currentInstruction[1].u.operand),
</span><del>-                addToGraph(NewFunctionExpression, OpInfo(currentInstruction[2].u.operand)));
</del><ins>+                addToGraph(NewFunctionExpression, OpInfo(currentInstruction[3].u.operand), get(VirtualRegister(currentInstruction[2].u.operand))));
</ins><span class="cx">             NEXT_OPCODE(op_new_func_exp);
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGFixupPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -1172,6 +1172,16 @@
</span><span class="cx"> 
</span><span class="cx">             break;
</span><span class="cx">         }
</span><ins>+        case NewFunction: {
+            fixEdge&lt;CellUse&gt;(node-&gt;child2());
+            break;
+        }
+
+        case NewFunctionNoCheck:
+        case NewFunctionExpression: {
+            fixEdge&lt;CellUse&gt;(node-&gt;child1());
+            break;
+        }
</ins><span class="cx">             
</span><span class="cx"> #if !ASSERT_DISABLED
</span><span class="cx">         // Have these no-op cases here to ensure that nobody forgets to add handlers for new opcodes.
</span><span class="lines">@@ -1213,9 +1223,6 @@
</span><span class="cx">         case GetMyArgumentsLength:
</span><span class="cx">         case GetMyArgumentsLengthSafe:
</span><span class="cx">         case CheckArgumentsNotCreated:
</span><del>-        case NewFunction:
-        case NewFunctionNoCheck:
-        case NewFunctionExpression:
</del><span class="cx">         case Jump:
</span><span class="cx">         case Return:
</span><span class="cx">         case Throw:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -820,12 +820,12 @@
</span><span class="cx">     return JSValue::encode(argumentsValue.get(exec, index));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState* exec, JSCell* functionExecutable)
</del><ins>+JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState* exec, JSScope* scope, JSCell* functionExecutable)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(functionExecutable-&gt;inherits(FunctionExecutable::info()));
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="cx">     NativeCallFrameTracer tracer(&amp;vm, exec);
</span><del>-    return JSFunction::create(vm, static_cast&lt;FunctionExecutable*&gt;(functionExecutable), exec-&gt;scope());
</del><ins>+    return JSFunction::create(vm, static_cast&lt;FunctionExecutable*&gt;(functionExecutable), scope);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> size_t JIT_OPERATION operationIsObject(ExecState* exec, EncodedJSValue value)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGOperationsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGOperations.h (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGOperations.h        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/dfg/DFGOperations.h        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx"> void JIT_OPERATION operationTearOffInlinedArguments(ExecState*, JSCell*, JSCell*, InlineCallFrame*) WTF_INTERNAL;
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationGetInlinedArgumentByVal(ExecState*, int32_t, InlineCallFrame*, int32_t) WTF_INTERNAL;
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationGetArgumentByVal(ExecState*, int32_t, int32_t) WTF_INTERNAL;
</span><del>-JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState*, JSCell*) WTF_INTERNAL;
</del><ins>+JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState*, JSScope*, JSCell*) WTF_INTERNAL;
</ins><span class="cx"> double JIT_OPERATION operationFModOnInts(int32_t, int32_t) WTF_INTERNAL;
</span><span class="cx"> size_t JIT_OPERATION operationIsObject(ExecState*, EncodedJSValue) WTF_INTERNAL;
</span><span class="cx"> size_t JIT_OPERATION operationIsFunction(EncodedJSValue) WTF_INTERNAL;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -4159,9 +4159,11 @@
</span><span class="cx"> {
</span><span class="cx">     GPRFlushedCallResult result(this);
</span><span class="cx">     GPRReg resultGPR = result.gpr();
</span><ins>+    SpeculateCellOperand scope(this, node-&gt;child1());
+    GPRReg scopeGPR = scope.gpr();
</ins><span class="cx">     flushRegisters();
</span><span class="cx">     callOperation(
</span><del>-        operationNewFunctionNoCheck, resultGPR, m_jit.codeBlock()-&gt;functionDecl(node-&gt;functionDeclIndex()));
</del><ins>+        operationNewFunctionNoCheck, resultGPR, scopeGPR, m_jit.codeBlock()-&gt;functionDecl(node-&gt;functionDeclIndex()));
</ins><span class="cx">     cellResult(resultGPR, node);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4169,10 +4171,12 @@
</span><span class="cx"> {
</span><span class="cx">     GPRFlushedCallResult result(this);
</span><span class="cx">     GPRReg resultGPR = result.gpr();
</span><ins>+    SpeculateCellOperand scope(this, node-&gt;child1());
+    GPRReg scopeGPR = scope.gpr();
</ins><span class="cx">     flushRegisters();
</span><span class="cx">     callOperation(
</span><span class="cx">         operationNewFunctionNoCheck,
</span><del>-        resultGPR,
</del><ins>+        resultGPR, scopeGPR, 
</ins><span class="cx">         m_jit.codeBlock()-&gt;functionExpr(node-&gt;functionExprIndex()));
</span><span class="cx">     cellResult(resultGPR, node);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJITh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -1049,7 +1049,7 @@
</span><span class="cx">         m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
</span><span class="cx">         return appendCallWithExceptionCheckSetResult(operation, result);
</span><span class="cx">     }
</span><del>-    JITCompiler::Call callOperation(C_JITOperation_ECC operation, GPRReg result, GPRReg arg1, JSCell* cell)
</del><ins>+    JITCompiler::Call callOperation(C_JITOperation_EJscC operation, GPRReg result, GPRReg arg1, JSCell* cell)
</ins><span class="cx">     {
</span><span class="cx">         m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(cell));
</span><span class="cx">         return appendCallWithExceptionCheckSetResult(operation, result);
</span><span class="lines">@@ -1288,6 +1288,11 @@
</span><span class="cx">         m_jit.setupArgumentsWithExecState(arg1, arg2);
</span><span class="cx">         return appendCallWithExceptionCheckSetResult(operation, result);
</span><span class="cx">     }
</span><ins>+    JITCompiler::Call callOperation(J_JITOperation_EJscC operation, GPRReg result, GPRReg arg1, JSCell* cell)
+    {
+        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(cell));
+        return appendCallWithExceptionCheckSetResult(operation, result);
+    }
</ins><span class="cx">     JITCompiler::Call callOperation(J_JITOperation_ESsiCI operation, GPRReg result, StructureStubInfo* stubInfo, GPRReg arg1, const StringImpl* uid)
</span><span class="cx">     {
</span><span class="cx">         m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1, TrustedImmPtr(uid));
</span><span class="lines">@@ -1595,6 +1600,11 @@
</span><span class="cx">         m_jit.setupArgumentsWithExecState(arg1, arg2);
</span><span class="cx">         return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
</span><span class="cx">     }
</span><ins>+    JITCompiler::Call callOperation(J_JITOperation_EJscC operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, JSCell* cell)
+    {
+        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(cell));
+        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
+    }
</ins><span class="cx">     JITCompiler::Call callOperation(J_JITOperation_ESsiCI operation, GPRReg resultTag, GPRReg resultPayload, StructureStubInfo* stubInfo, GPRReg arg1, const StringImpl* uid)
</span><span class="cx">     {
</span><span class="cx">         m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1, TrustedImmPtr(uid));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -4516,7 +4516,9 @@
</span><span class="cx">         GPRReg valuePayloadGPR = value.payloadGPR();
</span><span class="cx">         GPRReg resultTagGPR = resultTag.gpr();
</span><span class="cx">         GPRReg resultPayloadGPR = resultPayload.gpr();
</span><del>-        
</del><ins>+        SpeculateCellOperand scope(this, node-&gt;child2());
+        GPRReg scopeGPR = scope.gpr();
+
</ins><span class="cx">         m_jit.move(valuePayloadGPR, resultPayloadGPR);
</span><span class="cx">         m_jit.move(valueTagGPR, resultTagGPR);
</span><span class="cx">         
</span><span class="lines">@@ -4524,7 +4526,7 @@
</span><span class="cx">         
</span><span class="cx">         addSlowPathGenerator(
</span><span class="cx">             slowPathCall(
</span><del>-                notCreated, this, operationNewFunction, JSValueRegs(resultTagGPR, resultPayloadGPR),
</del><ins>+                notCreated, this, operationNewFunction, JSValueRegs(resultTagGPR, resultPayloadGPR), scopeGPR,
</ins><span class="cx">                 m_jit.codeBlock()-&gt;functionDecl(node-&gt;functionDeclIndex())));
</span><span class="cx">         
</span><span class="cx">         jsValueResult(resultTagGPR, resultPayloadGPR, node);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -4546,6 +4546,8 @@
</span><span class="cx">     case NewFunction: {
</span><span class="cx">         JSValueOperand value(this, node-&gt;child1());
</span><span class="cx">         GPRTemporary result(this, Reuse, value);
</span><ins>+        SpeculateCellOperand scope(this, node-&gt;child2());
+        GPRReg scopeGPR = scope.gpr();
</ins><span class="cx">         
</span><span class="cx">         GPRReg valueGPR = value.gpr();
</span><span class="cx">         GPRReg resultGPR = result.gpr();
</span><span class="lines">@@ -4557,7 +4559,7 @@
</span><span class="cx">         addSlowPathGenerator(
</span><span class="cx">             slowPathCall(
</span><span class="cx">                 notCreated, this, operationNewFunction,
</span><del>-                resultGPR, m_jit.codeBlock()-&gt;functionDecl(node-&gt;functionDeclIndex())));
</del><ins>+                resultGPR, scopeGPR, m_jit.codeBlock()-&gt;functionDecl(node-&gt;functionDeclIndex())));
</ins><span class="cx">         
</span><span class="cx">         jsValueResult(resultGPR, node);
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JIT.h (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JIT.h        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/jit/JIT.h        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -697,6 +697,7 @@
</span><span class="cx"> #endif
</span><span class="cx">         MacroAssembler::Call callOperation(J_JITOperation_EJIdc, int, GPRReg, const Identifier*);
</span><span class="cx">         MacroAssembler::Call callOperation(J_JITOperation_EJJ, int, GPRReg, GPRReg);
</span><ins>+        MacroAssembler::Call callOperation(J_JITOperation_EJscC, int, GPRReg, JSCell*);
</ins><span class="cx"> #if USE(JSVALUE64)
</span><span class="cx">         MacroAssembler::Call callOperation(WithProfileTag, J_JITOperation_EJJ, int, GPRReg, GPRReg);
</span><span class="cx"> #else
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITInlines.h (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITInlines.h        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/jit/JITInlines.h        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -258,6 +258,12 @@
</span><span class="cx">     return appendCallWithExceptionCheck(operation);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EJscC operation, int dst, GPRReg arg1, JSCell* cell)
+{
+    setupArgumentsWithExecState(arg1, TrustedImmPtr(cell));
+    return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
+}
+
</ins><span class="cx"> ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EP operation, int dst, void* pointer)
</span><span class="cx"> {
</span><span class="cx">     setupArgumentsWithExecState(TrustedImmPtr(pointer));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -1034,7 +1034,7 @@
</span><span class="cx"> {
</span><span class="cx">     Jump lazyJump;
</span><span class="cx">     int dst = currentInstruction[1].u.operand;
</span><del>-    if (currentInstruction[3].u.operand) {
</del><ins>+    if (currentInstruction[4].u.operand) {
</ins><span class="cx"> #if USE(JSVALUE32_64)
</span><span class="cx">         lazyJump = branch32(NotEqual, tagFor(dst), TrustedImm32(JSValue::EmptyValueTag));
</span><span class="cx"> #else
</span><span class="lines">@@ -1042,18 +1042,28 @@
</span><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    FunctionExecutable* funcExec = m_codeBlock-&gt;functionDecl(currentInstruction[2].u.operand);
-    callOperation(operationNewFunction, dst, funcExec);
</del><ins>+#if USE(JSVALUE64)
+    emitGetVirtualRegister(currentInstruction[2].u.operand, regT0);
+#else
+    emitLoadPayload(currentInstruction[2].u.operand, regT0);
+#endif
+    FunctionExecutable* funcExec = m_codeBlock-&gt;functionDecl(currentInstruction[3].u.operand);
+    callOperation(operationNewFunction, dst, regT0, funcExec);
</ins><span class="cx"> 
</span><del>-    if (currentInstruction[3].u.operand)
</del><ins>+    if (currentInstruction[4].u.operand)
</ins><span class="cx">         lazyJump.link(this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JIT::emit_op_new_func_exp(Instruction* currentInstruction)
</span><span class="cx"> {
</span><span class="cx">     int dst = currentInstruction[1].u.operand;
</span><del>-    FunctionExecutable* funcExpr = m_codeBlock-&gt;functionExpr(currentInstruction[2].u.operand);
-    callOperation(operationNewFunction, dst, funcExpr);
</del><ins>+#if USE(JSVALUE64)
+    emitGetVirtualRegister(currentInstruction[2].u.operand, regT0);
+#else
+    emitLoadPayload(currentInstruction[2].u.operand, regT0);
+#endif
+    FunctionExecutable* funcExpr = m_codeBlock-&gt;functionExpr(currentInstruction[3].u.operand);
+    callOperation(operationNewFunction, dst, regT0, funcExpr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JIT::emit_op_new_array(Instruction* currentInstruction)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.cpp (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -947,12 +947,12 @@
</span><span class="cx">     return JSValue::encode(constructArrayWithSizeQuirk(exec, profile, exec-&gt;lexicalGlobalObject(), sizeValue));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-EncodedJSValue JIT_OPERATION operationNewFunction(ExecState* exec, JSCell* functionExecutable)
</del><ins>+EncodedJSValue JIT_OPERATION operationNewFunction(ExecState* exec, JSScope* scope, JSCell* functionExecutable)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(functionExecutable-&gt;inherits(FunctionExecutable::info()));
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="cx">     NativeCallFrameTracer tracer(&amp;vm, exec);
</span><del>-    return JSValue::encode(JSFunction::create(vm, static_cast&lt;FunctionExecutable*&gt;(functionExecutable), exec-&gt;scope()));
</del><ins>+    return JSValue::encode(JSFunction::create(vm, static_cast&lt;FunctionExecutable*&gt;(functionExecutable), scope));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSCell* JIT_OPERATION operationNewObject(ExecState* exec, Structure* structure)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.h (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.h        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.h        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">     Idc: const Identifier*
</span><span class="cx">     J: EncodedJSValue
</span><span class="cx">     Jcp: const JSValue*
</span><del>-    Jsa: JSLexicalEnvironment*
</del><ins>+    Jsc: JSScope*
</ins><span class="cx">     Jss: JSString*
</span><span class="cx">     O: JSObject*
</span><span class="cx">     P: pointer (char*)
</span><span class="lines">@@ -113,6 +113,7 @@
</span><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EPP)(ExecState*, void*, void*);
</span><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EPS)(ExecState*, void*, size_t);
</span><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EPc)(ExecState*, Instruction*);
</span><ins>+typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EJscC)(ExecState*, JSScope*, JSCell*);
</ins><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_ESS)(ExecState*, size_t, size_t);
</span><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_ESsiCI)(ExecState*, StructureStubInfo*, JSCell*, StringImpl*);
</span><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_ESsiJI)(ExecState*, StructureStubInfo*, EncodedJSValue, StringImpl*);
</span><span class="lines">@@ -127,6 +128,7 @@
</span><span class="cx"> typedef JSCell* JIT_OPERATION (*C_JITOperation_ECC)(ExecState*, JSCell*, JSCell*);
</span><span class="cx"> typedef JSCell* JIT_OPERATION (*C_JITOperation_EIcf)(ExecState*, InlineCallFrame*);
</span><span class="cx"> typedef JSCell* JIT_OPERATION (*C_JITOperation_EJ)(ExecState*, EncodedJSValue);
</span><ins>+typedef JSCell* JIT_OPERATION (*C_JITOperation_EJscC)(ExecState*, JSScope*, JSCell*);
</ins><span class="cx"> typedef JSCell* JIT_OPERATION (*C_JITOperation_EJZ)(ExecState*, EncodedJSValue, int32_t);
</span><span class="cx"> typedef JSCell* JIT_OPERATION (*C_JITOperation_EJZC)(ExecState*, EncodedJSValue, int32_t, JSCell*);
</span><span class="cx"> typedef JSCell* JIT_OPERATION (*C_JITOperation_EJJC)(ExecState*, EncodedJSValue, EncodedJSValue, JSCell*);
</span><span class="lines">@@ -266,7 +268,7 @@
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationNewArrayWithProfile(ExecState*, ArrayAllocationProfile*, const JSValue* values, int32_t size) WTF_INTERNAL;
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationNewArrayBufferWithProfile(ExecState*, ArrayAllocationProfile*, const JSValue* values, int32_t size) WTF_INTERNAL;
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationNewArrayWithSizeAndProfile(ExecState*, ArrayAllocationProfile*, EncodedJSValue size) WTF_INTERNAL;
</span><del>-EncodedJSValue JIT_OPERATION operationNewFunction(ExecState*, JSCell*) WTF_INTERNAL;
</del><ins>+EncodedJSValue JIT_OPERATION operationNewFunction(ExecState*, JSScope*, JSCell*) WTF_INTERNAL;
</ins><span class="cx"> JSCell* JIT_OPERATION operationNewObject(ExecState*, Structure*) WTF_INTERNAL;
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationNewRegexp(ExecState*, void*) WTF_INTERNAL;
</span><span class="cx"> void JIT_OPERATION operationHandleWatchdogTimer(ExecState*) WTF_INTERNAL;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -1001,18 +1001,20 @@
</span><span class="cx">     LLINT_BEGIN();
</span><span class="cx">     CodeBlock* codeBlock = exec-&gt;codeBlock();
</span><span class="cx">     ASSERT(codeBlock-&gt;codeType() != FunctionCode || !codeBlock-&gt;needsActivation() || exec-&gt;hasActivation());
</span><ins>+    JSScope* scope = exec-&gt;uncheckedR(pc[2].u.operand).Register::scope();
</ins><span class="cx"> #if LLINT_SLOW_PATH_TRACING
</span><span class="cx">     dataLogF(&quot;Creating function!\n&quot;);
</span><span class="cx"> #endif
</span><del>-    LLINT_RETURN(JSFunction::create(vm, codeBlock-&gt;functionDecl(pc[2].u.operand), exec-&gt;scope()));
</del><ins>+    LLINT_RETURN(JSFunction::create(vm, codeBlock-&gt;functionDecl(pc[3].u.operand), scope));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> LLINT_SLOW_PATH_DECL(slow_path_new_func_exp)
</span><span class="cx"> {
</span><span class="cx">     LLINT_BEGIN();
</span><span class="cx">     CodeBlock* codeBlock = exec-&gt;codeBlock();
</span><del>-    FunctionExecutable* function = codeBlock-&gt;functionExpr(pc[2].u.operand);
-    JSFunction* func = JSFunction::create(vm, function, exec-&gt;scope());
</del><ins>+    JSScope* scope = exec-&gt;uncheckedR(pc[2].u.operand).Register::scope();
+    FunctionExecutable* function = codeBlock-&gt;functionExpr(pc[3].u.operand);
+    JSFunction* func = JSFunction::create(vm, function, scope);
</ins><span class="cx">     
</span><span class="cx">     LLINT_RETURN(func);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreterasm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -1132,7 +1132,7 @@
</span><span class="cx"> _llint_op_new_func_exp:
</span><span class="cx">     traceExecution()
</span><span class="cx">     callSlowPath(_llint_slow_path_new_func_exp)
</span><del>-    dispatch(3)
</del><ins>+    dispatch(4)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> _llint_op_call:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreter32_64asm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -1911,13 +1911,13 @@
</span><span class="cx"> 
</span><span class="cx"> _llint_op_new_func:
</span><span class="cx">     traceExecution()
</span><del>-    btiz 12[PC], .opNewFuncUnchecked
</del><ins>+    btiz 16[PC], .opNewFuncUnchecked
</ins><span class="cx">     loadi 4[PC], t1
</span><span class="cx">     bineq TagOffset[cfr, t1, 8], EmptyValueTag, .opNewFuncDone
</span><span class="cx"> .opNewFuncUnchecked:
</span><span class="cx">     callSlowPath(_llint_slow_path_new_func)
</span><span class="cx"> .opNewFuncDone:
</span><del>-    dispatch(4)
</del><ins>+    dispatch(5)
</ins><span class="cx"> 
</span><span class="cx"> macro arrayProfileForCall()
</span><span class="cx">     loadi 16[PC], t3
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreter64asm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm (176108 => 176109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm        2014-11-14 00:46:53 UTC (rev 176108)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm        2014-11-14 01:07:48 UTC (rev 176109)
</span><span class="lines">@@ -1769,14 +1769,14 @@
</span><span class="cx"> 
</span><span class="cx"> _llint_op_new_func:
</span><span class="cx">     traceExecution()
</span><del>-    loadisFromInstruction(3, t2)
</del><ins>+    loadisFromInstruction(4, t2)
</ins><span class="cx">     btiz t2, .opNewFuncUnchecked
</span><span class="cx">     loadisFromInstruction(1, t1)
</span><span class="cx">     btqnz [cfr, t1, 8], .opNewFuncDone
</span><span class="cx"> .opNewFuncUnchecked:
</span><span class="cx">     callSlowPath(_llint_slow_path_new_func)
</span><span class="cx"> .opNewFuncDone:
</span><del>-    dispatch(4)
</del><ins>+    dispatch(5)
</ins><span class="cx"> 
</span><span class="cx"> macro arrayProfileForCall()
</span><span class="cx">     loadisFromInstruction(4, t3)
</span></span></pre>
</div>
</div>

</body>
</html>