| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/code_index_table.h" | 7 #include "vm/code_index_table.h" |
| 8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart_api_impl.h" | 10 #include "vm/dart_api_impl.h" |
| 11 #include "vm/dart_entry.h" | 11 #include "vm/dart_entry.h" |
| 12 #include "vm/exceptions.h" | 12 #include "vm/exceptions.h" |
| 13 #include "vm/ic_data.h" | 13 #include "vm/ic_data.h" |
| 14 #include "vm/object_store.h" | 14 #include "vm/object_store.h" |
| 15 #include "vm/resolver.h" | 15 #include "vm/resolver.h" |
| 16 #include "vm/runtime_entry.h" | 16 #include "vm/runtime_entry.h" |
| 17 #include "vm/stack_frame.h" | 17 #include "vm/stack_frame.h" |
| 18 #include "vm/verifier.h" | 18 #include "vm/verifier.h" |
| 19 | 19 |
| 20 namespace dart { | 20 namespace dart { |
| 21 | 21 |
| 22 DEFINE_FLAG(bool, inline_cache, true, "enable inline caches"); | 22 DEFINE_FLAG(bool, inline_cache, true, "enable inline caches"); |
| 23 DEFINE_FLAG(bool, trace_deopt, false, "Trace deoptimization"); | 23 DEFINE_FLAG(bool, trace_deopt, false, "Trace deoptimization"); |
| 24 DEFINE_FLAG(bool, trace_ic, false, "trace IC handling"); | 24 DEFINE_FLAG(bool, trace_ic, false, "trace IC handling"); |
| 25 DEFINE_FLAG(bool, trace_patching, false, "Trace patching of code."); | 25 DEFINE_FLAG(bool, trace_patching, false, "Trace patching of code."); |
| 26 DEFINE_FLAG(bool, trace_runtime_calls, false, "Trace runtime calls."); | 26 DEFINE_FLAG(bool, trace_runtime_calls, false, "Trace runtime calls."); |
| 27 DECLARE_FLAG(bool, deoptimization_counter_threshold); | 27 DECLARE_FLAG(int, deoptimization_counter_threshold); |
| 28 | 28 |
| 29 | 29 |
| 30 const Array& CodeGenerator::ArgumentsDescriptor( | 30 const Array& CodeGenerator::ArgumentsDescriptor( |
| 31 int num_arguments, | 31 int num_arguments, |
| 32 const Array& optional_arguments_names) { | 32 const Array& optional_arguments_names) { |
| 33 const intptr_t num_named_args = | 33 const intptr_t num_named_args = |
| 34 optional_arguments_names.IsNull() ? 0 : optional_arguments_names.Length(); | 34 optional_arguments_names.IsNull() ? 0 : optional_arguments_names.Length(); |
| 35 const intptr_t num_pos_args = num_arguments - num_named_args; | 35 const intptr_t num_pos_args = num_arguments - num_named_args; |
| 36 | 36 |
| 37 // Build the argument descriptor array, which consists of the total number of | 37 // Build the argument descriptor array, which consists of the total number of |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 } | 955 } |
| 956 } | 956 } |
| 957 } | 957 } |
| 958 // The cache is null terminated, therefore the loop above should never | 958 // The cache is null terminated, therefore the loop above should never |
| 959 // terminate by itself. | 959 // terminate by itself. |
| 960 UNREACHABLE(); | 960 UNREACHABLE(); |
| 961 return Code::null(); | 961 return Code::null(); |
| 962 } | 962 } |
| 963 | 963 |
| 964 } // namespace dart | 964 } // namespace dart |
| OLD | NEW |