| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 intptr_t token_pos, | 87 intptr_t token_pos, |
| 88 Value* value, | 88 Value* value, |
| 89 const AbstractType& dst_type, | 89 const AbstractType& dst_type, |
| 90 const String& dst_name, | 90 const String& dst_name, |
| 91 bool eliminated) { | 91 bool eliminated) { |
| 92 const Script& script = Script::Handle(parsed_function.function().script()); | 92 const Script& script = Script::Handle(parsed_function.function().script()); |
| 93 const char* compile_type_name = "unknown"; | 93 const char* compile_type_name = "unknown"; |
| 94 if (value != NULL) { | 94 if (value != NULL) { |
| 95 const AbstractType& type = AbstractType::Handle(value->CompileType()); | 95 const AbstractType& type = AbstractType::Handle(value->CompileType()); |
| 96 if (!type.IsNull()) { | 96 if (!type.IsNull()) { |
| 97 compile_type_name = String::Handle(type.UserVisibleName()).ToCString(); | 97 compile_type_name = String::Handle(type.Name()).ToCString(); |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 Parser::PrintMessage(script, token_pos, "", | 100 Parser::PrintMessage(script, token_pos, "", |
| 101 "%s type check: compile type '%s' is %s specific than " | 101 "%s type check: compile type '%s' is %s specific than " |
| 102 "type '%s' of '%s'.", | 102 "type '%s' of '%s'.", |
| 103 eliminated ? "Eliminated" : "Generated", | 103 eliminated ? "Eliminated" : "Generated", |
| 104 compile_type_name, | 104 compile_type_name, |
| 105 eliminated ? "more" : "not more", | 105 eliminated ? "more" : "not more", |
| 106 String::Handle(dst_type.UserVisibleName()).ToCString(), | 106 String::Handle(dst_type.Name()).ToCString(), |
| 107 dst_name.ToCString()); | 107 dst_name.ToCString()); |
| 108 } | 108 } |
| 109 | 109 |
| 110 | 110 |
| 111 static void PrintICData(BufferFormatter* f, const ICData& ic_data) { | 111 static void PrintICData(BufferFormatter* f, const ICData& ic_data) { |
| 112 f->Print(" IC[%d: ", ic_data.NumberOfChecks()); | 112 f->Print(" IC[%d: ", ic_data.NumberOfChecks()); |
| 113 Function& target = Function::Handle(); | 113 Function& target = Function::Handle(); |
| 114 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) { | 114 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) { |
| 115 GrowableArray<intptr_t> class_ids; | 115 GrowableArray<intptr_t> class_ids; |
| 116 ic_data.GetCheckAt(i, &class_ids, &target); | 116 ic_data.GetCheckAt(i, &class_ids, &target); |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 if ((locations_ != NULL) && !locations_[i].IsInvalid()) { | 808 if ((locations_ != NULL) && !locations_[i].IsInvalid()) { |
| 809 f->Print(" ["); | 809 f->Print(" ["); |
| 810 locations_[i].PrintTo(f); | 810 locations_[i].PrintTo(f); |
| 811 f->Print("]"); | 811 f->Print("]"); |
| 812 } | 812 } |
| 813 } | 813 } |
| 814 f->Print(" }"); | 814 f->Print(" }"); |
| 815 } | 815 } |
| 816 | 816 |
| 817 } // namespace dart | 817 } // namespace dart |
| OLD | NEW |