| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 4255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4266 PruneUnreachable(); | 4266 PruneUnreachable(); |
| 4267 } | 4267 } |
| 4268 | 4268 |
| 4269 FlowGraph* graph = new(I) FlowGraph(*this, graph_entry_, last_used_block_id_); | 4269 FlowGraph* graph = new(I) FlowGraph(*this, graph_entry_, last_used_block_id_); |
| 4270 return graph; | 4270 return graph; |
| 4271 } | 4271 } |
| 4272 | 4272 |
| 4273 | 4273 |
| 4274 void FlowGraphBuilder::PruneUnreachable() { | 4274 void FlowGraphBuilder::PruneUnreachable() { |
| 4275 ASSERT(osr_id_ != Isolate::kNoDeoptId); | 4275 ASSERT(osr_id_ != Isolate::kNoDeoptId); |
| 4276 BitVector* block_marks = new(I) BitVector(last_used_block_id_ + 1); | 4276 BitVector* block_marks = new(I) BitVector(I, last_used_block_id_ + 1); |
| 4277 bool found = graph_entry_->PruneUnreachable(this, graph_entry_, NULL, osr_id_, | 4277 bool found = graph_entry_->PruneUnreachable(this, graph_entry_, NULL, osr_id_, |
| 4278 block_marks); | 4278 block_marks); |
| 4279 ASSERT(found); | 4279 ASSERT(found); |
| 4280 } | 4280 } |
| 4281 | 4281 |
| 4282 | 4282 |
| 4283 void FlowGraphBuilder::Bailout(const char* reason) const { | 4283 void FlowGraphBuilder::Bailout(const char* reason) const { |
| 4284 const Function& function = parsed_function_->function(); | 4284 const Function& function = parsed_function_->function(); |
| 4285 Report::MessageF(Report::kBailout, | 4285 Report::MessageF(Report::kBailout, |
| 4286 Script::Handle(function.script()), | 4286 Script::Handle(function.script()), |
| 4287 function.token_pos(), | 4287 function.token_pos(), |
| 4288 "FlowGraphBuilder Bailout: %s %s", | 4288 "FlowGraphBuilder Bailout: %s %s", |
| 4289 String::Handle(function.name()).ToCString(), | 4289 String::Handle(function.name()).ToCString(), |
| 4290 reason); | 4290 reason); |
| 4291 UNREACHABLE(); | 4291 UNREACHABLE(); |
| 4292 } | 4292 } |
| 4293 | 4293 |
| 4294 } // namespace dart | 4294 } // namespace dart |
| OLD | NEW |