| 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/intermediate_language.h" | 7 #include "vm/intermediate_language.h" |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 #include "vm/parser.h" | 9 #include "vm/parser.h" |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 void CompileType::PrintTo(BufferFormatter* f) const { | 105 void CompileType::PrintTo(BufferFormatter* f) const { |
| 106 f->Print("T{"); | 106 f->Print("T{"); |
| 107 f->Print("%s, ", is_nullable_ ? "null" : "not-null"); | 107 f->Print("%s, ", is_nullable_ ? "null" : "not-null"); |
| 108 if (cid_ != kIllegalCid) { | 108 if (cid_ != kIllegalCid) { |
| 109 const Class& cls = | 109 const Class& cls = |
| 110 Class::Handle(Isolate::Current()->class_table()->At(cid_)); | 110 Class::Handle(Isolate::Current()->class_table()->At(cid_)); |
| 111 f->Print("%s, ", String::Handle(cls.Name()).ToCString()); | 111 f->Print("%s, ", String::Handle(cls.Name()).ToCString()); |
| 112 } else { | 112 } else { |
| 113 f->Print("?, "); | 113 f->Print("?, "); |
| 114 } | 114 } |
| 115 f->Print("%s}", (type_ != NULL) ? String::Handle(type_->Name()).ToCString() | 115 f->Print("%s}", (type_ != NULL) ? type_->ToCString() : "?"); |
| 116 : "?"); | |
| 117 } | 116 } |
| 118 | 117 |
| 119 | 118 |
| 120 const char* CompileType::ToCString() const { | 119 const char* CompileType::ToCString() const { |
| 121 char buffer[1024]; | 120 char buffer[1024]; |
| 122 BufferFormatter f(buffer, sizeof(buffer)); | 121 BufferFormatter f(buffer, sizeof(buffer)); |
| 123 PrintTo(&f); | 122 PrintTo(&f); |
| 124 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); | 123 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); |
| 125 } | 124 } |
| 126 | 125 |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 f->Print(" ["); | 704 f->Print(" ["); |
| 706 locations_[i].PrintTo(f); | 705 locations_[i].PrintTo(f); |
| 707 f->Print("]"); | 706 f->Print("]"); |
| 708 } | 707 } |
| 709 } | 708 } |
| 710 f->Print(" }"); | 709 f->Print(" }"); |
| 711 if (outer_ != NULL) outer_->PrintTo(f); | 710 if (outer_ != NULL) outer_->PrintTo(f); |
| 712 } | 711 } |
| 713 | 712 |
| 714 } // namespace dart | 713 } // namespace dart |
| OLD | NEW |