| 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/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| 11 #include "vm/debugger.h" | 11 #include "vm/debugger.h" |
| 12 #include "vm/deopt_instructions.h" | 12 #include "vm/deopt_instructions.h" |
| 13 #include "vm/flow_graph_allocator.h" | 13 #include "vm/flow_graph_allocator.h" |
| 14 #include "vm/il_printer.h" | 14 #include "vm/il_printer.h" |
| 15 #include "vm/intrinsifier.h" | 15 #include "vm/intrinsifier.h" |
| 16 #include "vm/locations.h" | 16 #include "vm/locations.h" |
| 17 #include "vm/longjump.h" | 17 #include "vm/longjump.h" |
| 18 #include "vm/object_store.h" | 18 #include "vm/object_store.h" |
| 19 #include "vm/parser.h" | 19 #include "vm/parser.h" |
| 20 #include "vm/stack_frame.h" | 20 #include "vm/stack_frame.h" |
| 21 #include "vm/stub_code.h" | 21 #include "vm/stub_code.h" |
| 22 #include "vm/symbols.h" | 22 #include "vm/symbols.h" |
| 23 | 23 |
| 24 namespace dart { | 24 namespace dart { |
| 25 | 25 |
| 26 DECLARE_FLAG(bool, code_comments); | 26 DECLARE_FLAG(bool, code_comments); |
| 27 DECLARE_FLAG(bool, disassemble); |
| 28 DECLARE_FLAG(bool, disassemble_optimized); |
| 27 DECLARE_FLAG(bool, enable_type_checks); | 29 DECLARE_FLAG(bool, enable_type_checks); |
| 28 DECLARE_FLAG(bool, intrinsify); | 30 DECLARE_FLAG(bool, intrinsify); |
| 29 DECLARE_FLAG(bool, propagate_ic_data); | 31 DECLARE_FLAG(bool, propagate_ic_data); |
| 30 DECLARE_FLAG(bool, report_usage_count); | 32 DECLARE_FLAG(bool, report_usage_count); |
| 31 DECLARE_FLAG(int, optimization_counter_threshold); | 33 DECLARE_FLAG(int, optimization_counter_threshold); |
| 32 DECLARE_FLAG(bool, use_cha); | 34 DECLARE_FLAG(bool, use_cha); |
| 33 DECLARE_FLAG(bool, use_osr); | 35 DECLARE_FLAG(bool, use_osr); |
| 34 DEFINE_FLAG(bool, enable_simd_inline, true, | 36 DEFINE_FLAG(bool, enable_simd_inline, true, |
| 35 "Enable inlining of SIMD related method calls."); | 37 "Enable inlining of SIMD related method calls."); |
| 36 | 38 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 set_current_block(entry); | 259 set_current_block(entry); |
| 258 | 260 |
| 259 if (WasCompacted(entry)) { | 261 if (WasCompacted(entry)) { |
| 260 continue; | 262 continue; |
| 261 } | 263 } |
| 262 | 264 |
| 263 entry->EmitNativeCode(this); | 265 entry->EmitNativeCode(this); |
| 264 // Compile all successors until an exit, branch, or a block entry. | 266 // Compile all successors until an exit, branch, or a block entry. |
| 265 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { | 267 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { |
| 266 Instruction* instr = it.Current(); | 268 Instruction* instr = it.Current(); |
| 267 if (FLAG_code_comments) EmitComment(instr); | 269 if (FLAG_code_comments && |
| 270 (FLAG_disassemble || FLAG_disassemble_optimized)) { |
| 271 EmitComment(instr); |
| 272 } |
| 268 if (instr->IsParallelMove()) { | 273 if (instr->IsParallelMove()) { |
| 269 parallel_move_resolver_.EmitNativeCode(instr->AsParallelMove()); | 274 parallel_move_resolver_.EmitNativeCode(instr->AsParallelMove()); |
| 270 } else { | 275 } else { |
| 271 EmitInstructionPrologue(instr); | 276 EmitInstructionPrologue(instr); |
| 272 ASSERT(pending_deoptimization_env_ == NULL); | 277 ASSERT(pending_deoptimization_env_ == NULL); |
| 273 pending_deoptimization_env_ = instr->env(); | 278 pending_deoptimization_env_ = instr->env(); |
| 274 instr->EmitNativeCode(this); | 279 instr->EmitNativeCode(this); |
| 275 pending_deoptimization_env_ = NULL; | 280 pending_deoptimization_env_ = NULL; |
| 276 EmitInstructionEpilogue(instr); | 281 EmitInstructionEpilogue(instr); |
| 277 } | 282 } |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 | 1258 |
| 1254 for (int i = 0; i < len; i++) { | 1259 for (int i = 0; i < len; i++) { |
| 1255 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1260 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
| 1256 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1261 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
| 1257 ic_data.GetCountAt(i))); | 1262 ic_data.GetCountAt(i))); |
| 1258 } | 1263 } |
| 1259 sorted->Sort(HighestCountFirst); | 1264 sorted->Sort(HighestCountFirst); |
| 1260 } | 1265 } |
| 1261 | 1266 |
| 1262 } // namespace dart | 1267 } // namespace dart |
| OLD | NEW |