Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 58554bc16c660a4866a3abecbb3f4f17c37fb0c2..be45d3e82eacbe54ad450e67c1a43e30c190050e 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -870,13 +870,11 @@ void HGraph::EliminateRedundantPhis() { |
} |
uses_to_replace.Rewind(0); |
block->RemovePhi(phi); |
- } else if (phi->HasNoUses() && |
- !phi->HasReceiverOperand() && |
- FLAG_eliminate_dead_phis) { |
- // We can't eliminate phis that have the receiver as an operand |
- // because in case of throwing an error we need the correct |
- // receiver value in the environment to construct a corrent |
- // stack trace. |
+ } else if (FLAG_eliminate_dead_phis && phi->HasNoUses() && |
+ !phi->IsReceiver()) { |
+ // We can't eliminate phis in the receiver position in the environment |
+ // because in case of throwing an error we need this value to |
+ // construct a stack trace. |
block->RemovePhi(phi); |
block->RecordDeletedPhi(phi->merged_index()); |
} |