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

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

Issue 1965823002: Initial isolate reload support (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/block_scheduler.h" 5 #include "vm/block_scheduler.h"
6 6
7 #include "vm/allocation.h" 7 #include "vm/allocation.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/flow_graph.h" 10 #include "vm/flow_graph.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return; 57 return;
58 } 58 }
59 59
60 const Array& ic_data_array = Array::Handle(flow_graph()->zone(), 60 const Array& ic_data_array = Array::Handle(flow_graph()->zone(),
61 flow_graph()->parsed_function().function().ic_data_array()); 61 flow_graph()->parsed_function().function().ic_data_array());
62 if (Compiler::IsBackgroundCompilation() && ic_data_array.IsNull()) { 62 if (Compiler::IsBackgroundCompilation() && ic_data_array.IsNull()) {
63 // Deferred loading cleared ic_data_array. 63 // Deferred loading cleared ic_data_array.
64 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId, 64 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
65 "BlockScheduler: ICData array cleared"); 65 "BlockScheduler: ICData array cleared");
66 } 66 }
67 ASSERT(!ic_data_array.IsNull()); 67 if (ic_data_array.IsNull()) {
68 ASSERT(Isolate::Current()->HasAttemptedReload());
69 return;
70 }
68 Array& edge_counters = Array::Handle(); 71 Array& edge_counters = Array::Handle();
69 edge_counters ^= ic_data_array.At(0); 72 edge_counters ^= ic_data_array.At(0);
70 73
71 intptr_t entry_count = GetEdgeCount( 74 intptr_t entry_count = GetEdgeCount(
72 edge_counters, 75 edge_counters,
73 flow_graph()->graph_entry()->normal_entry()->preorder_number()); 76 flow_graph()->graph_entry()->normal_entry()->preorder_number());
74 flow_graph()->graph_entry()->set_entry_count(entry_count); 77 flow_graph()->graph_entry()->set_entry_count(entry_count);
75 78
76 for (BlockIterator it = flow_graph()->reverse_postorder_iterator(); 79 for (BlockIterator it = flow_graph()->reverse_postorder_iterator();
77 !it.Done(); 80 !it.Done();
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 for (intptr_t i = block_count - 1; i >= 0; --i) { 212 for (intptr_t i = block_count - 1; i >= 0; --i) {
210 if (chains[i]->first->block == flow_graph()->postorder()[i]) { 213 if (chains[i]->first->block == flow_graph()->postorder()[i]) {
211 for (Link* link = chains[i]->first; link != NULL; link = link->next) { 214 for (Link* link = chains[i]->first; link != NULL; link = link->next) {
212 flow_graph()->CodegenBlockOrder(true)->Add(link->block); 215 flow_graph()->CodegenBlockOrder(true)->Add(link->block);
213 } 216 }
214 } 217 }
215 } 218 }
216 } 219 }
217 220
218 } // namespace dart 221 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698