Mathieu Chartier | 5bdab12 | 2015-01-26 18:30:19 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include "compiler_options.h" |
| 18 | |
| 19 | #include "dex/pass_manager.h" |
| 20 | |
| 21 | namespace art { |
| 22 | |
| 23 | CompilerOptions::CompilerOptions() |
| 24 | : compiler_filter_(kDefaultCompilerFilter), |
| 25 | huge_method_threshold_(kDefaultHugeMethodThreshold), |
| 26 | large_method_threshold_(kDefaultLargeMethodThreshold), |
| 27 | small_method_threshold_(kDefaultSmallMethodThreshold), |
| 28 | tiny_method_threshold_(kDefaultTinyMethodThreshold), |
| 29 | num_dex_methods_threshold_(kDefaultNumDexMethodsThreshold), |
| 30 | generate_gdb_information_(false), |
| 31 | include_patch_information_(kDefaultIncludePatchInformation), |
| 32 | top_k_profile_threshold_(kDefaultTopKProfileThreshold), |
Andreas Gampe | 7b2f09e | 2015-03-02 14:07:33 -0800 | [diff] [blame] | 33 | debuggable_(false), |
Mathieu Chartier | 5bdab12 | 2015-01-26 18:30:19 -0800 | [diff] [blame] | 34 | include_debug_symbols_(kDefaultIncludeDebugSymbols), |
| 35 | implicit_null_checks_(true), |
| 36 | implicit_so_checks_(true), |
| 37 | implicit_suspend_checks_(false), |
| 38 | compile_pic_(false), |
| 39 | verbose_methods_(nullptr), |
| 40 | pass_manager_options_(new PassManagerOptions), |
| 41 | init_failure_output_(nullptr) { |
| 42 | } |
| 43 | |
| 44 | CompilerOptions::CompilerOptions(CompilerFilter compiler_filter, |
| 45 | size_t huge_method_threshold, |
| 46 | size_t large_method_threshold, |
| 47 | size_t small_method_threshold, |
| 48 | size_t tiny_method_threshold, |
| 49 | size_t num_dex_methods_threshold, |
| 50 | bool generate_gdb_information, |
| 51 | bool include_patch_information, |
| 52 | double top_k_profile_threshold, |
Andreas Gampe | 7b2f09e | 2015-03-02 14:07:33 -0800 | [diff] [blame] | 53 | bool debuggable, |
Mathieu Chartier | 5bdab12 | 2015-01-26 18:30:19 -0800 | [diff] [blame] | 54 | bool include_debug_symbols, |
| 55 | bool implicit_null_checks, |
| 56 | bool implicit_so_checks, |
| 57 | bool implicit_suspend_checks, |
| 58 | bool compile_pic, |
| 59 | const std::vector<std::string>* verbose_methods, |
| 60 | PassManagerOptions* pass_manager_options, |
| 61 | std::ostream* init_failure_output |
| 62 | ) : // NOLINT(whitespace/parens) |
| 63 | compiler_filter_(compiler_filter), |
| 64 | huge_method_threshold_(huge_method_threshold), |
| 65 | large_method_threshold_(large_method_threshold), |
| 66 | small_method_threshold_(small_method_threshold), |
| 67 | tiny_method_threshold_(tiny_method_threshold), |
| 68 | num_dex_methods_threshold_(num_dex_methods_threshold), |
| 69 | generate_gdb_information_(generate_gdb_information), |
| 70 | include_patch_information_(include_patch_information), |
| 71 | top_k_profile_threshold_(top_k_profile_threshold), |
Andreas Gampe | 7b2f09e | 2015-03-02 14:07:33 -0800 | [diff] [blame] | 72 | debuggable_(debuggable), |
Mathieu Chartier | 5bdab12 | 2015-01-26 18:30:19 -0800 | [diff] [blame] | 73 | include_debug_symbols_(include_debug_symbols), |
| 74 | implicit_null_checks_(implicit_null_checks), |
| 75 | implicit_so_checks_(implicit_so_checks), |
| 76 | implicit_suspend_checks_(implicit_suspend_checks), |
| 77 | compile_pic_(compile_pic), |
| 78 | verbose_methods_(verbose_methods), |
| 79 | pass_manager_options_(pass_manager_options), |
| 80 | init_failure_output_(init_failure_output) { |
| 81 | } |
| 82 | |
| 83 | } // namespace art |