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

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

Issue 68643009: Better printing of MathUnaryInstr. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 f->Print("%s, ", type_args.ToCString()); 566 f->Print("%s, ", type_args.ToCString());
567 instantiator()->PrintTo(f); 567 instantiator()->PrintTo(f);
568 } 568 }
569 569
570 570
571 void AllocateContextInstr::PrintOperandsTo(BufferFormatter* f) const { 571 void AllocateContextInstr::PrintOperandsTo(BufferFormatter* f) const {
572 f->Print("%" Pd "", num_context_variables()); 572 f->Print("%" Pd "", num_context_variables());
573 } 573 }
574 574
575 575
576 void MathUnaryInstr::PrintOperandsTo(BufferFormatter* f) const {
577 f->Print("'%s', ", MethodRecognizer::KindToCString(kind()));
578 value()->PrintTo(f);
579 }
580
581
576 void BinarySmiOpInstr::PrintTo(BufferFormatter* f) const { 582 void BinarySmiOpInstr::PrintTo(BufferFormatter* f) const {
577 Definition::PrintTo(f); 583 Definition::PrintTo(f);
578 f->Print(" %co", overflow_ ? '+' : '-'); 584 f->Print(" %co", overflow_ ? '+' : '-');
579 f->Print(" %ct", is_truncating() ? '+' : '-'); 585 f->Print(" %ct", is_truncating() ? '+' : '-');
580 } 586 }
581 587
582 588
583 void BinarySmiOpInstr::PrintOperandsTo(BufferFormatter* f) const { 589 void BinarySmiOpInstr::PrintOperandsTo(BufferFormatter* f) const {
584 f->Print("%s, ", Token::Str(op_kind())); 590 f->Print("%s, ", Token::Str(op_kind()));
585 left()->PrintTo(f); 591 left()->PrintTo(f);
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 f->Print(" ["); 984 f->Print(" [");
979 locations_[i].PrintTo(f); 985 locations_[i].PrintTo(f);
980 f->Print("]"); 986 f->Print("]");
981 } 987 }
982 } 988 }
983 f->Print(" }"); 989 f->Print(" }");
984 if (outer_ != NULL) outer_->PrintTo(f); 990 if (outer_ != NULL) outer_->PrintTo(f);
985 } 991 }
986 992
987 } // namespace dart 993 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698