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

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

Issue 78733002: Generalize if-conversion to arbitrary smi comparisons. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: added missing test file 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
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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 } 358 }
359 PrintICData(f, ic_data()); 359 PrintICData(f, ic_data());
360 } 360 }
361 361
362 362
363 void StrictCompareInstr::PrintOperandsTo(BufferFormatter* f) const { 363 void StrictCompareInstr::PrintOperandsTo(BufferFormatter* f) const {
364 f->Print("%s, ", Token::Str(kind())); 364 f->Print("%s, ", Token::Str(kind()));
365 left()->PrintTo(f); 365 left()->PrintTo(f);
366 f->Print(", "); 366 f->Print(", ");
367 right()->PrintTo(f); 367 right()->PrintTo(f);
368 if (needs_number_check()) {
369 f->Print(", with number check");
370 }
368 } 371 }
369 372
370 373
371 void EqualityCompareInstr::PrintOperandsTo(BufferFormatter* f) const { 374 void EqualityCompareInstr::PrintOperandsTo(BufferFormatter* f) const {
372 left()->PrintTo(f); 375 left()->PrintTo(f);
373 f->Print(" %s ", Token::Str(kind())); 376 f->Print(" %s ", Token::Str(kind()));
374 right()->PrintTo(f); 377 right()->PrintTo(f);
375 } 378 }
376 379
377 380
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 f->Print("%s {%" Pd "}, ", 423 f->Print("%s {%" Pd "}, ",
421 String::Handle(field().name()).ToCString(), 424 String::Handle(field().name()).ToCString(),
422 field().Offset()); 425 field().Offset());
423 instance()->PrintTo(f); 426 instance()->PrintTo(f);
424 f->Print(", "); 427 f->Print(", ");
425 value()->PrintTo(f); 428 value()->PrintTo(f);
426 } 429 }
427 430
428 431
429 void IfThenElseInstr::PrintOperandsTo(BufferFormatter* f) const { 432 void IfThenElseInstr::PrintOperandsTo(BufferFormatter* f) const {
430 left()->PrintTo(f); 433 comparison()->PrintOperandsTo(f);
431 f->Print(" %s ", Token::Str(kind_));
432 right()->PrintTo(f);
433 f->Print(" ? %" Pd " : %" Pd, 434 f->Print(" ? %" Pd " : %" Pd,
434 if_true_, 435 if_true_,
435 if_false_); 436 if_false_);
436 } 437 }
437 438
438 439
439 void LoadStaticFieldInstr::PrintOperandsTo(BufferFormatter* f) const { 440 void LoadStaticFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
440 field_value()->PrintTo(f); 441 field_value()->PrintTo(f);
441 } 442 }
442 443
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 f->Print(" ["); 985 f->Print(" [");
985 locations_[i].PrintTo(f); 986 locations_[i].PrintTo(f);
986 f->Print("]"); 987 f->Print("]");
987 } 988 }
988 } 989 }
989 f->Print(" }"); 990 f->Print(" }");
990 if (outer_ != NULL) outer_->PrintTo(f); 991 if (outer_ != NULL) outer_->PrintTo(f);
991 } 992 }
992 993
993 } // namespace dart 994 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698