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

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

Issue 10802025: Fuse compare with branch at graph building time. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 9
10 namespace dart { 10 namespace dart {
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 f->Print(" %s ", DebugName()); 436 f->Print(" %s ", DebugName());
437 exception()->PrintTo(f); 437 exception()->PrintTo(f);
438 f->Print(", "); 438 f->Print(", ");
439 stack_trace()->PrintTo(f); 439 stack_trace()->PrintTo(f);
440 } 440 }
441 441
442 442
443 void BranchInstr::PrintTo(BufferFormatter* f) const { 443 void BranchInstr::PrintTo(BufferFormatter* f) const {
444 f->Print(" %s ", DebugName()); 444 f->Print(" %s ", DebugName());
445 f->Print("if "); 445 f->Print("if ");
446 if (is_fused_with_comparison()) { 446 left()->PrintTo(f);
447 if (is_negated()) f->Print(" not "); 447 f-> Print(" %s ", Token::Str(kind()));
448 fused_with_comparison_->PrintTo(f); 448 right()->PrintTo(f);
449 } else {
450 value()->PrintTo(f);
451 }
452 449
453 f->Print(" goto (%d, %d)", 450 f->Print(" goto (%d, %d)",
454 true_successor()->block_id(), 451 true_successor()->block_id(),
455 false_successor()->block_id()); 452 false_successor()->block_id());
453 if (HasICData()) {
454 PrintICData(f, *ic_data());
455 }
456 } 456 }
457 457
458 458
459 void ParallelMoveInstr::PrintTo(BufferFormatter* f) const { 459 void ParallelMoveInstr::PrintTo(BufferFormatter* f) const {
460 f->Print(" %s ", DebugName()); 460 f->Print(" %s ", DebugName());
461 for (intptr_t i = 0; i < moves_.length(); i++) { 461 for (intptr_t i = 0; i < moves_.length(); i++) {
462 if (i != 0) f->Print(", "); 462 if (i != 0) f->Print(", ");
463 f->Print("%s = %s", moves_[i].dest().Name(), moves_[i].src().Name()); 463 f->Print("%s = %s", moves_[i].dest().Name(), moves_[i].src().Name());
464 } 464 }
465 } 465 }
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 f->Print("_ %s ", DebugName()); 687 f->Print("_ %s ", DebugName());
688 exception()->PrintTo(f); 688 exception()->PrintTo(f);
689 f->Print(", "); 689 f->Print(", ");
690 stack_trace()->PrintTo(f); 690 stack_trace()->PrintTo(f);
691 } 691 }
692 692
693 693
694 void BranchInstr::PrintToVisualizer(BufferFormatter* f) const { 694 void BranchInstr::PrintToVisualizer(BufferFormatter* f) const {
695 f->Print("_ %s ", DebugName()); 695 f->Print("_ %s ", DebugName());
696 f->Print("if "); 696 f->Print("if ");
697 value()->PrintTo(f); 697 left()->PrintTo(f);
698 f-> Print(" %s ", Token::Str(kind()));
699 right()->PrintTo(f);
698 f->Print(" goto (B%d, B%d)", 700 f->Print(" goto (B%d, B%d)",
699 true_successor()->block_id(), 701 true_successor()->block_id(),
700 false_successor()->block_id()); 702 false_successor()->block_id());
701 } 703 }
702 704
703 705
704 void ParallelMoveInstr::PrintToVisualizer(BufferFormatter* f) const { 706 void ParallelMoveInstr::PrintToVisualizer(BufferFormatter* f) const {
705 UNIMPLEMENTED(); 707 UNIMPLEMENTED();
706 } 708 }
707 709
708 710
709 void Environment::PrintTo(BufferFormatter* f) const { 711 void Environment::PrintTo(BufferFormatter* f) const {
710 f->Print(" env={ "); 712 f->Print(" env={ ");
711 for (intptr_t i = 0; i < values_.length(); ++i) { 713 for (intptr_t i = 0; i < values_.length(); ++i) {
712 if (i > 0) f->Print(", "); 714 if (i > 0) f->Print(", ");
713 values_[i]->PrintTo(f); 715 values_[i]->PrintTo(f);
714 if ((i < locations_.length()) && !locations_[i].IsInvalid()) { 716 if ((i < locations_.length()) && !locations_[i].IsInvalid()) {
715 f->Print(" [%s]", locations_[i].Name()); 717 f->Print(" [%s]", locations_[i].Name());
716 } 718 }
717 } 719 }
718 f->Print(" }"); 720 f->Print(" }");
719 } 721 }
720 722
721 } // namespace dart 723 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698