| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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 DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic."); |
| 26 DECLARE_FLAG(int, optimization_counter_threshold); | 26 DECLARE_FLAG(int, optimization_counter_threshold); |
| 27 DECLARE_FLAG(bool, print_ast); | 27 DECLARE_FLAG(bool, print_ast); |
| 28 DECLARE_FLAG(bool, print_scopes); | 28 DECLARE_FLAG(bool, print_scopes); |
| 29 DECLARE_FLAG(bool, enable_type_checks); | 29 DECLARE_FLAG(bool, enable_type_checks); |
| 30 DECLARE_FLAG(bool, eliminate_type_checks); | 30 DECLARE_FLAG(bool, eliminate_type_checks); |
| 31 DECLARE_FLAG(bool, throw_on_javascript_int_overflow); |
| 31 | 32 |
| 32 | 33 |
| 33 FlowGraphCompiler::~FlowGraphCompiler() { | 34 FlowGraphCompiler::~FlowGraphCompiler() { |
| 34 // BlockInfos are zone-allocated, so their destructors are not called. | 35 // BlockInfos are zone-allocated, so their destructors are not called. |
| 35 // Verify the labels explicitly here. | 36 // Verify the labels explicitly here. |
| 36 for (int i = 0; i < block_info_.length(); ++i) { | 37 for (int i = 0; i < block_info_.length(); ++i) { |
| 37 ASSERT(!block_info_[i]->jump_label()->IsLinked()); | 38 ASSERT(!block_info_[i]->jump_label()->IsLinked()); |
| 38 ASSERT(!block_info_[i]->jump_label()->HasNear()); | 39 ASSERT(!block_info_[i]->jump_label()->HasNear()); |
| 39 } | 40 } |
| 40 } | 41 } |
| 41 | 42 |
| 42 | 43 |
| 43 bool FlowGraphCompiler::SupportsUnboxedMints() { | 44 bool FlowGraphCompiler::SupportsUnboxedMints() { |
| 44 // Support unboxed mints when SSE 4.1 is available. | 45 // Support unboxed mints when SSE 4.1 is available. |
| 45 return FLAG_unbox_mints && CPUFeatures::sse4_1_supported(); | 46 return FLAG_unbox_mints && CPUFeatures::sse4_1_supported() && |
| 47 !FLAG_throw_on_javascript_int_overflow; |
| 46 } | 48 } |
| 47 | 49 |
| 48 | 50 |
| 49 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler, | 51 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler, |
| 50 DeoptInfoBuilder* builder) { | 52 DeoptInfoBuilder* builder) { |
| 51 if (deopt_env_ == NULL) return DeoptInfo::null(); | 53 if (deopt_env_ == NULL) return DeoptInfo::null(); |
| 52 | 54 |
| 53 intptr_t stack_height = compiler->StackSize(); | 55 intptr_t stack_height = compiler->StackSize(); |
| 54 AllocateIncomingParametersRecursive(deopt_env_, &stack_height); | 56 AllocateIncomingParametersRecursive(deopt_env_, &stack_height); |
| 55 | 57 |
| (...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1912 __ movups(reg, Address(ESP, 0)); | 1914 __ movups(reg, Address(ESP, 0)); |
| 1913 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1915 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1914 } | 1916 } |
| 1915 | 1917 |
| 1916 | 1918 |
| 1917 #undef __ | 1919 #undef __ |
| 1918 | 1920 |
| 1919 } // namespace dart | 1921 } // namespace dart |
| 1920 | 1922 |
| 1921 #endif // defined TARGET_ARCH_IA32 | 1923 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |