Title: [179851] trunk/Source/_javascript_Core
- Revision
- 179851
- Author
- [email protected]
- Date
- 2015-02-09 15:39:57 -0800 (Mon, 09 Feb 2015)
Log Message
DFG call codegen should resolve the callee operand as late as possible
https://bugs.webkit.org/show_bug.cgi?id=141398
Reviewed by Mark Lam.
This is mostly a benign restructuring to help with the implementation of
https://bugs.webkit.org/show_bug.cgi?id=141332.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (179850 => 179851)
--- trunk/Source/_javascript_Core/ChangeLog 2015-02-09 23:39:41 UTC (rev 179850)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-02-09 23:39:57 UTC (rev 179851)
@@ -1,3 +1,18 @@
+2015-02-09 Filip Pizlo <[email protected]>
+
+ DFG call codegen should resolve the callee operand as late as possible
+ https://bugs.webkit.org/show_bug.cgi?id=141398
+
+ Reviewed by Mark Lam.
+
+ This is mostly a benign restructuring to help with the implementation of
+ https://bugs.webkit.org/show_bug.cgi?id=141332.
+
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::emitCall):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::emitCall):
+
2015-02-08 Filip Pizlo <[email protected]>
DFG should only have two mechanisms for describing effectfulness of nodes; previously there were three
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (179850 => 179851)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2015-02-09 23:39:41 UTC (rev 179850)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2015-02-09 23:39:57 UTC (rev 179851)
@@ -649,10 +649,6 @@
CallLinkInfo::CallType callType = isCall ? CallLinkInfo::Call : CallLinkInfo::Construct;
Edge calleeEdge = m_jit.graph().m_varArgChildren[node->firstChild()];
- JSValueOperand callee(this, calleeEdge);
- GPRReg calleeTagGPR = callee.tagGPR();
- GPRReg calleePayloadGPR = callee.payloadGPR();
- use(calleeEdge);
// The call instruction's first child is either the function (normal call) or the
// receiver (method call). subsequent children are the arguments.
@@ -661,8 +657,6 @@
int numArgs = numPassedArgs + dummyThisArgument;
m_jit.store32(MacroAssembler::TrustedImm32(numArgs), calleeFramePayloadSlot(JSStack::ArgumentCount));
- m_jit.store32(calleePayloadGPR, calleeFramePayloadSlot(JSStack::Callee));
- m_jit.store32(calleeTagGPR, calleeFrameTagSlot(JSStack::Callee));
for (int i = 0; i < numPassedArgs; i++) {
Edge argEdge = m_jit.graph().m_varArgChildren[node->firstChild() + 1 + i];
@@ -675,6 +669,13 @@
m_jit.store32(argPayloadGPR, calleeArgumentPayloadSlot(i + dummyThisArgument));
}
+ JSValueOperand callee(this, calleeEdge);
+ GPRReg calleeTagGPR = callee.tagGPR();
+ GPRReg calleePayloadGPR = callee.payloadGPR();
+ use(calleeEdge);
+ m_jit.store32(calleePayloadGPR, calleeFramePayloadSlot(JSStack::Callee));
+ m_jit.store32(calleeTagGPR, calleeFrameTagSlot(JSStack::Callee));
+
flushRegisters();
GPRFlushedCallResult resultPayload(this);
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (179850 => 179851)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2015-02-09 23:39:41 UTC (rev 179850)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2015-02-09 23:39:57 UTC (rev 179851)
@@ -635,10 +635,6 @@
CallLinkInfo::CallType callType = isCall ? CallLinkInfo::Call : CallLinkInfo::Construct;
Edge calleeEdge = m_jit.graph().m_varArgChildren[node->firstChild()];
- JSValueOperand callee(this, calleeEdge);
- GPRReg calleeGPR = callee.gpr();
- use(calleeEdge);
-
// The call instruction's first child is the function; the subsequent children are the
// arguments.
int numPassedArgs = node->numChildren() - 1;
@@ -646,7 +642,6 @@
int numArgs = numPassedArgs + dummyThisArgument;
m_jit.store32(MacroAssembler::TrustedImm32(numArgs), calleeFramePayloadSlot(JSStack::ArgumentCount));
- m_jit.store64(calleeGPR, calleeFrameSlot(JSStack::Callee));
for (int i = 0; i < numPassedArgs; i++) {
Edge argEdge = m_jit.graph().m_varArgChildren[node->firstChild() + 1 + i];
@@ -657,6 +652,11 @@
m_jit.store64(argGPR, calleeArgumentSlot(i + dummyThisArgument));
}
+ JSValueOperand callee(this, calleeEdge);
+ GPRReg calleeGPR = callee.gpr();
+ use(calleeEdge);
+ m_jit.store64(calleeGPR, calleeFrameSlot(JSStack::Callee));
+
flushRegisters();
GPRFlushedCallResult result(this);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes