| 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 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 void InstanceCallComp::PrintOperandsTo(BufferFormatter* f) const { | 130 void InstanceCallComp::PrintOperandsTo(BufferFormatter* f) const { |
| 131 f->Print("%s", function_name().ToCString()); | 131 f->Print("%s", function_name().ToCString()); |
| 132 for (intptr_t i = 0; i < ArgumentCount(); ++i) { | 132 for (intptr_t i = 0; i < ArgumentCount(); ++i) { |
| 133 f->Print(", "); | 133 f->Print(", "); |
| 134 ArgumentAt(i)->PrintTo(f); | 134 ArgumentAt(i)->PrintTo(f); |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 | 137 |
| 138 | 138 |
| 139 void PolymorphicInstanceCallComp::PrintTo(BufferFormatter* f) const { |
| 140 f->Print("%s(", DebugName()); |
| 141 instance_call()->PrintOperandsTo(f); |
| 142 f->Print(") "); |
| 143 intptr_t len = HasICData() ? ic_data()->NumberOfChecks() : 0; |
| 144 f->Print("[%d: ", len); |
| 145 for (intptr_t i = 0; i < len; i++) { |
| 146 intptr_t class_id = ic_data()->GetReceiverClassIdAt(i); |
| 147 const Class& cls = |
| 148 Class::Handle(Isolate::Current()->class_table()->At(class_id)); |
| 149 if (i > 0) { |
| 150 f->Print(", "); |
| 151 } |
| 152 f->Print("%s", cls.ToCString()); |
| 153 } |
| 154 f->Print("]"); |
| 155 } |
| 156 |
| 139 void StrictCompareComp::PrintOperandsTo(BufferFormatter* f) const { | 157 void StrictCompareComp::PrintOperandsTo(BufferFormatter* f) const { |
| 140 f->Print("%s, ", Token::Str(kind())); | 158 f->Print("%s, ", Token::Str(kind())); |
| 141 left()->PrintTo(f); | 159 left()->PrintTo(f); |
| 142 f->Print(", "); | 160 f->Print(", "); |
| 143 right()->PrintTo(f); | 161 right()->PrintTo(f); |
| 144 } | 162 } |
| 145 | 163 |
| 146 | 164 |
| 147 void EqualityCompareComp::PrintOperandsTo(BufferFormatter* f) const { | 165 void EqualityCompareComp::PrintOperandsTo(BufferFormatter* f) const { |
| 148 left()->PrintTo(f); | 166 left()->PrintTo(f); |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 void Environment::PrintTo(BufferFormatter* f) const { | 683 void Environment::PrintTo(BufferFormatter* f) const { |
| 666 f->Print(" env={ "); | 684 f->Print(" env={ "); |
| 667 for (intptr_t i = 0; i < values_.length(); ++i) { | 685 for (intptr_t i = 0; i < values_.length(); ++i) { |
| 668 if (i > 0) f->Print(", "); | 686 if (i > 0) f->Print(", "); |
| 669 values_[i]->PrintTo(f); | 687 values_[i]->PrintTo(f); |
| 670 } | 688 } |
| 671 f->Print(" }"); | 689 f->Print(" }"); |
| 672 } | 690 } |
| 673 | 691 |
| 674 } // namespace dart | 692 } // namespace dart |
| OLD | NEW |