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

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

Issue 14057004: Convert diamond shaped control flow into a single conditional instruction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Florian's comments Created 7 years, 8 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 void StoreInstanceFieldInstr::PrintOperandsTo(BufferFormatter* f) const { 422 void StoreInstanceFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
423 f->Print("%s {%"Pd"}, ", 423 f->Print("%s {%"Pd"}, ",
424 String::Handle(field().name()).ToCString(), 424 String::Handle(field().name()).ToCString(),
425 field().Offset()); 425 field().Offset());
426 instance()->PrintTo(f); 426 instance()->PrintTo(f);
427 f->Print(", "); 427 f->Print(", ");
428 value()->PrintTo(f); 428 value()->PrintTo(f);
429 } 429 }
430 430
431 431
432 void IfThenElseInstr::PrintOperandsTo(BufferFormatter* f) const {
433 left()->PrintTo(f);
434 f->Print(" %s ", Token::Str(kind_));
435 right()->PrintTo(f);
436 f->Print(" ? %"Pd" : %"Pd,
437 if_true_,
438 if_false_);
439 }
440
441
432 void LoadStaticFieldInstr::PrintOperandsTo(BufferFormatter* f) const { 442 void LoadStaticFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
433 f->Print("%s", String::Handle(field().name()).ToCString()); 443 f->Print("%s", String::Handle(field().name()).ToCString());
434 } 444 }
435 445
436 446
437 void StoreStaticFieldInstr::PrintOperandsTo(BufferFormatter* f) const { 447 void StoreStaticFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
438 f->Print("%s, ", String::Handle(field().name()).ToCString()); 448 f->Print("%s, ", String::Handle(field().name()).ToCString());
439 value()->PrintTo(f); 449 value()->PrintTo(f);
440 } 450 }
441 451
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 f->Print(" ["); 776 f->Print(" [");
767 locations_[i].PrintTo(f); 777 locations_[i].PrintTo(f);
768 f->Print("]"); 778 f->Print("]");
769 } 779 }
770 } 780 }
771 f->Print(" }"); 781 f->Print(" }");
772 if (outer_ != NULL) outer_->PrintTo(f); 782 if (outer_ != NULL) outer_->PrintTo(f);
773 } 783 }
774 784
775 } // namespace dart 785 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698