| 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/code_patcher.h" | 9 #include "vm/code_patcher.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 "Trace IC miss in optimized code"); | 58 "Trace IC miss in optimized code"); |
| 59 DEFINE_FLAG(bool, trace_optimized_ic_calls, false, | 59 DEFINE_FLAG(bool, trace_optimized_ic_calls, false, |
| 60 "Trace IC calls in optimized code."); | 60 "Trace IC calls in optimized code."); |
| 61 DEFINE_FLAG(bool, trace_patching, false, "Trace patching of code."); | 61 DEFINE_FLAG(bool, trace_patching, false, "Trace patching of code."); |
| 62 DEFINE_FLAG(bool, trace_runtime_calls, false, "Trace runtime calls"); | 62 DEFINE_FLAG(bool, trace_runtime_calls, false, "Trace runtime calls"); |
| 63 DEFINE_FLAG(bool, trace_type_checks, false, "Trace runtime type checks."); | 63 DEFINE_FLAG(bool, trace_type_checks, false, "Trace runtime type checks."); |
| 64 | 64 |
| 65 DECLARE_FLAG(int, max_deoptimization_counter_threshold); | 65 DECLARE_FLAG(int, max_deoptimization_counter_threshold); |
| 66 DECLARE_FLAG(bool, enable_inlining_annotations); | 66 DECLARE_FLAG(bool, enable_inlining_annotations); |
| 67 DECLARE_FLAG(bool, trace_compiler); | 67 DECLARE_FLAG(bool, trace_compiler); |
| 68 DECLARE_FLAG(bool, trace_field_guards); | |
| 69 DECLARE_FLAG(bool, trace_optimization); | |
| 70 DECLARE_FLAG(bool, trace_optimizing_compiler); | 68 DECLARE_FLAG(bool, trace_optimizing_compiler); |
| 71 DECLARE_FLAG(int, max_polymorphic_checks); | 69 DECLARE_FLAG(int, max_polymorphic_checks); |
| 72 DECLARE_FLAG(bool, precompilation); | 70 DECLARE_FLAG(bool, precompilation); |
| 73 | 71 |
| 74 DEFINE_FLAG(bool, use_osr, true, "Use on-stack replacement."); | 72 DEFINE_FLAG(bool, use_osr, true, "Use on-stack replacement."); |
| 75 DEFINE_FLAG(bool, trace_osr, false, "Trace attempts at on-stack replacement."); | 73 DEFINE_FLAG(bool, trace_osr, false, "Trace attempts at on-stack replacement."); |
| 76 | 74 |
| 77 DEFINE_FLAG(int, stacktrace_every, 0, | 75 DEFINE_FLAG(int, stacktrace_every, 0, |
| 78 "Compute debugger stacktrace on every N stack overflow checks"); | 76 "Compute debugger stacktrace on every N stack overflow checks"); |
| 79 DEFINE_FLAG(charp, stacktrace_filter, NULL, | 77 DEFINE_FLAG(charp, stacktrace_filter, NULL, |
| 80 "Compute stacktrace in named function on stack overflow checks"); | 78 "Compute stacktrace in named function on stack overflow checks"); |
| 81 DEFINE_FLAG(int, deoptimize_every, 0, | 79 DEFINE_FLAG(int, deoptimize_every, 0, |
| 82 "Deoptimize on every N stack overflow checks"); | 80 "Deoptimize on every N stack overflow checks"); |
| 83 DEFINE_FLAG(charp, deoptimize_filter, NULL, | 81 DEFINE_FLAG(charp, deoptimize_filter, NULL, |
| 84 "Deoptimize in named function on stack overflow checks"); | 82 "Deoptimize in named function on stack overflow checks"); |
| 85 DEFINE_FLAG(bool, lazy_dispatchers, true, "Lazily generate dispatchers"); | |
| 86 | 83 |
| 87 #ifdef DEBUG | 84 #ifdef DEBUG |
| 88 DEFINE_FLAG(charp, gc_at_instance_allocation, NULL, | 85 DEFINE_FLAG(charp, gc_at_instance_allocation, NULL, |
| 89 "Perform a GC before allocation of instances of " | 86 "Perform a GC before allocation of instances of " |
| 90 "the specified class"); | 87 "the specified class"); |
| 91 #endif | 88 #endif |
| 92 | 89 |
| 93 DEFINE_RUNTIME_ENTRY(TraceFunctionEntry, 1) { | 90 DEFINE_RUNTIME_ENTRY(TraceFunctionEntry, 1) { |
| 94 const Function& function = Function::CheckedHandle(arguments.ArgAt(0)); | 91 const Function& function = Function::CheckedHandle(arguments.ArgAt(0)); |
| 95 const String& function_name = String::Handle(function.name()); | 92 const String& function_name = String::Handle(function.name()); |
| (...skipping 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1910 const intptr_t elm_size = old_data.ElementSizeInBytes(); | 1907 const intptr_t elm_size = old_data.ElementSizeInBytes(); |
| 1911 const TypedData& new_data = | 1908 const TypedData& new_data = |
| 1912 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | 1909 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); |
| 1913 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | 1910 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); |
| 1914 typed_data_cell.SetAt(0, new_data); | 1911 typed_data_cell.SetAt(0, new_data); |
| 1915 arguments.SetReturn(new_data); | 1912 arguments.SetReturn(new_data); |
| 1916 } | 1913 } |
| 1917 | 1914 |
| 1918 | 1915 |
| 1919 } // namespace dart | 1916 } // namespace dart |
| OLD | NEW |