<!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>[175509] 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/175509">175509</a></dd>
<dt>Author</dt> <dd>msaboff@apple.com</dd>
<dt>Date</dt> <dd>2014-11-03 19:53:18 -0800 (Mon, 03 Nov 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Update scope related slow path code to use scope register added to opcodes
https://bugs.webkit.org/show_bug.cgi?id=138254
Reviewed by Mark Lam.
Updated slow paths for op_pop_scope, op_push_name_scope and op_push_with_scope.
Added scope register index parameter to the front of the relevant argument lists of the
slow functions. In the case of op_push_name_scope for x86 (32 bit), there aren't enough
registers to accomodate all the parameters. Therefore, added two new JSVALUE32_64 slow
paths called operationPushCatchScope() and operationPushFunctionNameScope() to eliminate
the last "type" argument.
* assembler/MacroAssemblerCodeRef.h:
(JSC::FunctionPtr::FunctionPtr): Added a new template to take 6 arguments.
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
New variants of setupArgumentsWithExecState() and callOperation() to handle the new
combinations of argument types and counts.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):
Use the new slow paths.
* jit/JITOperations.cpp:
* jit/JITOperations.h:
Updates to set the scope result using the scope register index. Added operationPushCatchScope()
and operationPushFunctionNameScope().
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
Updated the scope slow paths to use the scope register index in the instruction to read and
write the register instead of using CallFrame::scope() and CallFrame::setScope().</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreassemblerMacroAssemblerCodeRefh">trunk/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitCCallHelpersh">trunk/Source/JavaScriptCore/jit/CCallHelpers.h</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="#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>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (175508 => 175509)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-11-04 03:36:28 UTC (rev 175508)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-11-04 03:53:18 UTC (rev 175509)
</span><span class="lines">@@ -1,5 +1,51 @@
</span><span class="cx"> 2014-11-03 Michael Saboff <msaboff@apple.com>
</span><span class="cx">
</span><ins>+ Update scope related slow path code to use scope register added to opcodes
+ https://bugs.webkit.org/show_bug.cgi?id=138254
+
+ Reviewed by Mark Lam.
+
+ Updated slow paths for op_pop_scope, op_push_name_scope and op_push_with_scope.
+ Added scope register index parameter to the front of the relevant argument lists of the
+ slow functions. In the case of op_push_name_scope for x86 (32 bit), there aren't enough
+ registers to accomodate all the parameters. Therefore, added two new JSVALUE32_64 slow
+ paths called operationPushCatchScope() and operationPushFunctionNameScope() to eliminate
+ the last "type" argument.
+
+
+ * assembler/MacroAssemblerCodeRef.h:
+ (JSC::FunctionPtr::FunctionPtr): Added a new template to take 6 arguments.
+
+ * jit/CCallHelpers.h:
+ (JSC::CCallHelpers::setupArgumentsWithExecState):
+ * jit/JIT.h:
+ * jit/JITInlines.h:
+ (JSC::JIT::callOperation):
+ New variants of setupArgumentsWithExecState() and callOperation() to handle the new
+ combinations of argument types and counts.
+
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_push_with_scope):
+ (JSC::JIT::emit_op_pop_scope):
+ (JSC::JIT::emit_op_push_name_scope):
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emit_op_push_with_scope):
+ (JSC::JIT::emit_op_pop_scope):
+ (JSC::JIT::emit_op_push_name_scope):
+ Use the new slow paths.
+
+ * jit/JITOperations.cpp:
+ * jit/JITOperations.h:
+ Updates to set the scope result using the scope register index. Added operationPushCatchScope()
+ and operationPushFunctionNameScope().
+
+ * llint/LLIntSlowPaths.cpp:
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+ Updated the scope slow paths to use the scope register index in the instruction to read and
+ write the register instead of using CallFrame::scope() and CallFrame::setScope().
+
+2014-11-03 Michael Saboff <msaboff@apple.com>
+
</ins><span class="cx"> Add "get scope" byte code
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=138326
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreassemblerMacroAssemblerCodeRefh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h (175508 => 175509)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h        2014-11-04 03:36:28 UTC (rev 175508)
+++ trunk/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h        2014-11-04 03:53:18 UTC (rev 175509)
</span><span class="lines">@@ -132,6 +132,12 @@
</span><span class="cx"> ASSERT_VALID_CODE_POINTER(m_value);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ template<typename returnType, typename argType1, typename argType2, typename argType3, typename argType4, typename argType5, typename argType6>
+ FunctionPtr(returnType(*value)(argType1, argType2, argType3, argType4, argType5, argType6))
+ : m_value((void*)value)
+ {
+ ASSERT_VALID_CODE_POINTER(m_value);
+ }
</ins><span class="cx"> // MSVC doesn't seem to treat functions with different calling conventions as
</span><span class="cx"> // different types; these methods already defined for fastcall, below.
</span><span class="cx"> #if CALLING_CONVENTION_IS_STDCALL && !OS(WINDOWS)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitCCallHelpersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/CCallHelpers.h (175508 => 175509)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/CCallHelpers.h        2014-11-04 03:36:28 UTC (rev 175508)
+++ trunk/Source/JavaScriptCore/jit/CCallHelpers.h        2014-11-04 03:53:18 UTC (rev 175509)
</span><span class="lines">@@ -289,6 +289,15 @@
</span><span class="cx"> addCallArgument(arg3);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3)
+ {
+ resetCallArguments();
+ addCallArgument(GPRInfo::callFrameRegister);
+ addCallArgument(arg1);
+ addCallArgument(arg2);
+ addCallArgument(arg3);
+ }
+
</ins><span class="cx"> ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, GPRReg arg3)
</span><span class="cx"> {
</span><span class="cx"> resetCallArguments();
</span><span class="lines">@@ -395,6 +404,17 @@
</span><span class="cx"> addCallArgument(arg5);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImmPtr arg2, GPRReg arg3, GPRReg arg4, TrustedImm32 arg5)
+ {
+ resetCallArguments();
+ addCallArgument(GPRInfo::callFrameRegister);
+ addCallArgument(arg1);
+ addCallArgument(arg2);
+ addCallArgument(arg3);
+ addCallArgument(arg4);
+ addCallArgument(arg5);
+ }
+
</ins><span class="cx"> ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4)
</span><span class="cx"> {
</span><span class="cx"> resetCallArguments();
</span><span class="lines">@@ -1381,6 +1401,13 @@
</span><span class="cx"> setupArgumentsWithExecState(arg1, arg2, arg3);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImmPtr arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)
+ {
+ poke(arg5, POKE_ARGUMENT_OFFSET + 1);
+ poke(arg4, POKE_ARGUMENT_OFFSET);
+ setupArgumentsWithExecState(arg1, arg2, arg3);
+ }
+
</ins><span class="cx"> ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)
</span><span class="cx"> {
</span><span class="cx"> poke(arg5, POKE_ARGUMENT_OFFSET + 1);
</span><span class="lines">@@ -1519,6 +1546,13 @@
</span><span class="cx"> setupArgumentsWithExecState(arg1, arg2, arg3);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, TrustedImmPtr arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)
+ {
+ poke(arg5, POKE_ARGUMENT_OFFSET + 1);
+ poke(arg4, POKE_ARGUMENT_OFFSET);
+ setupArgumentsWithExecState(arg1, arg2, arg3);
+ }
+
</ins><span class="cx"> ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
</span><span class="cx"> {
</span><span class="cx"> poke(arg5, POKE_ARGUMENT_OFFSET + 1);
</span><span class="lines">@@ -1678,6 +1712,16 @@
</span><span class="cx"> move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImmPtr arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)
+ {
+ move(arg3, GPRInfo::argumentGPR3);
+ move(arg1, GPRInfo::argumentGPR1);
+ move(arg2, GPRInfo::argumentGPR2);
+ move(arg4, GPRInfo::argumentGPR4);
+ move(arg5, GPRInfo::argumentGPR5);
+ move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
+ }
+
</ins><span class="cx"> ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)
</span><span class="cx"> {
</span><span class="cx"> setupTwoStubArgsGPR<GPRInfo::argumentGPR2, GPRInfo::argumentGPR3>(arg2, arg3);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JIT.h (175508 => 175509)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JIT.h        2014-11-04 03:36:28 UTC (rev 175508)
+++ trunk/Source/JavaScriptCore/jit/JIT.h        2014-11-04 03:53:18 UTC (rev 175509)
</span><span class="lines">@@ -716,7 +716,11 @@
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_ECC, RegisterID, RegisterID);
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_ECICC, RegisterID, const Identifier*, RegisterID, RegisterID);
</span><span class="cx"> MacroAssembler::Call callOperation(J_JITOperation_EE, RegisterID);
</span><del>- MacroAssembler::Call callOperation(V_JITOperation_EIdJZZ, const Identifier*, RegisterID, int32_t, int32_t);
</del><ins>+#if USE(JSVALUE64)
+ MacroAssembler::Call callOperation(V_JITOperation_EZIdJZZ, int, const Identifier*, RegisterID, int32_t, int32_t);
+#else
+ MacroAssembler::Call callOperation(V_JITOperation_EZIdJZ, int, const Identifier*, RegisterID, int32_t);
+#endif
</ins><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_EJ, RegisterID);
</span><span class="cx"> #if USE(JSVALUE64)
</span><span class="cx"> MacroAssembler::Call callOperationNoExceptionCheck(V_JITOperation_EJ, RegisterID);
</span><span class="lines">@@ -735,6 +739,7 @@
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_EJZ, RegisterID, int32_t);
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_EPc, Instruction*);
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_EZ, int32_t);
</span><ins>+ MacroAssembler::Call callOperation(V_JITOperation_EZJ, int, GPRReg);
</ins><span class="cx"> MacroAssembler::Call callOperationWithCallFrameRollbackOnException(J_JITOperation_E);
</span><span class="cx"> MacroAssembler::Call callOperationWithCallFrameRollbackOnException(V_JITOperation_ECb, CodeBlock*);
</span><span class="cx"> MacroAssembler::Call callOperationWithCallFrameRollbackOnException(Z_JITOperation_E);
</span><span class="lines">@@ -748,11 +753,12 @@
</span><span class="cx"> MacroAssembler::Call callOperation(P_JITOperation_EJS, GPRReg, GPRReg, size_t);
</span><span class="cx"> MacroAssembler::Call callOperation(S_JITOperation_EJ, RegisterID, RegisterID);
</span><span class="cx"> MacroAssembler::Call callOperation(S_JITOperation_EJJ, RegisterID, RegisterID, RegisterID, RegisterID);
</span><del>- MacroAssembler::Call callOperation(V_JITOperation_EIdJZZ, const Identifier*, RegisterID, RegisterID, int32_t, int32_t);
</del><ins>+ MacroAssembler::Call callOperation(V_JITOperation_EZIdJZ, int, const Identifier*, RegisterID, RegisterID, int32_t);
</ins><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_EJ, RegisterID, RegisterID);
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_EJJJ, RegisterID, RegisterID, RegisterID, RegisterID, RegisterID, RegisterID);
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_EJZ, RegisterID, RegisterID, int32_t);
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_EJZJ, RegisterID, RegisterID, int32_t, RegisterID, RegisterID);
</span><ins>+ MacroAssembler::Call callOperation(V_JITOperation_EZJ, int32_t, RegisterID, RegisterID);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> Jump checkStructure(RegisterID reg, Structure* structure);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITInlines.h (175508 => 175509)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITInlines.h        2014-11-04 03:36:28 UTC (rev 175508)
+++ trunk/Source/JavaScriptCore/jit/JITInlines.h        2014-11-04 03:53:18 UTC (rev 175509)
</span><span class="lines">@@ -380,6 +380,12 @@
</span><span class="cx"> return appendCallWithExceptionCheck(operation);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EZJ operation, int dst, GPRReg arg)
+{
+ setupArgumentsWithExecState(TrustedImm32(dst), arg);
+ return appendCallWithExceptionCheck(operation);
+}
+
</ins><span class="cx"> ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(JIT::WithProfileTag, J_JITOperation_ESsiJI operation, int dst, StructureStubInfo* stubInfo, GPRReg arg1, StringImpl* uid)
</span><span class="cx"> {
</span><span class="cx"> setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1, TrustedImmPtr(uid));
</span><span class="lines">@@ -441,9 +447,9 @@
</span><span class="cx"> return appendCallWithExceptionCheck(operation);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EIdJZZ operation, const Identifier* identOp1, RegisterID regOp2, int32_t op3, int32_t op4)
</del><ins>+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EZIdJZZ operation, int op1, const Identifier* identOp2, RegisterID regOp3, int32_t op4, int32_t op5)
</ins><span class="cx"> {
</span><del>- setupArgumentsWithExecState(TrustedImmPtr(identOp1), regOp2, TrustedImm32(op3), TrustedImm32(op4));
</del><ins>+ setupArgumentsWithExecState(TrustedImm32(op1), TrustedImmPtr(identOp2), regOp3, TrustedImm32(op4), TrustedImm32(op5));
</ins><span class="cx"> return appendCallWithExceptionCheck(operation);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -575,9 +581,9 @@
</span><span class="cx"> return appendCallWithExceptionCheck(operation);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EIdJZZ operation, const Identifier* identOp1, RegisterID regOp2Tag, RegisterID regOp2Payload, int32_t op3, int32_t op4)
</del><ins>+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EZIdJZ operation, int32_t op1, const Identifier* identOp2, RegisterID regOp3Tag, RegisterID regOp3Payload, int32_t op4)
</ins><span class="cx"> {
</span><del>- setupArgumentsWithExecState(TrustedImmPtr(identOp1), regOp2Payload, regOp2Tag, TrustedImm32(op3), TrustedImm32(op4));
</del><ins>+ setupArgumentsWithExecState(TrustedImm32(op1), TrustedImmPtr(identOp2), regOp3Payload, regOp3Tag, TrustedImm32(op4));
</ins><span class="cx"> return appendCallWithExceptionCheck(operation);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -593,6 +599,12 @@
</span><span class="cx"> return appendCallWithExceptionCheck(operation);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EZJ operation, int dst, RegisterID regOp1Tag, RegisterID regOp1Payload)
+{
+ setupArgumentsWithExecState(TrustedImm32(dst), regOp1Payload, regOp1Tag);
+ return appendCallWithExceptionCheck(operation);
+}
+
</ins><span class="cx"> ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EJZ operation, RegisterID regOp1Tag, RegisterID regOp1Payload, int32_t op2)
</span><span class="cx"> {
</span><span class="cx"> setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG regOp1Payload, regOp1Tag, TrustedImm32(op2));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp (175508 => 175509)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2014-11-04 03:36:28 UTC (rev 175508)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2014-11-04 03:53:18 UTC (rev 175509)
</span><span class="lines">@@ -444,13 +444,16 @@
</span><span class="cx">
</span><span class="cx"> void JIT::emit_op_push_with_scope(Instruction* currentInstruction)
</span><span class="cx"> {
</span><ins>+ int dst = currentInstruction[1].u.operand;
</ins><span class="cx"> emitGetVirtualRegister(currentInstruction[2].u.operand, regT0);
</span><del>- callOperation(operationPushWithScope, regT0);
</del><ins>+ callOperation(operationPushWithScope, dst, regT0);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void JIT::emit_op_pop_scope(Instruction*)
</del><ins>+void JIT::emit_op_pop_scope(Instruction* currentInstruction)
</ins><span class="cx"> {
</span><del>- callOperation(operationPopScope);
</del><ins>+ int scope = currentInstruction[1].u.operand;
+
+ callOperation(operationPopScope, scope);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void JIT::compileOpStrictEq(Instruction* currentInstruction, CompileOpStrictEqType type)
</span><span class="lines">@@ -506,8 +509,9 @@
</span><span class="cx">
</span><span class="cx"> void JIT::emit_op_push_name_scope(Instruction* currentInstruction)
</span><span class="cx"> {
</span><ins>+ int dst = currentInstruction[1].u.operand;
</ins><span class="cx"> emitGetVirtualRegister(currentInstruction[3].u.operand, regT0);
</span><del>- callOperation(operationPushNameScope, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT0, currentInstruction[4].u.operand, currentInstruction[5].u.operand);
</del><ins>+ callOperation(operationPushNameScope, dst, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT0, currentInstruction[4].u.operand, currentInstruction[5].u.operand);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void JIT::emit_op_catch(Instruction* currentInstruction)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodes32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp (175508 => 175509)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp        2014-11-04 03:36:28 UTC (rev 175508)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp        2014-11-04 03:53:18 UTC (rev 175509)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include "JSCell.h"
</span><span class="cx"> #include "JSEnvironmentRecord.h"
</span><span class="cx"> #include "JSFunction.h"
</span><ins>+#include "JSNameScope.h"
</ins><span class="cx"> #include "JSPropertyNameEnumerator.h"
</span><span class="cx"> #include "LinkBuffer.h"
</span><span class="cx"> #include "MaxFrameExtentForSlowPathCall.h"
</span><span class="lines">@@ -752,13 +753,15 @@
</span><span class="cx">
</span><span class="cx"> void JIT::emit_op_push_with_scope(Instruction* currentInstruction)
</span><span class="cx"> {
</span><ins>+ int dst = currentInstruction[1].u.operand;
</ins><span class="cx"> emitLoad(currentInstruction[2].u.operand, regT1, regT0);
</span><del>- callOperation(operationPushWithScope, regT1, regT0);
</del><ins>+ callOperation(operationPushWithScope, dst, regT1, regT0);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void JIT::emit_op_pop_scope(Instruction*)
</del><ins>+void JIT::emit_op_pop_scope(Instruction* currentInstruction)
</ins><span class="cx"> {
</span><del>- callOperation(operationPopScope);
</del><ins>+ int scope = currentInstruction[1].u.operand;
+ callOperation(operationPopScope, scope);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void JIT::emit_op_to_number(Instruction* currentInstruction)
</span><span class="lines">@@ -786,8 +789,15 @@
</span><span class="cx">
</span><span class="cx"> void JIT::emit_op_push_name_scope(Instruction* currentInstruction)
</span><span class="cx"> {
</span><ins>+ int dst = currentInstruction[1].u.operand;
</ins><span class="cx"> emitLoad(currentInstruction[3].u.operand, regT1, regT0);
</span><del>- callOperation(operationPushNameScope, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT1, regT0, currentInstruction[4].u.operand, currentInstruction[5].u.operand);
</del><ins>+ if (currentInstruction[5].u.operand == JSNameScope::CatchScope) {
+ callOperation(operationPushCatchScope, dst, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT1, regT0, currentInstruction[4].u.operand);
+ return;
+ }
+
+ RELEASE_ASSERT(currentInstruction[5].u.operand == JSNameScope::FunctionNameScope);
+ callOperation(operationPushFunctionNameScope, dst, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT1, regT0, currentInstruction[4].u.operand);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void JIT::emit_op_catch(Instruction* currentInstruction)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.cpp (175508 => 175509)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2014-11-04 03:36:28 UTC (rev 175508)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2014-11-04 03:53:18 UTC (rev 175509)
</span><span class="lines">@@ -1308,7 +1308,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void JIT_OPERATION operationPushNameScope(ExecState* exec, Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes, int32_t type)
</del><ins>+void JIT_OPERATION operationPushNameScope(ExecState* exec, int32_t dst, Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes, int32_t type)
</ins><span class="cx"> {
</span><span class="cx"> VM& vm = exec->vm();
</span><span class="cx"> NativeCallFrameTracer tracer(&vm, exec);
</span><span class="lines">@@ -1316,11 +1316,23 @@
</span><span class="cx"> JSNameScope::Type scopeType = static_cast<JSNameScope::Type>(type);
</span><span class="cx"> JSNameScope* scope = JSNameScope::create(exec, *identifier, JSValue::decode(encodedValue), attibutes, scopeType);
</span><span class="cx">
</span><del>- exec->setScope(scope);
</del><ins>+ exec->uncheckedR(dst) = scope;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void JIT_OPERATION operationPushWithScope(ExecState* exec, EncodedJSValue encodedValue)
</del><ins>+#if USE(JSVALUE32_64)
+void JIT_OPERATION operationPushCatchScope(ExecState* exec, int32_t dst, Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes)
</ins><span class="cx"> {
</span><ins>+ operationPushNameScope(exec, dst, identifier, encodedValue, attibutes, JSNameScope::CatchScope);
+}
+
+void JIT_OPERATION operationPushFunctionNameScope(ExecState* exec, int32_t dst, Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes)
+{
+ operationPushNameScope(exec, dst, identifier, encodedValue, attibutes, JSNameScope::FunctionNameScope);
+}
+#endif
+
+void JIT_OPERATION operationPushWithScope(ExecState* exec, int32_t dst, EncodedJSValue encodedValue)
+{
</ins><span class="cx"> VM& vm = exec->vm();
</span><span class="cx"> NativeCallFrameTracer tracer(&vm, exec);
</span><span class="cx">
</span><span class="lines">@@ -1328,15 +1340,16 @@
</span><span class="cx"> if (vm.exception())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- exec->setScope(JSWithScope::create(exec, o));
</del><ins>+ exec->uncheckedR(dst) = JSWithScope::create(exec, o);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void JIT_OPERATION operationPopScope(ExecState* exec)
</del><ins>+void JIT_OPERATION operationPopScope(ExecState* exec, int32_t scopeReg)
</ins><span class="cx"> {
</span><span class="cx"> VM& vm = exec->vm();
</span><span class="cx"> NativeCallFrameTracer tracer(&vm, exec);
</span><span class="cx">
</span><del>- exec->setScope(exec->scope()->next());
</del><ins>+ JSScope* scope = exec->uncheckedR(scopeReg).Register::scope();
+ exec->uncheckedR(scopeReg) = scope->next();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void JIT_OPERATION operationProfileDidCall(ExecState* exec, EncodedJSValue encodedValue)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.h (175508 => 175509)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.h        2014-11-04 03:36:28 UTC (rev 175508)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.h        2014-11-04 03:53:18 UTC (rev 175509)
</span><span class="lines">@@ -164,7 +164,11 @@
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_ECPSPS)(ExecState*, JSCell*, void*, size_t, void*, size_t);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_ECZ)(ExecState*, JSCell*, int32_t);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_ECC)(ExecState*, JSCell*, JSCell*);
</span><del>-typedef void JIT_OPERATION (*V_JITOperation_EIdJZZ)(ExecState*, Identifier*, EncodedJSValue, int32_t, int32_t);
</del><ins>+#if USE(JSVALUE64)
+typedef void JIT_OPERATION (*V_JITOperation_EZIdJZZ)(ExecState*, int, Identifier*, EncodedJSValue, int32_t, int32_t);
+#else
+typedef void JIT_OPERATION (*V_JITOperation_EZIdJZ)(ExecState*, int, Identifier*, EncodedJSValue, int32_t);
+#endif
</ins><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EJ)(ExecState*, EncodedJSValue);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EJCI)(ExecState*, EncodedJSValue, JSCell*, StringImpl*);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EJIdJJ)(ExecState*, EncodedJSValue, Identifier*, EncodedJSValue, EncodedJSValue);
</span><span class="lines">@@ -179,6 +183,7 @@
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_ESsiJJI)(ExecState*, StructureStubInfo*, EncodedJSValue, EncodedJSValue, StringImpl*);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EVwsJ)(ExecState*, VariableWatchpointSet*, EncodedJSValue);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EZ)(ExecState*, int32_t);
</span><ins>+typedef void JIT_OPERATION (*V_JITOperation_EZJ)(ExecState*, int32_t, EncodedJSValue);
</ins><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EVm)(ExecState*, VM*);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_J)(EncodedJSValue);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_Z)(int32_t);
</span><span class="lines">@@ -276,10 +281,12 @@
</span><span class="cx"> void JIT_OPERATION operationPutGetterSetter(ExecState*, EncodedJSValue, Identifier*, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
</span><span class="cx"> #else
</span><span class="cx"> void JIT_OPERATION operationPutGetterSetter(ExecState*, JSCell*, Identifier*, JSCell*, JSCell*) WTF_INTERNAL;
</span><ins>+void JIT_OPERATION operationPushCatchScope(ExecState*, int32_t, Identifier*, EncodedJSValue, int32_t) WTF_INTERNAL;
+void JIT_OPERATION operationPushFunctionNameScope(ExecState*, int32_t, Identifier*, EncodedJSValue, int32_t) WTF_INTERNAL;
</ins><span class="cx"> #endif
</span><del>-void JIT_OPERATION operationPushNameScope(ExecState*, Identifier*, EncodedJSValue, int32_t, int32_t) WTF_INTERNAL;
-void JIT_OPERATION operationPushWithScope(ExecState*, EncodedJSValue) WTF_INTERNAL;
-void JIT_OPERATION operationPopScope(ExecState*) WTF_INTERNAL;
</del><ins>+void JIT_OPERATION operationPushNameScope(ExecState*, int32_t, Identifier*, EncodedJSValue, int32_t, int32_t) WTF_INTERNAL;
+void JIT_OPERATION operationPushWithScope(ExecState*, int32_t, EncodedJSValue) WTF_INTERNAL;
+void JIT_OPERATION operationPopScope(ExecState*, int32_t) WTF_INTERNAL;
</ins><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 class="cx"> EncodedJSValue JIT_OPERATION operationCheckHasInstance(ExecState*, EncodedJSValue, EncodedJSValue baseVal) WTF_INTERNAL;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp (175508 => 175509)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2014-11-04 03:36:28 UTC (rev 175508)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2014-11-04 03:53:18 UTC (rev 175509)
</span><span class="lines">@@ -1273,7 +1273,7 @@
</span><span class="cx"> JSObject* o = v.toObject(exec);
</span><span class="cx"> LLINT_CHECK_EXCEPTION();
</span><span class="cx">
</span><del>- exec->setScope(JSWithScope::create(exec, o));
</del><ins>+ exec->uncheckedR(pc[1].u.operand) = JSWithScope::create(exec, o);
</ins><span class="cx">
</span><span class="cx"> LLINT_END();
</span><span class="cx"> }
</span><span class="lines">@@ -1281,7 +1281,9 @@
</span><span class="cx"> LLINT_SLOW_PATH_DECL(slow_path_pop_scope)
</span><span class="cx"> {
</span><span class="cx"> LLINT_BEGIN();
</span><del>- exec->setScope(exec->scope()->next());
</del><ins>+ int scopeReg = pc[1].u.operand;
+ JSScope* scope = exec->uncheckedR(scopeReg).Register::scope();
+ exec->uncheckedR(scopeReg) = scope->next();
</ins><span class="cx"> LLINT_END();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1291,7 +1293,7 @@
</span><span class="cx"> CodeBlock* codeBlock = exec->codeBlock();
</span><span class="cx"> JSNameScope::Type type = static_cast<JSNameScope::Type>(pc[5].u.operand);
</span><span class="cx"> JSNameScope* scope = JSNameScope::create(exec, codeBlock->identifier(pc[2].u.operand), LLINT_OP(3).jsValue(), pc[4].u.operand, type);
</span><del>- exec->setScope(scope);
</del><ins>+ exec->uncheckedR(pc[1].u.operand) = scope;
</ins><span class="cx"> LLINT_END();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>