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

Side by Side Diff: vm/il_printer.cc

Issue 10834311: Split ToDouble into two IL instruction to make it work with SSA. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 f->Print("%s", Token::Str(op_kind())); 388 f->Print("%s", Token::Str(op_kind()));
389 } 389 }
390 390
391 391
392 void UnarySmiOpComp::PrintOperandsTo(BufferFormatter* f) const { 392 void UnarySmiOpComp::PrintOperandsTo(BufferFormatter* f) const {
393 f->Print("%s, ", Token::Str(op_kind())); 393 f->Print("%s, ", Token::Str(op_kind()));
394 value()->PrintTo(f); 394 value()->PrintTo(f);
395 } 395 }
396 396
397 397
398 void ToDoubleComp::PrintOperandsTo(BufferFormatter* f) const {
399 ASSERT(from() == kDoubleCid || from() == kSmiCid);
400 f->Print("%s ", from() == kDoubleCid ? "double2double" : "smi2double");
401 value()->PrintTo(f);
402 }
403
404
405 void GraphEntryInstr::PrintTo(BufferFormatter* f) const { 398 void GraphEntryInstr::PrintTo(BufferFormatter* f) const {
406 f->Print("%2d: [graph]", block_id()); 399 f->Print("%2d: [graph]", block_id());
407 if (start_env_ != NULL) { 400 if (start_env_ != NULL) {
408 f->Print("\n{\n"); 401 f->Print("\n{\n");
409 const GrowableArray<Value*>& values = start_env_->values(); 402 const GrowableArray<Value*>& values = start_env_->values();
410 for (intptr_t i = 0; i < values.length(); i++) { 403 for (intptr_t i = 0; i < values.length(); i++) {
411 if (values[i]->IsUse()) { 404 if (values[i]->IsUse()) {
412 Definition* def = values[i]->AsUse()->definition(); 405 Definition* def = values[i]->AsUse()->definition();
413 f->Print(" ", i); 406 f->Print(" ", i);
414 def->PrintTo(f); 407 def->PrintTo(f);
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 if ((locations_ != NULL) && !locations_[i].IsInvalid()) { 801 if ((locations_ != NULL) && !locations_[i].IsInvalid()) {
809 f->Print(" ["); 802 f->Print(" [");
810 locations_[i].PrintTo(f); 803 locations_[i].PrintTo(f);
811 f->Print("]"); 804 f->Print("]");
812 } 805 }
813 } 806 }
814 f->Print(" }"); 807 f->Print(" }");
815 } 808 }
816 809
817 } // namespace dart 810 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698