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

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

Issue 1723733002: Simplify various name flavors in VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 4 years, 10 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
« no previous file with comments | « runtime/vm/deopt_instructions.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 String::Handle(dst_type.Name()).ToCString(), 164 String::Handle(dst_type.Name()).ToCString(),
165 dst_name.ToCString()); 165 dst_name.ToCString());
166 } 166 }
167 167
168 168
169 void CompileType::PrintTo(BufferFormatter* f) const { 169 void CompileType::PrintTo(BufferFormatter* f) const {
170 const char* type_name = "?"; 170 const char* type_name = "?";
171 if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) { 171 if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) {
172 const Class& cls = 172 const Class& cls =
173 Class::Handle(Isolate::Current()->class_table()->At(cid_)); 173 Class::Handle(Isolate::Current()->class_table()->At(cid_));
174 type_name = String::Handle(cls.PrettyName()).ToCString(); 174 type_name = String::Handle(cls.ScrubbedName()).ToCString();
175 } else if (type_ != NULL && 175 } else if (type_ != NULL &&
176 !type_->Equals(Type::Handle(Type::DynamicType()))) { 176 !type_->Equals(Type::Handle(Type::DynamicType()))) {
177 type_name = type_->ToCString(); 177 type_name = type_->ToCString();
178 } else if (!is_nullable()) { 178 } else if (!is_nullable()) {
179 type_name = "!null"; 179 type_name = "!null";
180 } 180 }
181 181
182 f->Print("T{%s%s}", type_name, is_nullable_ ? "?" : ""); 182 f->Print("T{%s%s}", type_name, is_nullable_ ? "?" : "");
183 } 183 }
184 184
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 561
562 void RelationalOpInstr::PrintOperandsTo(BufferFormatter* f) const { 562 void RelationalOpInstr::PrintOperandsTo(BufferFormatter* f) const {
563 f->Print("%s, ", Token::Str(kind())); 563 f->Print("%s, ", Token::Str(kind()));
564 left()->PrintTo(f); 564 left()->PrintTo(f);
565 f->Print(", "); 565 f->Print(", ");
566 right()->PrintTo(f); 566 right()->PrintTo(f);
567 } 567 }
568 568
569 569
570 void AllocateObjectInstr::PrintOperandsTo(BufferFormatter* f) const { 570 void AllocateObjectInstr::PrintOperandsTo(BufferFormatter* f) const {
571 f->Print("%s", String::Handle(cls().PrettyName()).ToCString()); 571 f->Print("%s", String::Handle(cls().ScrubbedName()).ToCString());
572 for (intptr_t i = 0; i < ArgumentCount(); i++) { 572 for (intptr_t i = 0; i < ArgumentCount(); i++) {
573 f->Print(", "); 573 f->Print(", ");
574 PushArgumentAt(i)->value()->PrintTo(f); 574 PushArgumentAt(i)->value()->PrintTo(f);
575 } 575 }
576 576
577 if (Identity().IsNotAliased()) { 577 if (Identity().IsNotAliased()) {
578 f->Print(" <not-aliased>"); 578 f->Print(" <not-aliased>");
579 } 579 }
580 } 580 }
581 581
582 582
583 void MaterializeObjectInstr::PrintOperandsTo(BufferFormatter* f) const { 583 void MaterializeObjectInstr::PrintOperandsTo(BufferFormatter* f) const {
584 f->Print("%s", String::Handle(cls_.PrettyName()).ToCString()); 584 f->Print("%s", String::Handle(cls_.ScrubbedName()).ToCString());
585 for (intptr_t i = 0; i < InputCount(); i++) { 585 for (intptr_t i = 0; i < InputCount(); i++) {
586 f->Print(", "); 586 f->Print(", ");
587 f->Print("%s: ", slots_[i]->ToCString()); 587 f->Print("%s: ", slots_[i]->ToCString());
588 InputAt(i)->PrintTo(f); 588 InputAt(i)->PrintTo(f);
589 } 589 }
590 } 590 }
591 591
592 592
593 void LoadFieldInstr::PrintOperandsTo(BufferFormatter* f) const { 593 void LoadFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
594 instance()->PrintTo(f); 594 instance()->PrintTo(f);
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 f->Print("%s, ", Token::Str(op_kind())); 922 f->Print("%s, ", Token::Str(op_kind()));
923 value()->PrintTo(f); 923 value()->PrintTo(f);
924 } 924 }
925 925
926 926
927 void CheckClassIdInstr::PrintOperandsTo(BufferFormatter* f) const { 927 void CheckClassIdInstr::PrintOperandsTo(BufferFormatter* f) const {
928 value()->PrintTo(f); 928 value()->PrintTo(f);
929 929
930 const Class& cls = 930 const Class& cls =
931 Class::Handle(Isolate::Current()->class_table()->At(cid())); 931 Class::Handle(Isolate::Current()->class_table()->At(cid()));
932 f->Print(", %s", String::Handle(cls.PrettyName()).ToCString()); 932 f->Print(", %s", String::Handle(cls.ScrubbedName()).ToCString());
933 } 933 }
934 934
935 935
936 void CheckClassInstr::PrintOperandsTo(BufferFormatter* f) const { 936 void CheckClassInstr::PrintOperandsTo(BufferFormatter* f) const {
937 value()->PrintTo(f); 937 value()->PrintTo(f);
938 PrintICDataHelper(f, unary_checks()); 938 PrintICDataHelper(f, unary_checks());
939 if (IsNullCheck()) { 939 if (IsNullCheck()) {
940 f->Print(" nullcheck"); 940 f->Print(" nullcheck");
941 } 941 }
942 } 942 }
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 } 1256 }
1257 1257
1258 1258
1259 bool FlowGraphPrinter::ShouldPrint(const Function& function) { 1259 bool FlowGraphPrinter::ShouldPrint(const Function& function) {
1260 return false; 1260 return false;
1261 } 1261 }
1262 1262
1263 #endif // !PRODUCT 1263 #endif // !PRODUCT
1264 1264
1265 } // namespace dart 1265 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/deopt_instructions.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698