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/code_generator.h" | 5 #include "vm/code_generator.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
9 #include "vm/bigint_operations.h" | 9 #include "vm/bigint_operations.h" |
10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 "Deoptimizes all live frames when we are about to return to Dart code from" | 31 "Deoptimizes all live frames when we are about to return to Dart code from" |
32 " native entries."); | 32 " native entries."); |
33 DEFINE_FLAG(bool, trace_deoptimization, false, "Trace deoptimization"); | 33 DEFINE_FLAG(bool, trace_deoptimization, false, "Trace deoptimization"); |
34 DEFINE_FLAG(bool, trace_deoptimization_verbose, false, | 34 DEFINE_FLAG(bool, trace_deoptimization_verbose, false, |
35 "Trace deoptimization verbose"); | 35 "Trace deoptimization verbose"); |
36 DEFINE_FLAG(bool, trace_ic, false, "Trace IC handling"); | 36 DEFINE_FLAG(bool, trace_ic, false, "Trace IC handling"); |
37 DEFINE_FLAG(bool, trace_ic_miss_in_optimized, false, | 37 DEFINE_FLAG(bool, trace_ic_miss_in_optimized, false, |
38 "Trace IC miss in optimized code"); | 38 "Trace IC miss in optimized code"); |
39 DEFINE_FLAG(bool, trace_patching, false, "Trace patching of code."); | 39 DEFINE_FLAG(bool, trace_patching, false, "Trace patching of code."); |
40 DEFINE_FLAG(bool, trace_runtime_calls, false, "Trace runtime calls"); | 40 DEFINE_FLAG(bool, trace_runtime_calls, false, "Trace runtime calls"); |
| 41 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) |
41 DEFINE_FLAG(int, optimization_counter_threshold, 3000, | 42 DEFINE_FLAG(int, optimization_counter_threshold, 3000, |
42 "Function's usage-counter value before it is optimized, -1 means never"); | 43 "Function's usage-counter value before it is optimized, -1 means never"); |
| 44 #else |
| 45 // TODO(regis): Enable optimization on ARM and MIPS. |
| 46 DEFINE_FLAG(int, optimization_counter_threshold, -1, |
| 47 "Function's usage-counter value before it is optimized, -1 means never"); |
| 48 #endif |
43 DECLARE_FLAG(bool, enable_type_checks); | 49 DECLARE_FLAG(bool, enable_type_checks); |
44 DECLARE_FLAG(bool, trace_type_checks); | 50 DECLARE_FLAG(bool, trace_type_checks); |
45 DECLARE_FLAG(bool, report_usage_count); | 51 DECLARE_FLAG(bool, report_usage_count); |
46 DECLARE_FLAG(int, deoptimization_counter_threshold); | 52 DECLARE_FLAG(int, deoptimization_counter_threshold); |
47 DEFINE_FLAG(charp, optimization_filter, NULL, "Optimize only named function"); | 53 DEFINE_FLAG(charp, optimization_filter, NULL, "Optimize only named function"); |
48 DEFINE_FLAG(bool, trace_failed_optimization_attempts, false, | 54 DEFINE_FLAG(bool, trace_failed_optimization_attempts, false, |
49 "Traces all failed optimization attempts"); | 55 "Traces all failed optimization attempts"); |
50 DEFINE_FLAG(bool, trace_optimized_ic_calls, false, | 56 DEFINE_FLAG(bool, trace_optimized_ic_calls, false, |
51 "Trace IC calls in optimized code."); | 57 "Trace IC calls in optimized code."); |
52 DEFINE_FLAG(int, reoptimization_counter_threshold, 2000, | 58 DEFINE_FLAG(int, reoptimization_counter_threshold, 2000, |
(...skipping 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1711 // Arg1: Value that is being stored. | 1717 // Arg1: Value that is being stored. |
1712 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) { | 1718 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) { |
1713 ASSERT(arguments.ArgCount() == kUpdateFieldCidRuntimeEntry.argument_count()); | 1719 ASSERT(arguments.ArgCount() == kUpdateFieldCidRuntimeEntry.argument_count()); |
1714 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); | 1720 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); |
1715 const Object& value = Object::Handle(arguments.ArgAt(1)); | 1721 const Object& value = Object::Handle(arguments.ArgAt(1)); |
1716 | 1722 |
1717 field.UpdateCid(Class::Handle(value.clazz()).id()); | 1723 field.UpdateCid(Class::Handle(value.clazz()).id()); |
1718 } | 1724 } |
1719 | 1725 |
1720 } // namespace dart | 1726 } // namespace dart |
OLD | NEW |