| Index: src/hydrogen.cc
|
| ===================================================================
|
| --- src/hydrogen.cc (revision 8774)
|
| +++ src/hydrogen.cc (working copy)
|
| @@ -836,6 +836,19 @@
|
| }
|
|
|
|
|
| +bool HGraph::CheckPhis() {
|
| + int block_count = blocks_.length();
|
| + for (int i = 0; i < block_count; ++i) {
|
| + for (int j = 0; j < blocks_[i]->phis()->length(); ++j) {
|
| + HPhi* phi = blocks_[i]->phis()->at(j);
|
| + // We don't support phi uses of arguments for now.
|
| + if (phi->CheckFlag(HValue::kIsArguments)) return false;
|
| + }
|
| + }
|
| + return true;
|
| +}
|
| +
|
| +
|
| bool HGraph::CollectPhis() {
|
| int block_count = blocks_.length();
|
| phi_list_ = new ZoneList<HPhi*>(block_count);
|
| @@ -843,8 +856,6 @@
|
| for (int j = 0; j < blocks_[i]->phis()->length(); ++j) {
|
| HPhi* phi = blocks_[i]->phis()->at(j);
|
| phi_list_->Add(phi);
|
| - // We don't support phi uses of arguments for now.
|
| - if (phi->CheckFlag(HValue::kIsArguments)) return false;
|
| // Check for the hole value (from an uninitialized const).
|
| for (int k = 0; k < phi->OperandCount(); k++) {
|
| if (phi->OperandAt(k) == GetConstantHole()) return false;
|
| @@ -2293,10 +2304,14 @@
|
|
|
| graph()->OrderBlocks();
|
| graph()->AssignDominators();
|
| + if (!graph()->CheckPhis()) {
|
| + Bailout("Unsupported phi use of arguments object");
|
| + return NULL;
|
| + }
|
| graph()->EliminateRedundantPhis();
|
| if (FLAG_eliminate_dead_phis) graph()->EliminateUnreachablePhis();
|
| if (!graph()->CollectPhis()) {
|
| - Bailout("Unsupported phi-use");
|
| + Bailout("Unsupported phi use of uninitialized constant");
|
| return NULL;
|
| }
|
|
|
|
|