Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: runtime/vm/precompiler.cc

Issue 2592083002: VM: Clear all *_to_retain maps when resetting the precompiler state (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698