Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: runtime/vm/il_printer.cc

Issue 10832150: Get rid of ast node ids. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 const Class& cls = 123 const Class& cls =
124 Class::Handle(Isolate::Current()->class_table()->At(class_ids[k])); 124 Class::Handle(Isolate::Current()->class_table()->At(class_ids[k]));
125 f->Print("%s", String::Handle(cls.Name()).ToCString()); 125 f->Print("%s", String::Handle(cls.Name()).ToCString());
126 } 126 }
127 } 127 }
128 f->Print("]"); 128 f->Print("]");
129 } 129 }
130 130
131 131
132 void Computation::PrintTo(BufferFormatter* f) const { 132 void Computation::PrintTo(BufferFormatter* f) const {
133 f->Print("%s:%d(", DebugName(), cid()); 133 f->Print("%s:%d(", DebugName(), deopt_id());
134 PrintOperandsTo(f); 134 PrintOperandsTo(f);
135 f->Print(")"); 135 f->Print(")");
136 if (HasICData()) { 136 if (HasICData()) {
137 PrintICData(f, *ic_data()); 137 PrintICData(f, *ic_data());
138 } 138 }
139 } 139 }
140 140
141 141
142 void Computation::PrintOperandsTo(BufferFormatter* f) const { 142 void Computation::PrintOperandsTo(BufferFormatter* f) const {
143 for (int i = 0; i < InputCount(); ++i) { 143 for (int i = 0; i < InputCount(); ++i) {
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 } 470 }
471 471
472 472
473 void PushArgumentInstr::PrintTo(BufferFormatter* f) const { 473 void PushArgumentInstr::PrintTo(BufferFormatter* f) const {
474 f->Print(" %s ", DebugName()); 474 f->Print(" %s ", DebugName());
475 value()->PrintTo(f); 475 value()->PrintTo(f);
476 } 476 }
477 477
478 478
479 void ReturnInstr::PrintTo(BufferFormatter* f) const { 479 void ReturnInstr::PrintTo(BufferFormatter* f) const {
480 f->Print(" %s:%d ", DebugName(), cid()); 480 f->Print(" %s:%d ", DebugName(), deopt_id());
481 value()->PrintTo(f); 481 value()->PrintTo(f);
482 } 482 }
483 483
484 484
485 void ThrowInstr::PrintTo(BufferFormatter* f) const { 485 void ThrowInstr::PrintTo(BufferFormatter* f) const {
486 f->Print(" %s:%d ", DebugName(), cid()); 486 f->Print(" %s:%d ", DebugName(), deopt_id());
487 } 487 }
488 488
489 489
490 void ReThrowInstr::PrintTo(BufferFormatter* f) const { 490 void ReThrowInstr::PrintTo(BufferFormatter* f) const {
491 f->Print(" %s:%d ", DebugName(), cid()); 491 f->Print(" %s:%d ", DebugName(), deopt_id());
492 } 492 }
493 493
494 494
495 void GotoInstr::PrintTo(BufferFormatter* f) const { 495 void GotoInstr::PrintTo(BufferFormatter* f) const {
496 if (HasParallelMove()) { 496 if (HasParallelMove()) {
497 parallel_move()->PrintTo(f); 497 parallel_move()->PrintTo(f);
498 } else { 498 } else {
499 f->Print(" "); 499 f->Print(" ");
500 } 500 }
501 f->Print(" goto %d", successor()->block_id()); 501 f->Print(" goto %d", successor()->block_id());
502 } 502 }
503 503
504 504
505 void BranchInstr::PrintTo(BufferFormatter* f) const { 505 void BranchInstr::PrintTo(BufferFormatter* f) const {
506 f->Print(" %s:%d ", DebugName(), cid()); 506 f->Print(" %s:%d ", DebugName(), deopt_id());
507 f->Print("if "); 507 f->Print("if ");
508 left()->PrintTo(f); 508 left()->PrintTo(f);
509 f-> Print(" %s ", Token::Str(kind())); 509 f-> Print(" %s ", Token::Str(kind()));
510 right()->PrintTo(f); 510 right()->PrintTo(f);
511 511
512 f->Print(" goto (%d, %d)", 512 f->Print(" goto (%d, %d)",
513 true_successor()->block_id(), 513 true_successor()->block_id(),
514 false_successor()->block_id()); 514 false_successor()->block_id());
515 if (HasICData()) { 515 if (HasICData()) {
516 PrintICData(f, *ic_data()); 516 PrintICData(f, *ic_data());
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 } 735 }
736 736
737 737
738 void PushArgumentInstr::PrintToVisualizer(BufferFormatter* f) const { 738 void PushArgumentInstr::PrintToVisualizer(BufferFormatter* f) const {
739 f->Print("_ %s ", DebugName()); 739 f->Print("_ %s ", DebugName());
740 value()->PrintTo(f); 740 value()->PrintTo(f);
741 } 741 }
742 742
743 743
744 void ReturnInstr::PrintToVisualizer(BufferFormatter* f) const { 744 void ReturnInstr::PrintToVisualizer(BufferFormatter* f) const {
745 f->Print("_ %s:%d ", DebugName(), cid()); 745 f->Print("_ %s:%d ", DebugName(), deopt_id());
746 value()->PrintTo(f); 746 value()->PrintTo(f);
747 } 747 }
748 748
749 749
750 void ThrowInstr::PrintToVisualizer(BufferFormatter* f) const { 750 void ThrowInstr::PrintToVisualizer(BufferFormatter* f) const {
751 f->Print("_ %s:%d ", DebugName(), cid()); 751 f->Print("_ %s:%d ", DebugName(), deopt_id());
752 } 752 }
753 753
754 754
755 void ReThrowInstr::PrintToVisualizer(BufferFormatter* f) const { 755 void ReThrowInstr::PrintToVisualizer(BufferFormatter* f) const {
756 f->Print("_ %s:%d ", DebugName(), cid()); 756 f->Print("_ %s:%d ", DebugName(), deopt_id());
757 } 757 }
758 758
759 759
760 void GotoInstr::PrintToVisualizer(BufferFormatter* f) const { 760 void GotoInstr::PrintToVisualizer(BufferFormatter* f) const {
761 f->Print("_ goto B%d", successor()->block_id()); 761 f->Print("_ goto B%d", successor()->block_id());
762 } 762 }
763 763
764 764
765 void BranchInstr::PrintToVisualizer(BufferFormatter* f) const { 765 void BranchInstr::PrintToVisualizer(BufferFormatter* f) const {
766 f->Print("_ %s ", DebugName()); 766 f->Print("_ %s ", DebugName());
(...skipping 20 matching lines...) Expand all
787 if ((i < locations_.length()) && !locations_[i].IsInvalid()) { 787 if ((i < locations_.length()) && !locations_[i].IsInvalid()) {
788 f->Print(" ["); 788 f->Print(" [");
789 locations_[i].PrintTo(f); 789 locations_[i].PrintTo(f);
790 f->Print("]"); 790 f->Print("]");
791 } 791 }
792 } 792 }
793 f->Print(" }"); 793 f->Print(" }");
794 } 794 }
795 795
796 } // namespace dart 796 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698