PutGlobalVar should reference the global object it's storing into
https://bugs.webkit.org/show_bug.cgi?id=145036
Reviewed by Michael Saboff.
This makes it easier to reason about store barrier insertion and elimination. This changes
the format of PutGlobalVar so that child1 is the global object and child2 is the value.
Previously it just had child1, and that was the value.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compilePutGlobalVar):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@184367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
index a3e0a02..8f86887 100644
--- a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
@@ -1122,11 +1122,9 @@
break;
case PutGlobalVar: {
- Node* globalObjectNode = m_insertionSet.insertNode(
- m_indexInBlock, SpecNone, JSConstant, node->origin,
- OpInfo(m_graph.freeze(m_graph.globalObjectFor(node->origin.semantic))));
+ fixEdge<CellUse>(node->child1());
insertStoreBarrier(
- m_indexInBlock, Edge(globalObjectNode, KnownCellUse), node->child1());
+ m_indexInBlock, node->child1(), node->child2());
break;
}