| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2297 | 2297 |
| 2298 if (current_block() != NULL) { | 2298 if (current_block() != NULL) { |
| 2299 HReturn* instr = new(zone()) HReturn(graph()->GetConstantUndefined()); | 2299 HReturn* instr = new(zone()) HReturn(graph()->GetConstantUndefined()); |
| 2300 current_block()->FinishExit(instr); | 2300 current_block()->FinishExit(instr); |
| 2301 set_current_block(NULL); | 2301 set_current_block(NULL); |
| 2302 } | 2302 } |
| 2303 } | 2303 } |
| 2304 | 2304 |
| 2305 graph()->OrderBlocks(); | 2305 graph()->OrderBlocks(); |
| 2306 graph()->AssignDominators(); | 2306 graph()->AssignDominators(); |
| 2307 graph()->EliminateRedundantPhis(); |
| 2307 if (!graph()->CheckPhis()) { | 2308 if (!graph()->CheckPhis()) { |
| 2308 Bailout("Unsupported phi use of arguments object"); | 2309 Bailout("Unsupported phi use of arguments object"); |
| 2309 return NULL; | 2310 return NULL; |
| 2310 } | 2311 } |
| 2311 graph()->EliminateRedundantPhis(); | |
| 2312 if (FLAG_eliminate_dead_phis) graph()->EliminateUnreachablePhis(); | 2312 if (FLAG_eliminate_dead_phis) graph()->EliminateUnreachablePhis(); |
| 2313 if (!graph()->CollectPhis()) { | 2313 if (!graph()->CollectPhis()) { |
| 2314 Bailout("Unsupported phi use of uninitialized constant"); | 2314 Bailout("Unsupported phi use of uninitialized constant"); |
| 2315 return NULL; | 2315 return NULL; |
| 2316 } | 2316 } |
| 2317 | 2317 |
| 2318 HInferRepresentation rep(graph()); | 2318 HInferRepresentation rep(graph()); |
| 2319 rep.Analyze(); | 2319 rep.Analyze(); |
| 2320 | 2320 |
| 2321 if (FLAG_use_range) { | 2321 if (FLAG_use_range) { |
| (...skipping 4437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6759 } | 6759 } |
| 6760 } | 6760 } |
| 6761 | 6761 |
| 6762 #ifdef DEBUG | 6762 #ifdef DEBUG |
| 6763 if (graph_ != NULL) graph_->Verify(); | 6763 if (graph_ != NULL) graph_->Verify(); |
| 6764 if (allocator_ != NULL) allocator_->Verify(); | 6764 if (allocator_ != NULL) allocator_->Verify(); |
| 6765 #endif | 6765 #endif |
| 6766 } | 6766 } |
| 6767 | 6767 |
| 6768 } } // namespace v8::internal | 6768 } } // namespace v8::internal |
| OLD | NEW |