| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 instantiator()->PrintTo(f); | 145 instantiator()->PrintTo(f); |
| 146 f->Print(")"); | 146 f->Print(")"); |
| 147 f->Print(" instantiator_type_arguments("); | 147 f->Print(" instantiator_type_arguments("); |
| 148 instantiator_type_arguments()->PrintTo(f); | 148 instantiator_type_arguments()->PrintTo(f); |
| 149 f->Print(")"); | 149 f->Print(")"); |
| 150 } | 150 } |
| 151 | 151 |
| 152 | 152 |
| 153 void ClosureCallComp::PrintOperandsTo(BufferFormatter* f) const { | 153 void ClosureCallComp::PrintOperandsTo(BufferFormatter* f) const { |
| 154 for (intptr_t i = 0; i < ArgumentCount(); ++i) { | 154 for (intptr_t i = 0; i < ArgumentCount(); ++i) { |
| 155 if (i == 0) f->Print(", "); | 155 if (i > 0) f->Print(", "); |
| 156 ArgumentAt(i)->PrintTo(f); | 156 f->Print("cid%d", ArgumentAt(i)->cid()); |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 | 159 |
| 160 | 160 |
| 161 void InstanceCallComp::PrintOperandsTo(BufferFormatter* f) const { | 161 void InstanceCallComp::PrintOperandsTo(BufferFormatter* f) const { |
| 162 f->Print("%s", function_name().ToCString()); | 162 f->Print("%s", function_name().ToCString()); |
| 163 for (intptr_t i = 0; i < ArgumentCount(); ++i) { | 163 for (intptr_t i = 0; i < ArgumentCount(); ++i) { |
| 164 f->Print(", "); | 164 f->Print(", "); |
| 165 ArgumentAt(i)->PrintTo(f); | 165 ArgumentAt(i)->PrintTo(f); |
| 166 } | 166 } |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 if (i != 0) f->Print(", "); | 288 if (i != 0) f->Print(", "); |
| 289 ElementAt(i)->PrintTo(f); | 289 ElementAt(i)->PrintTo(f); |
| 290 } | 290 } |
| 291 if (ElementCount() > 0) f->Print(", "); | 291 if (ElementCount() > 0) f->Print(", "); |
| 292 element_type()->PrintTo(f); | 292 element_type()->PrintTo(f); |
| 293 } | 293 } |
| 294 | 294 |
| 295 | 295 |
| 296 void CreateClosureComp::PrintOperandsTo(BufferFormatter* f) const { | 296 void CreateClosureComp::PrintOperandsTo(BufferFormatter* f) const { |
| 297 f->Print("%s", function().ToCString()); | 297 f->Print("%s", function().ToCString()); |
| 298 f->Print(", "); | 298 for (intptr_t i = 0; i < ArgumentCount(); ++i) { |
| 299 type_arguments()->PrintTo(f); | 299 f->Print(", "); |
| 300 f->Print(", "); | 300 f->Print("cid%d", ArgumentAt(i)->cid()); |
| 301 receiver()->PrintTo(f); | 301 } |
| 302 } | 302 } |
| 303 | 303 |
| 304 | 304 |
| 305 void LoadVMFieldComp::PrintOperandsTo(BufferFormatter* f) const { | 305 void LoadVMFieldComp::PrintOperandsTo(BufferFormatter* f) const { |
| 306 value()->PrintTo(f); | 306 value()->PrintTo(f); |
| 307 f->Print(", %d", offset_in_bytes()); | 307 f->Print(", %d", offset_in_bytes()); |
| 308 } | 308 } |
| 309 | 309 |
| 310 | 310 |
| 311 void StoreVMFieldComp::PrintOperandsTo(BufferFormatter* f) const { | 311 void StoreVMFieldComp::PrintOperandsTo(BufferFormatter* f) const { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 f->Print(" "); | 415 f->Print(" "); |
| 416 } else if (HasSSATemp()) { | 416 } else if (HasSSATemp()) { |
| 417 f->Print(" v%d <- ", ssa_temp_index()); | 417 f->Print(" v%d <- ", ssa_temp_index()); |
| 418 } else { | 418 } else { |
| 419 f->Print(" t%d <- ", temp_index()); | 419 f->Print(" t%d <- ", temp_index()); |
| 420 } | 420 } |
| 421 computation()->PrintTo(f); | 421 computation()->PrintTo(f); |
| 422 } | 422 } |
| 423 | 423 |
| 424 | 424 |
| 425 void PushArgumentInstr::PrintTo(BufferFormatter* f) const { |
| 426 f->Print(" %s:%d ", DebugName(), cid()); |
| 427 value()->PrintTo(f); |
| 428 } |
| 429 |
| 430 |
| 425 void ReturnInstr::PrintTo(BufferFormatter* f) const { | 431 void ReturnInstr::PrintTo(BufferFormatter* f) const { |
| 426 f->Print(" %s ", DebugName()); | 432 f->Print(" %s ", DebugName()); |
| 427 value()->PrintTo(f); | 433 value()->PrintTo(f); |
| 428 } | 434 } |
| 429 | 435 |
| 430 | 436 |
| 431 void ThrowInstr::PrintTo(BufferFormatter* f) const { | 437 void ThrowInstr::PrintTo(BufferFormatter* f) const { |
| 432 f->Print(" %s ", DebugName()); | 438 f->Print(" %s ", DebugName()); |
| 433 exception()->PrintTo(f); | 439 exception()->PrintTo(f); |
| 434 } | 440 } |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 f->Print("_ "); | 679 f->Print("_ "); |
| 674 } else if (HasSSATemp()) { | 680 } else if (HasSSATemp()) { |
| 675 f->Print("v%d ", ssa_temp_index()); | 681 f->Print("v%d ", ssa_temp_index()); |
| 676 } else { | 682 } else { |
| 677 f->Print("t%d ", temp_index()); | 683 f->Print("t%d ", temp_index()); |
| 678 } | 684 } |
| 679 computation()->PrintTo(f); | 685 computation()->PrintTo(f); |
| 680 } | 686 } |
| 681 | 687 |
| 682 | 688 |
| 689 void PushArgumentInstr::PrintToVisualizer(BufferFormatter* f) const { |
| 690 f->Print("_ %s:%d ", DebugName(), cid()); |
| 691 value()->PrintTo(f); |
| 692 } |
| 693 |
| 694 |
| 683 void ReturnInstr::PrintToVisualizer(BufferFormatter* f) const { | 695 void ReturnInstr::PrintToVisualizer(BufferFormatter* f) const { |
| 684 f->Print("_ %s ", DebugName()); | 696 f->Print("_ %s ", DebugName()); |
| 685 value()->PrintTo(f); | 697 value()->PrintTo(f); |
| 686 } | 698 } |
| 687 | 699 |
| 688 | 700 |
| 689 void ThrowInstr::PrintToVisualizer(BufferFormatter* f) const { | 701 void ThrowInstr::PrintToVisualizer(BufferFormatter* f) const { |
| 690 f->Print("_ %s ", DebugName()); | 702 f->Print("_ %s ", DebugName()); |
| 691 exception()->PrintTo(f); | 703 exception()->PrintTo(f); |
| 692 } | 704 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 if ((i < locations_.length()) && !locations_[i].IsInvalid()) { | 742 if ((i < locations_.length()) && !locations_[i].IsInvalid()) { |
| 731 f->Print(" ["); | 743 f->Print(" ["); |
| 732 locations_[i].PrintTo(f); | 744 locations_[i].PrintTo(f); |
| 733 f->Print("]"); | 745 f->Print("]"); |
| 734 } | 746 } |
| 735 } | 747 } |
| 736 f->Print(" }"); | 748 f->Print(" }"); |
| 737 } | 749 } |
| 738 | 750 |
| 739 } // namespace dart | 751 } // namespace dart |
| OLD | NEW |