| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 eliminated ? "more" : "not more", | 161 eliminated ? "more" : "not more", |
| 162 String::Handle(dst_type.Name()).ToCString(), | 162 String::Handle(dst_type.Name()).ToCString(), |
| 163 dst_name.ToCString()); | 163 dst_name.ToCString()); |
| 164 } | 164 } |
| 165 | 165 |
| 166 | 166 |
| 167 void CompileType::PrintTo(BufferFormatter* f) const { | 167 void CompileType::PrintTo(BufferFormatter* f) const { |
| 168 const char* type_name = "?"; | 168 const char* type_name = "?"; |
| 169 if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) { | 169 if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) { |
| 170 const Class& cls = | 170 const Class& cls = |
| 171 Class::Handle(Isolate::Current()->class_table()->At(cid_)); | 171 Class::Handle(Isolate::Current()->class_table()->At(cid_)); |
| 172 type_name = String::Handle(cls.PrettyName()).ToCString(); | 172 type_name = String::Handle(cls.PrettyName()).ToCString(); |
| 173 } else if (type_ != NULL && | 173 } else if (type_ != NULL && |
| 174 !type_->Equals(Type::Handle(Type::DynamicType()))) { | 174 !type_->Equals(Type::Handle(Type::DynamicType()))) { |
| 175 type_name = type_->ToCString(); | 175 type_name = type_->ToCString(); |
| 176 } else if (!is_nullable()) { | 176 } else if (!is_nullable()) { |
| 177 type_name = "!null"; | 177 type_name = "!null"; |
| 178 } | 178 } |
| 179 | 179 |
| 180 f->Print("T{%s%s}", type_name, is_nullable_ ? "?" : ""); | 180 f->Print("T{%s%s}", type_name, is_nullable_ ? "?" : ""); |
| 181 } | 181 } |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 } | 1212 } |
| 1213 | 1213 |
| 1214 const char* Environment::ToCString() const { | 1214 const char* Environment::ToCString() const { |
| 1215 char buffer[1024]; | 1215 char buffer[1024]; |
| 1216 BufferFormatter bf(buffer, 1024); | 1216 BufferFormatter bf(buffer, 1024); |
| 1217 PrintTo(&bf); | 1217 PrintTo(&bf); |
| 1218 return Thread::Current()->zone()->MakeCopyOfString(buffer); | 1218 return Thread::Current()->zone()->MakeCopyOfString(buffer); |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 } // namespace dart | 1221 } // namespace dart |
| OLD | NEW |