Commit 6333383c authored by mmassi@chromium.org's avatar mmassi@chromium.org

Remove instructions properly (stack check elimination was leaving "dangling uses" around).

BUG=

Review URL: https://codereview.chromium.org/12224090

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9eec0969
......@@ -790,6 +790,13 @@ void HInstruction::Verify() {
// HValue::DataEquals. The default implementation is UNREACHABLE. We
// don't actually care whether DataEquals returns true or false here.
if (CheckFlag(kUseGVN)) DataEquals(this);
// Verify that all uses are in the graph.
for (HUseIterator use = uses(); !use.Done(); use.Advance()) {
if (use.value()->IsInstruction()) {
ASSERT(HInstruction::cast(use.value())->IsLinked());
}
}
}
#endif
......
......@@ -1546,7 +1546,7 @@ class HStackCheck: public HTemplateInstruction<1> {
// The stack check eliminator might try to eliminate the same stack
// check instruction multiple times.
if (IsLinked()) {
DeleteFromGraph();
DeleteAndReplaceWith(NULL);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment