Chromium Code Reviews| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 if (k > 0) { | 121 if (k > 0) { |
| 122 f->Print(", "); | 122 f->Print(", "); |
| 123 } | 123 } |
| 124 const Class& cls = | 124 const Class& cls = |
| 125 Class::Handle(Isolate::Current()->class_table()->At(class_ids[k])); | 125 Class::Handle(Isolate::Current()->class_table()->At(class_ids[k])); |
| 126 f->Print("%s", String::Handle(cls.Name()).ToCString()); | 126 f->Print("%s", String::Handle(cls.Name()).ToCString()); |
| 127 } | 127 } |
| 128 if (count > 0) { | 128 if (count > 0) { |
| 129 f->Print(" #%"Pd, count); | 129 f->Print(" #%"Pd, count); |
| 130 } | 130 } |
| 131 f->Print(" <%p>", static_cast<void*>(target.raw())); | |
|
Florian Schneider
2013/01/15 13:46:58
use Px instead?
| |
| 131 } | 132 } |
| 132 f->Print("]"); | 133 f->Print("]"); |
| 133 } | 134 } |
| 134 | 135 |
| 135 | 136 |
| 136 static void PrintPropagatedType(BufferFormatter* f, const Definition& def) { | 137 static void PrintPropagatedType(BufferFormatter* f, const Definition& def) { |
| 137 if (def.HasPropagatedType()) { | 138 if (def.HasPropagatedType()) { |
| 138 String& name = String::Handle(); | 139 String& name = String::Handle(); |
| 139 name = AbstractType::Handle(def.PropagatedType()).Name(); | 140 name = AbstractType::Handle(def.PropagatedType()).Name(); |
| 140 f->Print(" {PT: %s}", name.ToCString()); | 141 f->Print(" {PT: %s}", name.ToCString()); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 316 f->Print(", "); | 317 f->Print(", "); |
| 317 ArgumentAt(i)->value()->PrintTo(f); | 318 ArgumentAt(i)->value()->PrintTo(f); |
| 318 } | 319 } |
| 319 if (HasICData()) { | 320 if (HasICData()) { |
| 320 PrintICData(f, *ic_data()); | 321 PrintICData(f, *ic_data()); |
| 321 } | 322 } |
| 322 } | 323 } |
| 323 | 324 |
| 324 | 325 |
| 325 void PolymorphicInstanceCallInstr::PrintOperandsTo(BufferFormatter* f) const { | 326 void PolymorphicInstanceCallInstr::PrintOperandsTo(BufferFormatter* f) const { |
| 326 instance_call()->PrintOperandsTo(f); | 327 f->Print("%s", instance_call()->function_name().ToCString()); |
| 328 for (intptr_t i = 0; i < ArgumentCount(); ++i) { | |
| 329 f->Print(", "); | |
| 330 ArgumentAt(i)->value()->PrintTo(f); | |
| 331 } | |
| 332 PrintICData(f, ic_data()); | |
| 327 } | 333 } |
| 328 | 334 |
| 329 | 335 |
| 330 void StrictCompareInstr::PrintOperandsTo(BufferFormatter* f) const { | 336 void StrictCompareInstr::PrintOperandsTo(BufferFormatter* f) const { |
| 331 f->Print("%s, ", Token::Str(kind())); | 337 f->Print("%s, ", Token::Str(kind())); |
| 332 left()->PrintTo(f); | 338 left()->PrintTo(f); |
| 333 f->Print(", "); | 339 f->Print(", "); |
| 334 right()->PrintTo(f); | 340 right()->PrintTo(f); |
| 335 } | 341 } |
| 336 | 342 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 675 f->Print(" ["); | 681 f->Print(" ["); |
| 676 locations_[i].PrintTo(f); | 682 locations_[i].PrintTo(f); |
| 677 f->Print("]"); | 683 f->Print("]"); |
| 678 } | 684 } |
| 679 } | 685 } |
| 680 f->Print(" }"); | 686 f->Print(" }"); |
| 681 if (outer_ != NULL) outer_->PrintTo(f); | 687 if (outer_ != NULL) outer_->PrintTo(f); |
| 682 } | 688 } |
| 683 | 689 |
| 684 } // namespace dart | 690 } // namespace dart |
| OLD | NEW |