| 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/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { | 120 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { |
| 121 Instruction* current = it.Current(); | 121 Instruction* current = it.Current(); |
| 122 if (current->IsBranch()) { | 122 if (current->IsBranch()) { |
| 123 current = current->AsBranch()->comparison(); | 123 current = current->AsBranch()->comparison(); |
| 124 } | 124 } |
| 125 // In optimized code, ICData is always set in the instructions. | 125 // In optimized code, ICData is always set in the instructions. |
| 126 const ICData* ic_data = NULL; | 126 const ICData* ic_data = NULL; |
| 127 if (current->IsInstanceCall()) { | 127 if (current->IsInstanceCall()) { |
| 128 ic_data = current->AsInstanceCall()->ic_data(); | 128 ic_data = current->AsInstanceCall()->ic_data(); |
| 129 ASSERT(ic_data != NULL); | 129 ASSERT(ic_data != NULL); |
| 130 } else if (current->IsEqualityCompare()) { | |
| 131 ic_data = current->AsEqualityCompare()->ic_data(); | |
| 132 ASSERT(ic_data != NULL); | |
| 133 } | 130 } |
| 134 if ((ic_data != NULL) && (ic_data->NumberOfChecks() == 0)) { | 131 if ((ic_data != NULL) && (ic_data->NumberOfChecks() == 0)) { |
| 135 may_reoptimize_ = true; | 132 may_reoptimize_ = true; |
| 136 } | 133 } |
| 137 if (is_leaf && !current->IsCheckStackOverflow()) { | 134 if (is_leaf && !current->IsCheckStackOverflow()) { |
| 138 // Note that we do not care if the code contains instructions that | 135 // Note that we do not care if the code contains instructions that |
| 139 // can deoptimize. | 136 // can deoptimize. |
| 140 LocationSummary* locs = current->locs(); | 137 LocationSummary* locs = current->locs(); |
| 141 if ((locs != NULL) && locs->can_call()) { | 138 if ((locs != NULL) && locs->can_call()) { |
| 142 is_leaf = false; | 139 is_leaf = false; |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 | 1201 |
| 1205 for (int i = 0; i < len; i++) { | 1202 for (int i = 0; i < len; i++) { |
| 1206 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1203 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
| 1207 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1204 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
| 1208 ic_data.GetCountAt(i))); | 1205 ic_data.GetCountAt(i))); |
| 1209 } | 1206 } |
| 1210 sorted->Sort(HighestCountFirst); | 1207 sorted->Sort(HighestCountFirst); |
| 1211 } | 1208 } |
| 1212 | 1209 |
| 1213 } // namespace dart | 1210 } // namespace dart |
| OLD | NEW |