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

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

Issue 2572723003: VM: Clear consts_to_retain_ when resetting 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 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after
2610 void Precompiler::ResetPrecompilerState() { 2610 void Precompiler::ResetPrecompilerState() {
2611 changed_ = false; 2611 changed_ = false;
2612 function_count_ = 0; 2612 function_count_ = 0;
2613 class_count_ = 0; 2613 class_count_ = 0;
2614 selector_count_ = 0; 2614 selector_count_ = 0;
2615 dropped_function_count_ = 0; 2615 dropped_function_count_ = 0;
2616 dropped_field_count_ = 0; 2616 dropped_field_count_ = 0;
2617 ASSERT(pending_functions_.Length() == 0); 2617 ASSERT(pending_functions_.Length() == 0);
2618 sent_selectors_.Clear(); 2618 sent_selectors_.Clear();
2619 enqueued_functions_.Clear(); 2619 enqueued_functions_.Clear();
2620 consts_to_retain_.Clear();
2620 2621
2621 Library& lib = Library::Handle(Z); 2622 Library& lib = Library::Handle(Z);
2622 Class& cls = Class::Handle(Z); 2623 Class& cls = Class::Handle(Z);
2623 2624
2624 for (intptr_t i = 0; i < libraries_.Length(); i++) { 2625 for (intptr_t i = 0; i < libraries_.Length(); i++) {
2625 lib ^= libraries_.At(i); 2626 lib ^= libraries_.At(i);
2626 ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate); 2627 ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate);
2627 while (it.HasNext()) { 2628 while (it.HasNext()) {
2628 cls = it.GetNextClass(); 2629 cls = it.GetNextClass();
2629 if (cls.IsDynamicClass()) { 2630 if (cls.IsDynamicClass()) {
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
3298 3299
3299 ASSERT(FLAG_precompiled_mode); 3300 ASSERT(FLAG_precompiled_mode);
3300 const bool optimized = function.IsOptimizable(); // False for natives. 3301 const bool optimized = function.IsOptimizable(); // False for natives.
3301 DartPrecompilationPipeline pipeline(zone, field_type_map); 3302 DartPrecompilationPipeline pipeline(zone, field_type_map);
3302 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); 3303 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
3303 } 3304 }
3304 3305
3305 #endif // DART_PRECOMPILER 3306 #endif // DART_PRECOMPILER
3306 3307
3307 } // namespace dart 3308 } // 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