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