| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 if (block->IsTargetEntry()) { | 292 if (block->IsTargetEntry()) { |
| 293 block->AsTargetEntry()->adjust_edge_weight(scale_factor); | 293 block->AsTargetEntry()->adjust_edge_weight(scale_factor); |
| 294 } | 294 } |
| 295 Instruction* instr = block; | 295 Instruction* instr = block; |
| 296 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) { | 296 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) { |
| 297 instr = it.Current(); | 297 instr = it.Current(); |
| 298 // TODO(zerny): Avoid creating unnecessary environments. Note that some | 298 // TODO(zerny): Avoid creating unnecessary environments. Note that some |
| 299 // optimizations need deoptimization info for non-deoptable instructions, | 299 // optimizations need deoptimization info for non-deoptable instructions, |
| 300 // eg, LICM on GOTOs. | 300 // eg, LICM on GOTOs. |
| 301 if (instr->env() != NULL) { | 301 if (instr->env() != NULL) { |
| 302 call_->env()->DeepCopyToOuter( | 302 call_->env()->DeepCopyToOuter(callee_graph->isolate(), instr); |
| 303 callee_graph->isolate(), instr, call_->InputCount()); | |
| 304 } | 303 } |
| 305 } | 304 } |
| 306 if (instr->IsGoto()) { | 305 if (instr->IsGoto()) { |
| 307 instr->AsGoto()->adjust_edge_weight(scale_factor); | 306 instr->AsGoto()->adjust_edge_weight(scale_factor); |
| 308 } | 307 } |
| 309 } | 308 } |
| 310 } | 309 } |
| 311 | 310 |
| 312 | 311 |
| 313 void InlineExitCollector::AddExit(ReturnInstr* exit) { | 312 void InlineExitCollector::AddExit(ReturnInstr* exit) { |
| (...skipping 3953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4267 Report::MessageF(Report::kBailout, | 4266 Report::MessageF(Report::kBailout, |
| 4268 Script::Handle(function.script()), | 4267 Script::Handle(function.script()), |
| 4269 function.token_pos(), | 4268 function.token_pos(), |
| 4270 "FlowGraphBuilder Bailout: %s %s", | 4269 "FlowGraphBuilder Bailout: %s %s", |
| 4271 String::Handle(function.name()).ToCString(), | 4270 String::Handle(function.name()).ToCString(), |
| 4272 reason); | 4271 reason); |
| 4273 UNREACHABLE(); | 4272 UNREACHABLE(); |
| 4274 } | 4273 } |
| 4275 | 4274 |
| 4276 } // namespace dart | 4275 } // namespace dart |
| OLD | NEW |