| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_inliner.h" | 5 #include "vm/flow_graph_inliner.h" |
| 6 | 6 |
| 7 #include "vm/block_scheduler.h" | 7 #include "vm/block_scheduler.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
| (...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 // For all variants except the last, use a branch on the loaded class | 1268 // For all variants except the last, use a branch on the loaded class |
| 1269 // id. | 1269 // id. |
| 1270 const Smi& cid = Smi::ZoneHandle(Smi::New(inlined_variants_[i].cid)); | 1270 const Smi& cid = Smi::ZoneHandle(Smi::New(inlined_variants_[i].cid)); |
| 1271 ConstantInstr* cid_constant = new ConstantInstr(cid); | 1271 ConstantInstr* cid_constant = new ConstantInstr(cid); |
| 1272 cid_constant->set_ssa_temp_index( | 1272 cid_constant->set_ssa_temp_index( |
| 1273 owner_->caller_graph()->alloc_ssa_temp_index()); | 1273 owner_->caller_graph()->alloc_ssa_temp_index()); |
| 1274 StrictCompareInstr* compare = | 1274 StrictCompareInstr* compare = |
| 1275 new StrictCompareInstr(call_->instance_call()->token_pos(), | 1275 new StrictCompareInstr(call_->instance_call()->token_pos(), |
| 1276 Token::kEQ_STRICT, | 1276 Token::kEQ_STRICT, |
| 1277 new Value(load_cid), | 1277 new Value(load_cid), |
| 1278 new Value(cid_constant)); | 1278 new Value(cid_constant), |
| 1279 false); // No number check. |
| 1279 BranchInstr* branch = new BranchInstr(compare); | 1280 BranchInstr* branch = new BranchInstr(compare); |
| 1280 branch->InheritDeoptTarget(call_); | 1281 branch->InheritDeoptTarget(call_); |
| 1281 AppendInstruction(AppendInstruction(cursor, cid_constant), branch); | 1282 AppendInstruction(AppendInstruction(cursor, cid_constant), branch); |
| 1282 current_block->set_last_instruction(branch); | 1283 current_block->set_last_instruction(branch); |
| 1283 cursor = NULL; | 1284 cursor = NULL; |
| 1284 | 1285 |
| 1285 // 2. Handle a match by linking to the inlined body. There are three | 1286 // 2. Handle a match by linking to the inlined body. There are three |
| 1286 // cases (unshared, shared first predecessor, and shared subsequent | 1287 // cases (unshared, shared first predecessor, and shared subsequent |
| 1287 // predecessors). | 1288 // predecessors). |
| 1288 BlockEntryInstr* callee_entry = inlined_entries_[i]; | 1289 BlockEntryInstr* callee_entry = inlined_entries_[i]; |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 OS::Print("After Inlining of %s\n", flow_graph_-> | 1469 OS::Print("After Inlining of %s\n", flow_graph_-> |
| 1469 parsed_function().function().ToFullyQualifiedCString()); | 1470 parsed_function().function().ToFullyQualifiedCString()); |
| 1470 FlowGraphPrinter printer(*flow_graph_); | 1471 FlowGraphPrinter printer(*flow_graph_); |
| 1471 printer.PrintBlocks(); | 1472 printer.PrintBlocks(); |
| 1472 } | 1473 } |
| 1473 } | 1474 } |
| 1474 } | 1475 } |
| 1475 } | 1476 } |
| 1476 | 1477 |
| 1477 } // namespace dart | 1478 } // namespace dart |
| OLD | NEW |