summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
commit2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch)
tree988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp
parentdd91e772430dc294e3bf478c119ef8d43c0a3358 (diff)
downloadqtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp')
-rw-r--r--Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp b/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp
index 255003612..11ac69524 100644
--- a/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp
@@ -64,17 +64,17 @@ public:
#endif
Node& node = m_graph[nodeIndex];
- if (!node.shouldGenerate() || node.op == Phi || node.op == Flush)
+ if (!node.shouldGenerate() || node.op() == Phi || node.op() == Flush)
continue;
// GetLocal nodes are effectively phi nodes in the graph, referencing
// results from prior blocks.
- if (node.op != GetLocal) {
+ if (node.op() != GetLocal) {
// First, call use on all of the current node's children, then
// allocate a VirtualRegister for this node. We do so in this
// order so that if a child is on its last use, and a
// VirtualRegister is freed, then it may be reused for node.
- if (node.flags & NodeHasVarArgs) {
+ if (node.flags() & NodeHasVarArgs) {
for (unsigned childIdx = node.firstChild(); childIdx < node.firstChild() + node.numChildren(); childIdx++)
scoreBoard.use(m_graph.m_varArgChildren[childIdx]);
} else {
@@ -109,6 +109,14 @@ public:
// for the function (and checked for on entry). Since we perform a new and
// different allocation of temporaries, more registers may now be required.
unsigned calleeRegisters = scoreBoard.highWatermark() + m_graph.m_parameterSlots;
+ size_t inlineCallFrameCount = codeBlock()->inlineCallFrames().size();
+ for (size_t i = 0; i < inlineCallFrameCount; i++) {
+ InlineCallFrame& inlineCallFrame = codeBlock()->inlineCallFrames()[i];
+ CodeBlock* codeBlock = baselineCodeBlockForInlineCallFrame(&inlineCallFrame);
+ unsigned requiredCalleeRegisters = inlineCallFrame.stackOffset + codeBlock->m_numCalleeRegisters;
+ if (requiredCalleeRegisters > calleeRegisters)
+ calleeRegisters = requiredCalleeRegisters;
+ }
if ((unsigned)codeBlock()->m_numCalleeRegisters < calleeRegisters)
codeBlock()->m_numCalleeRegisters = calleeRegisters;
#if DFG_ENABLE(DEBUG_VERBOSE)