OLD | NEW |
---|---|
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 | 56 |
57 const Array& ic_data_array = | 57 const Array& ic_data_array = |
58 Array::Handle(flow_graph()->zone(), | 58 Array::Handle(flow_graph()->zone(), |
59 flow_graph()->parsed_function().function().ic_data_array()); | 59 flow_graph()->parsed_function().function().ic_data_array()); |
60 if (Compiler::IsBackgroundCompilation() && ic_data_array.IsNull()) { | 60 if (Compiler::IsBackgroundCompilation() && ic_data_array.IsNull()) { |
61 // Deferred loading cleared ic_data_array. | 61 // Deferred loading cleared ic_data_array. |
62 Compiler::AbortBackgroundCompilation( | 62 Compiler::AbortBackgroundCompilation( |
63 Thread::kNoDeoptId, "BlockScheduler: ICData array cleared"); | 63 Thread::kNoDeoptId, "BlockScheduler: ICData array cleared"); |
64 } | 64 } |
65 if (ic_data_array.IsNull()) { | 65 if (ic_data_array.IsNull()) { |
66 ASSERT(Isolate::Current()->HasAttemptedReload()); | 66 NOT_IN_PRODUCT(ASSERT(Isolate::Current()->HasAttemptedReload())); |
rmacnak
2017/07/24 19:10:35
You could also say DEBUG_ASSERT(Isolate::Current()
zra
2017/07/24 20:21:53
Done.
| |
67 return; | 67 return; |
68 } | 68 } |
69 Array& edge_counters = Array::Handle(); | 69 Array& edge_counters = Array::Handle(); |
70 edge_counters ^= ic_data_array.At(0); | 70 edge_counters ^= ic_data_array.At(0); |
71 | 71 |
72 intptr_t entry_count = GetEdgeCount( | 72 intptr_t entry_count = GetEdgeCount( |
73 edge_counters, | 73 edge_counters, |
74 flow_graph()->graph_entry()->normal_entry()->preorder_number()); | 74 flow_graph()->graph_entry()->normal_entry()->preorder_number()); |
75 flow_graph()->graph_entry()->set_entry_count(entry_count); | 75 flow_graph()->graph_entry()->set_entry_count(entry_count); |
76 | 76 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
202 for (intptr_t i = block_count - 1; i >= 0; --i) { | 202 for (intptr_t i = block_count - 1; i >= 0; --i) { |
203 if (chains[i]->first->block == flow_graph()->postorder()[i]) { | 203 if (chains[i]->first->block == flow_graph()->postorder()[i]) { |
204 for (Link* link = chains[i]->first; link != NULL; link = link->next) { | 204 for (Link* link = chains[i]->first; link != NULL; link = link->next) { |
205 flow_graph()->CodegenBlockOrder(true)->Add(link->block); | 205 flow_graph()->CodegenBlockOrder(true)->Add(link->block); |
206 } | 206 } |
207 } | 207 } |
208 } | 208 } |
209 } | 209 } |
210 | 210 |
211 } // namespace dart | 211 } // namespace dart |
OLD | NEW |