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

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

Issue 10867050: Separate branch on strict compare into a new IL instruction. (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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 554
555 f->Print(" goto (%d, %d)", 555 f->Print(" goto (%d, %d)",
556 true_successor()->block_id(), 556 true_successor()->block_id(),
557 false_successor()->block_id()); 557 false_successor()->block_id());
558 if (HasICData()) { 558 if (HasICData()) {
559 PrintICData(f, *ic_data()); 559 PrintICData(f, *ic_data());
560 } 560 }
561 } 561 }
562 562
563 563
564 void StrictCompareAndBranchInstr::PrintTo(BufferFormatter* f) const {
565 f->Print(" %s", DebugName());
566 f->Print("if ");
567 left()->PrintTo(f);
568 f-> Print(" %s ", Token::Str(kind()));
569 right()->PrintTo(f);
570 f->Print(" goto (%d, %d)",
571 true_successor()->block_id(),
572 false_successor()->block_id());
573 }
574
575
564 void ParallelMoveInstr::PrintTo(BufferFormatter* f) const { 576 void ParallelMoveInstr::PrintTo(BufferFormatter* f) const {
565 f->Print(" %s ", DebugName()); 577 f->Print(" %s ", DebugName());
566 for (intptr_t i = 0; i < moves_.length(); i++) { 578 for (intptr_t i = 0; i < moves_.length(); i++) {
567 if (i != 0) f->Print(", "); 579 if (i != 0) f->Print(", ");
568 moves_[i]->dest().PrintTo(f); 580 moves_[i]->dest().PrintTo(f);
569 f->Print(" <- "); 581 f->Print(" <- ");
570 moves_[i]->src().PrintTo(f); 582 moves_[i]->src().PrintTo(f);
571 } 583 }
572 } 584 }
573 585
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 f->Print("if "); 822 f->Print("if ");
811 left()->PrintTo(f); 823 left()->PrintTo(f);
812 f-> Print(" %s ", Token::Str(kind())); 824 f-> Print(" %s ", Token::Str(kind()));
813 right()->PrintTo(f); 825 right()->PrintTo(f);
814 f->Print(" goto (B%d, B%d)", 826 f->Print(" goto (B%d, B%d)",
815 true_successor()->block_id(), 827 true_successor()->block_id(),
816 false_successor()->block_id()); 828 false_successor()->block_id());
817 } 829 }
818 830
819 831
832 void StrictCompareAndBranchInstr::PrintToVisualizer(BufferFormatter* f) const {
833 f->Print("_ %s ", DebugName());
834 f->Print("if ");
835 left()->PrintTo(f);
836 f-> Print(" %s ", Token::Str(kind()));
837 right()->PrintTo(f);
838 f->Print(" goto (B%d, B%d)",
839 true_successor()->block_id(),
840 false_successor()->block_id());
841 }
842
843
820 void ParallelMoveInstr::PrintToVisualizer(BufferFormatter* f) const { 844 void ParallelMoveInstr::PrintToVisualizer(BufferFormatter* f) const {
821 UNIMPLEMENTED(); 845 UNIMPLEMENTED();
822 } 846 }
823 847
824 848
825 void Environment::PrintTo(BufferFormatter* f) const { 849 void Environment::PrintTo(BufferFormatter* f) const {
826 f->Print(" env={ "); 850 f->Print(" env={ ");
827 for (intptr_t i = 0; i < values_.length(); ++i) { 851 for (intptr_t i = 0; i < values_.length(); ++i) {
828 if (i > 0) f->Print(", "); 852 if (i > 0) f->Print(", ");
829 values_[i]->PrintTo(f); 853 values_[i]->PrintTo(f);
830 if ((locations_ != NULL) && !locations_[i].IsInvalid()) { 854 if ((locations_ != NULL) && !locations_[i].IsInvalid()) {
831 f->Print(" ["); 855 f->Print(" [");
832 locations_[i].PrintTo(f); 856 locations_[i].PrintTo(f);
833 f->Print("]"); 857 f->Print("]");
834 } 858 }
835 } 859 }
836 f->Print(" }"); 860 f->Print(" }");
837 } 861 }
838 862
839 } // namespace dart 863 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698