| 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 String::Handle(dst_type.Name()).ToCString(), | 105 String::Handle(dst_type.Name()).ToCString(), |
| 106 dst_name.ToCString()); | 106 dst_name.ToCString()); |
| 107 } | 107 } |
| 108 | 108 |
| 109 | 109 |
| 110 static void PrintICData(BufferFormatter* f, const ICData& ic_data) { | 110 static void PrintICData(BufferFormatter* f, const ICData& ic_data) { |
| 111 f->Print(" IC[%"Pd": ", ic_data.NumberOfChecks()); | 111 f->Print(" IC[%"Pd": ", ic_data.NumberOfChecks()); |
| 112 Function& target = Function::Handle(); | 112 Function& target = Function::Handle(); |
| 113 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) { | 113 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) { |
| 114 GrowableArray<intptr_t> class_ids; | 114 GrowableArray<intptr_t> class_ids; |
| 115 ic_data.GetCheckAt(i, &class_ids, &target); | 115 intptr_t count = 0; |
| 116 ic_data.GetCheckAt(i, &class_ids, &target, &count); |
| 116 if (i > 0) { | 117 if (i > 0) { |
| 117 f->Print(" | "); | 118 f->Print(" | "); |
| 118 } | 119 } |
| 119 for (intptr_t k = 0; k < class_ids.length(); k++) { | 120 for (intptr_t k = 0; k < class_ids.length(); k++) { |
| 120 if (k > 0) { | 121 if (k > 0) { |
| 121 f->Print(", "); | 122 f->Print(", "); |
| 122 } | 123 } |
| 123 const Class& cls = | 124 const Class& cls = |
| 124 Class::Handle(Isolate::Current()->class_table()->At(class_ids[k])); | 125 Class::Handle(Isolate::Current()->class_table()->At(class_ids[k])); |
| 125 f->Print("%s", String::Handle(cls.Name()).ToCString()); | 126 f->Print("%s", String::Handle(cls.Name()).ToCString()); |
| 126 } | 127 } |
| 128 if (count > 0) { |
| 129 f->Print(" #%"Pd, count); |
| 130 } |
| 127 } | 131 } |
| 128 f->Print("]"); | 132 f->Print("]"); |
| 129 } | 133 } |
| 130 | 134 |
| 131 | 135 |
| 132 static void PrintPropagatedType(BufferFormatter* f, const Definition& def) { | 136 static void PrintPropagatedType(BufferFormatter* f, const Definition& def) { |
| 133 if (def.HasPropagatedType()) { | 137 if (def.HasPropagatedType()) { |
| 134 String& name = String::Handle(); | 138 String& name = String::Handle(); |
| 135 name = AbstractType::Handle(def.PropagatedType()).Name(); | 139 name = AbstractType::Handle(def.PropagatedType()).Name(); |
| 136 f->Print(" {PT: %s}", name.ToCString()); | 140 f->Print(" {PT: %s}", name.ToCString()); |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 f->Print(" ["); | 665 f->Print(" ["); |
| 662 locations_[i].PrintTo(f); | 666 locations_[i].PrintTo(f); |
| 663 f->Print("]"); | 667 f->Print("]"); |
| 664 } | 668 } |
| 665 } | 669 } |
| 666 f->Print(" }"); | 670 f->Print(" }"); |
| 667 if (outer_ != NULL) outer_->PrintTo(f); | 671 if (outer_ != NULL) outer_->PrintTo(f); |
| 668 } | 672 } |
| 669 | 673 |
| 670 } // namespace dart | 674 } // namespace dart |
| OLD | NEW |