| Index: src/hydrogen.cc
|
| ===================================================================
|
| --- src/hydrogen.cc (revision 9329)
|
| +++ src/hydrogen.cc (working copy)
|
| @@ -852,7 +852,7 @@
|
| }
|
|
|
|
|
| -bool HGraph::CheckPhis() {
|
| +bool HGraph::CheckArgumentsPhiUses() {
|
| int block_count = blocks_.length();
|
| for (int i = 0; i < block_count; ++i) {
|
| for (int j = 0; j < blocks_[i]->phis()->length(); ++j) {
|
| @@ -865,13 +865,11 @@
|
| }
|
|
|
|
|
| -bool HGraph::CollectPhis() {
|
| +bool HGraph::CheckConstPhiUses() {
|
| int block_count = blocks_.length();
|
| - phi_list_ = new ZoneList<HPhi*>(block_count);
|
| 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);
|
| - phi_list_->Add(phi);
|
| // Check for the hole value (from an uninitialized const).
|
| for (int k = 0; k < phi->OperandCount(); k++) {
|
| if (phi->OperandAt(k) == GetConstantHole()) return false;
|
| @@ -882,6 +880,18 @@
|
| }
|
|
|
|
|
| +void HGraph::CollectPhis() {
|
| + int block_count = blocks_.length();
|
| + phi_list_ = new ZoneList<HPhi*>(block_count);
|
| + 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);
|
| + phi_list_->Add(phi);
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| void HGraph::InferTypes(ZoneList<HValue*>* worklist) {
|
| BitVector in_worklist(GetMaximumValueID());
|
| for (int i = 0; i < worklist->length(); ++i) {
|
| @@ -2329,16 +2339,17 @@
|
| #endif
|
|
|
| graph()->PropagateDeoptimizingMark();
|
| + if (!graph()->CheckConstPhiUses()) {
|
| + Bailout("Unsupported phi use of const variable");
|
| + return NULL;
|
| + }
|
| graph()->EliminateRedundantPhis();
|
| - if (!graph()->CheckPhis()) {
|
| - Bailout("Unsupported phi use of arguments object");
|
| + if (!graph()->CheckArgumentsPhiUses()) {
|
| + Bailout("Unsupported phi use of arguments");
|
| return NULL;
|
| }
|
| if (FLAG_eliminate_dead_phis) graph()->EliminateUnreachablePhis();
|
| - if (!graph()->CollectPhis()) {
|
| - Bailout("Unsupported phi use of uninitialized constant");
|
| - return NULL;
|
| - }
|
| + graph()->CollectPhis();
|
|
|
| HInferRepresentation rep(graph());
|
| rep.Analyze();
|
|
|