OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/precompiler.h" | 5 #include "vm/precompiler.h" |
6 | 6 |
7 #include "vm/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/branch_optimizer.h" | 10 #include "vm/branch_optimizer.h" |
(...skipping 2941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2952 void Precompiler::ResetPrecompilerState() { | 2952 void Precompiler::ResetPrecompilerState() { |
2953 changed_ = false; | 2953 changed_ = false; |
2954 function_count_ = 0; | 2954 function_count_ = 0; |
2955 class_count_ = 0; | 2955 class_count_ = 0; |
2956 selector_count_ = 0; | 2956 selector_count_ = 0; |
2957 dropped_function_count_ = 0; | 2957 dropped_function_count_ = 0; |
2958 dropped_field_count_ = 0; | 2958 dropped_field_count_ = 0; |
2959 ASSERT(pending_functions_.Length() == 0); | 2959 ASSERT(pending_functions_.Length() == 0); |
2960 sent_selectors_.Clear(); | 2960 sent_selectors_.Clear(); |
2961 enqueued_functions_.Clear(); | 2961 enqueued_functions_.Clear(); |
| 2962 |
| 2963 classes_to_retain_.Clear(); |
2962 consts_to_retain_.Clear(); | 2964 consts_to_retain_.Clear(); |
| 2965 fields_to_retain_.Clear(); |
| 2966 functions_to_retain_.Clear(); |
| 2967 typeargs_to_retain_.Clear(); |
| 2968 types_to_retain_.Clear(); |
2963 | 2969 |
2964 Library& lib = Library::Handle(Z); | 2970 Library& lib = Library::Handle(Z); |
2965 Class& cls = Class::Handle(Z); | 2971 Class& cls = Class::Handle(Z); |
2966 | 2972 |
2967 for (intptr_t i = 0; i < libraries_.Length(); i++) { | 2973 for (intptr_t i = 0; i < libraries_.Length(); i++) { |
2968 lib ^= libraries_.At(i); | 2974 lib ^= libraries_.At(i); |
2969 ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate); | 2975 ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate); |
2970 while (it.HasNext()) { | 2976 while (it.HasNext()) { |
2971 cls = it.GetNextClass(); | 2977 cls = it.GetNextClass(); |
2972 if (cls.IsDynamicClass()) { | 2978 if (cls.IsDynamicClass()) { |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3649 | 3655 |
3650 ASSERT(FLAG_precompiled_mode); | 3656 ASSERT(FLAG_precompiled_mode); |
3651 const bool optimized = function.IsOptimizable(); // False for natives. | 3657 const bool optimized = function.IsOptimizable(); // False for natives. |
3652 DartPrecompilationPipeline pipeline(zone, field_type_map); | 3658 DartPrecompilationPipeline pipeline(zone, field_type_map); |
3653 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); | 3659 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); |
3654 } | 3660 } |
3655 | 3661 |
3656 #endif // DART_PRECOMPILER | 3662 #endif // DART_PRECOMPILER |
3657 | 3663 |
3658 } // namespace dart | 3664 } // namespace dart |
OLD | NEW |