| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| 11 #include "vm/compiler.h" | 11 #include "vm/compiler.h" |
| 12 #include "vm/dart_entry.h" | 12 #include "vm/dart_entry.h" |
| 13 #include "vm/deopt_instructions.h" | 13 #include "vm/deopt_instructions.h" |
| 14 #include "vm/il_printer.h" | 14 #include "vm/il_printer.h" |
| 15 #include "vm/locations.h" | 15 #include "vm/locations.h" |
| 16 #include "vm/object_store.h" | 16 #include "vm/object_store.h" |
| 17 #include "vm/parser.h" | 17 #include "vm/parser.h" |
| 18 #include "vm/stack_frame.h" | 18 #include "vm/stack_frame.h" |
| 19 #include "vm/stub_code.h" | 19 #include "vm/stub_code.h" |
| 20 #include "vm/symbols.h" | 20 #include "vm/symbols.h" |
| 21 | 21 |
| 22 namespace dart { | 22 namespace dart { |
| 23 | 23 |
| 24 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization."); | 24 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization."); |
| 25 DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic."); |
| 25 DECLARE_FLAG(bool, enable_type_checks); | 26 DECLARE_FLAG(bool, enable_type_checks); |
| 26 DECLARE_FLAG(bool, enable_simd_inline); | 27 DECLARE_FLAG(bool, enable_simd_inline); |
| 27 | 28 |
| 28 | 29 |
| 29 FlowGraphCompiler::~FlowGraphCompiler() { | 30 FlowGraphCompiler::~FlowGraphCompiler() { |
| 30 // BlockInfos are zone-allocated, so their destructors are not called. | 31 // BlockInfos are zone-allocated, so their destructors are not called. |
| 31 // Verify the labels explicitly here. | 32 // Verify the labels explicitly here. |
| 32 for (int i = 0; i < block_info_.length(); ++i) { | 33 for (int i = 0; i < block_info_.length(); ++i) { |
| 33 ASSERT(!block_info_[i]->jump_label()->IsLinked()); | 34 ASSERT(!block_info_[i]->jump_label()->IsLinked()); |
| 34 ASSERT(!block_info_[i]->jump_label()->HasNear()); | 35 ASSERT(!block_info_[i]->jump_label()->HasNear()); |
| 35 } | 36 } |
| 36 } | 37 } |
| 37 | 38 |
| 38 | 39 |
| 39 bool FlowGraphCompiler::SupportsUnboxedDoubles() { | 40 bool FlowGraphCompiler::SupportsUnboxedDoubles() { |
| 40 return true; | 41 return true; |
| 41 } | 42 } |
| 42 | 43 |
| 43 | 44 |
| 44 bool FlowGraphCompiler::SupportsUnboxedMints() { | 45 bool FlowGraphCompiler::SupportsUnboxedMints() { |
| 45 return false; | 46 return FLAG_unbox_mints; |
| 46 } | 47 } |
| 47 | 48 |
| 48 | 49 |
| 49 bool FlowGraphCompiler::SupportsUnboxedSimd128() { | 50 bool FlowGraphCompiler::SupportsUnboxedSimd128() { |
| 50 return FLAG_enable_simd_inline; | 51 return FLAG_enable_simd_inline; |
| 51 } | 52 } |
| 52 | 53 |
| 53 | 54 |
| 54 | 55 |
| 55 bool FlowGraphCompiler::SupportsSinCos() { | 56 bool FlowGraphCompiler::SupportsSinCos() { |
| (...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1724 __ movups(reg, Address(RSP, 0)); | 1725 __ movups(reg, Address(RSP, 0)); |
| 1725 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP); | 1726 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP); |
| 1726 } | 1727 } |
| 1727 | 1728 |
| 1728 | 1729 |
| 1729 #undef __ | 1730 #undef __ |
| 1730 | 1731 |
| 1731 } // namespace dart | 1732 } // namespace dart |
| 1732 | 1733 |
| 1733 #endif // defined TARGET_ARCH_X64 | 1734 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |