OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/il_printer.h" | 5 #include "vm/il_printer.h" |
6 | 6 |
7 #include "vm/flow_graph_range_analysis.h" | 7 #include "vm/flow_graph_range_analysis.h" |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 #include "vm/os.h" | 9 #include "vm/os.h" |
10 #include "vm/parser.h" | 10 #include "vm/parser.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 const CidRangeTarget& range = targets[i]; | 209 const CidRangeTarget& range = targets[i]; |
210 const intptr_t count = range.count; | 210 const intptr_t count = range.count; |
211 target ^= range.target->raw(); | 211 target ^= range.target->raw(); |
212 if (i > 0) { | 212 if (i > 0) { |
213 f->Print(" | "); | 213 f->Print(" | "); |
214 } | 214 } |
215 if (range.cid_start == range.cid_end) { | 215 if (range.cid_start == range.cid_end) { |
216 const Class& cls = | 216 const Class& cls = |
217 Class::Handle(Isolate::Current()->class_table()->At(range.cid_start)); | 217 Class::Handle(Isolate::Current()->class_table()->At(range.cid_start)); |
218 f->Print("%s", String::Handle(cls.Name()).ToCString()); | 218 f->Print("%s", String::Handle(cls.Name()).ToCString()); |
219 f->Print(" cnt:%" Pd " trgt:'%s'", count, target.ToQualifiedCString()); | 219 f->Print(" cid %" Pd " cnt:%" Pd " trgt:'%s'", range.cid_start, count, |
| 220 target.ToQualifiedCString()); |
220 } else { | 221 } else { |
221 const Class& cls = Class::Handle(range.target->Owner()); | 222 const Class& cls = Class::Handle(range.target->Owner()); |
222 f->Print("cid %" Pd "-%" Pd " %s", range.cid_start, range.cid_end, | 223 f->Print("cid %" Pd "-%" Pd " %s", range.cid_start, range.cid_end, |
223 String::Handle(cls.Name()).ToCString()); | 224 String::Handle(cls.Name()).ToCString()); |
224 f->Print(" cnt:%" Pd " trgt:'%s'", count, target.ToQualifiedCString()); | 225 f->Print(" cnt:%" Pd " trgt:'%s'", count, target.ToQualifiedCString()); |
225 } | 226 } |
226 } | 227 } |
227 if (num_checks_to_print < targets.length()) { | 228 if (num_checks_to_print < targets.length()) { |
228 f->Print("..."); | 229 f->Print("..."); |
229 } | 230 } |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 value()->PrintTo(f); | 1025 value()->PrintTo(f); |
1025 | 1026 |
1026 const Class& cls = | 1027 const Class& cls = |
1027 Class::Handle(Isolate::Current()->class_table()->At(cid())); | 1028 Class::Handle(Isolate::Current()->class_table()->At(cid())); |
1028 f->Print(", %s", String::Handle(cls.ScrubbedName()).ToCString()); | 1029 f->Print(", %s", String::Handle(cls.ScrubbedName()).ToCString()); |
1029 } | 1030 } |
1030 | 1031 |
1031 | 1032 |
1032 void CheckClassInstr::PrintOperandsTo(BufferFormatter* f) const { | 1033 void CheckClassInstr::PrintOperandsTo(BufferFormatter* f) const { |
1033 value()->PrintTo(f); | 1034 value()->PrintTo(f); |
1034 if (FLAG_display_sorted_ic_data) { | 1035 PrintTargetsHelper(f, targets_, FlowGraphPrinter::kPrintAll); |
1035 PrintICDataSortedHelper(f, unary_checks()); | |
1036 } else { | |
1037 PrintICDataHelper(f, unary_checks(), FlowGraphPrinter::kPrintAll); | |
1038 } | |
1039 if (IsNullCheck()) { | 1036 if (IsNullCheck()) { |
1040 f->Print(" nullcheck"); | 1037 f->Print(" nullcheck"); |
1041 } | 1038 } |
1042 } | 1039 } |
1043 | 1040 |
1044 | 1041 |
1045 void InvokeMathCFunctionInstr::PrintOperandsTo(BufferFormatter* f) const { | 1042 void InvokeMathCFunctionInstr::PrintOperandsTo(BufferFormatter* f) const { |
1046 f->Print("%s, ", MethodRecognizer::KindToCString(recognized_kind_)); | 1043 f->Print("%s, ", MethodRecognizer::KindToCString(recognized_kind_)); |
1047 Definition::PrintOperandsTo(f); | 1044 Definition::PrintOperandsTo(f); |
1048 } | 1045 } |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1358 } | 1355 } |
1359 | 1356 |
1360 | 1357 |
1361 bool FlowGraphPrinter::ShouldPrint(const Function& function) { | 1358 bool FlowGraphPrinter::ShouldPrint(const Function& function) { |
1362 return false; | 1359 return false; |
1363 } | 1360 } |
1364 | 1361 |
1365 #endif // !PRODUCT | 1362 #endif // !PRODUCT |
1366 | 1363 |
1367 } // namespace dart | 1364 } // namespace dart |
OLD | NEW |