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 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 right()->PrintTo(f); | 1063 right()->PrintTo(f); |
1064 } | 1064 } |
1065 | 1065 |
1066 | 1066 |
1067 void UnaryDoubleOpInstr::PrintOperandsTo(BufferFormatter* f) const { | 1067 void UnaryDoubleOpInstr::PrintOperandsTo(BufferFormatter* f) const { |
1068 f->Print("%s, ", Token::Str(op_kind())); | 1068 f->Print("%s, ", Token::Str(op_kind())); |
1069 value()->PrintTo(f); | 1069 value()->PrintTo(f); |
1070 } | 1070 } |
1071 | 1071 |
1072 | 1072 |
| 1073 void SmiRangeComparisonInstr::PrintOperandsTo(BufferFormatter* f) const { |
| 1074 // This is currently only used for tests on Cids, so we print the range of |
| 1075 // cids as class names, too. |
| 1076 const Class& from_cls = |
| 1077 Class::Handle(Isolate::Current()->class_table()->At(from_)); |
| 1078 const String& from_name = String::Handle(from_cls.ScrubbedName()); |
| 1079 const Class& to_cls = |
| 1080 Class::Handle(Isolate::Current()->class_table()->At(to_)); |
| 1081 const String& to_name = String::Handle(to_cls.ScrubbedName()); |
| 1082 f->Print(" (/*%s*/ %" Pd " <= ", from_name.ToCString(), from_); |
| 1083 input()->PrintTo(f); |
| 1084 f->Print(" <= %" Pd " /*%s*/) ? %s : %s", to_, to_name.ToCString(), |
| 1085 is_negated_ ? "false" : "true", is_negated_ ? "true" : "false"); |
| 1086 } |
| 1087 |
| 1088 |
1073 void CheckClassIdInstr::PrintOperandsTo(BufferFormatter* f) const { | 1089 void CheckClassIdInstr::PrintOperandsTo(BufferFormatter* f) const { |
1074 value()->PrintTo(f); | 1090 value()->PrintTo(f); |
1075 | 1091 |
1076 const Class& cls = | 1092 const Class& cls = |
1077 Class::Handle(Isolate::Current()->class_table()->At(cids().cid_start)); | 1093 Class::Handle(Isolate::Current()->class_table()->At(cids().cid_start)); |
1078 const String& name = String::Handle(cls.ScrubbedName()); | 1094 const String& name = String::Handle(cls.ScrubbedName()); |
1079 if (cids().IsSingleCid()) { | 1095 if (cids().IsSingleCid()) { |
1080 f->Print(", %s", name.ToCString()); | 1096 f->Print(", %s", name.ToCString()); |
1081 } else { | 1097 } else { |
1082 const Class& cls2 = | 1098 const Class& cls2 = |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1413 } | 1429 } |
1414 | 1430 |
1415 | 1431 |
1416 bool FlowGraphPrinter::ShouldPrint(const Function& function) { | 1432 bool FlowGraphPrinter::ShouldPrint(const Function& function) { |
1417 return false; | 1433 return false; |
1418 } | 1434 } |
1419 | 1435 |
1420 #endif // !PRODUCT | 1436 #endif // !PRODUCT |
1421 | 1437 |
1422 } // namespace dart | 1438 } // namespace dart |
OLD | NEW |