summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-20 14:01:09 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-20 14:01:09 +0200
commit6dbcd09121fe266c7704a524b5cbd7f2754659c0 (patch)
tree5ae0d16cec0cc61f576d51c57b3a4613c7e91e22 /Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
parent6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (diff)
downloadqtwebkit-6dbcd09121fe266c7704a524b5cbd7f2754659c0.tar.gz
Imported WebKit commit 080af0beaa6f0ba8ff8f44cb8bd8b5dcf75ac0af (http://svn.webkit.org/repository/webkit/trunk@129119)
New snapshot with prospective build fix for incorrect QtWebKit master module header file creation
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp')
-rw-r--r--Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp40
1 files changed, 4 insertions, 36 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp b/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
index fe839d54f..ba6673963 100644
--- a/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
@@ -41,12 +41,6 @@ namespace JSC { namespace DFG {
namespace {
-template<typename T>
-struct NullableHashTraits : public HashTraits<T> {
- static const bool emptyValueIsZero = false;
- static T emptyValue() { return reinterpret_cast<T>(1); }
-};
-
struct ArgumentsAliasingData {
InlineCallFrame* callContext;
bool callContextSet;
@@ -181,7 +175,7 @@ public:
VariableAccessData* variableAccessData = node.variableAccessData();
int argumentsRegister =
m_graph.uncheckedArgumentsRegisterFor(node.codeOrigin);
- if (source.op() != CreateArguments) {
+ if (source.op() != CreateArguments && source.op() != PhantomArguments) {
// Make sure that the source of the SetLocal knows that if it's
// a variable that we think is aliased to the arguments, then it
// may escape at this point. In future, we could track transitive
@@ -435,18 +429,9 @@ public:
VariableAccessData* variableAccessData = node.variableAccessData();
if (m_graph.argumentsRegisterFor(node.codeOrigin) == variableAccessData->local()
- || unmodifiedArgumentsRegister(m_graph.argumentsRegisterFor(node.codeOrigin)) == variableAccessData->local()) {
- // The child of this store should really be the empty value.
- Node emptyJSValue(JSConstant, node.codeOrigin, OpInfo(codeBlock()->addOrFindConstant(JSValue())));
- emptyJSValue.ref();
- NodeIndex emptyJSValueIndex = m_graph.size();
- m_graph.deref(node.child1());
- node.children.child1() = Edge(emptyJSValueIndex);
- m_graph.append(emptyJSValue);
- insertionSet.append(indexInBlock, emptyJSValueIndex);
- changed = true;
+ || unmodifiedArgumentsRegister(m_graph.argumentsRegisterFor(node.codeOrigin)) == variableAccessData->local())
break;
- }
+
ASSERT(!variableAccessData->isCaptured());
// If this is a store into a VariableAccessData* that is marked as
@@ -661,25 +646,8 @@ public:
insertionSet.execute(*block);
}
- if (changed) {
+ if (changed)
m_graph.collectGarbage();
-
- // Verify that PhantomArguments nodes are not shouldGenerate().
-#if !ASSERT_DISABLED
- for (BlockIndex blockIndex = 0; blockIndex < m_graph.m_blocks.size(); ++blockIndex) {
- BasicBlock* block = m_graph.m_blocks[blockIndex].get();
- if (!block)
- continue;
- for (unsigned indexInBlock = 0; indexInBlock < block->size(); ++indexInBlock) {
- NodeIndex nodeIndex = block->at(indexInBlock);
- Node& node = m_graph[nodeIndex];
- if (node.op() != PhantomArguments)
- continue;
- ASSERT(!node.shouldGenerate());
- }
- }
-#endif
- }
return changed;
}