| OLD | NEW |
| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 left()->PrintTo(f); | 468 left()->PrintTo(f); |
| 469 f->Print(", "); | 469 f->Print(", "); |
| 470 right()->PrintTo(f); | 470 right()->PrintTo(f); |
| 471 if (HasICData()) { | 471 if (HasICData()) { |
| 472 PrintICData(f, *ic_data()); | 472 PrintICData(f, *ic_data()); |
| 473 } | 473 } |
| 474 } | 474 } |
| 475 | 475 |
| 476 | 476 |
| 477 void AllocateObjectInstr::PrintOperandsTo(BufferFormatter* f) const { | 477 void AllocateObjectInstr::PrintOperandsTo(BufferFormatter* f) const { |
| 478 f->Print("%s", Class::Handle(constructor().Owner()).ToCString()); | 478 f->Print("%s", cls().ToCString()); |
| 479 for (intptr_t i = 0; i < ArgumentCount(); i++) { | 479 for (intptr_t i = 0; i < ArgumentCount(); i++) { |
| 480 f->Print(", "); | 480 f->Print(", "); |
| 481 PushArgumentAt(i)->value()->PrintTo(f); | 481 PushArgumentAt(i)->value()->PrintTo(f); |
| 482 } | 482 } |
| 483 } | 483 } |
| 484 | 484 |
| 485 | 485 |
| 486 void AllocateObjectWithBoundsCheckInstr::PrintOperandsTo( | 486 void AllocateObjectWithBoundsCheckInstr::PrintOperandsTo( |
| 487 BufferFormatter* f) const { | 487 BufferFormatter* f) const { |
| 488 f->Print("%s", Class::Handle(constructor().Owner()).ToCString()); | 488 f->Print("%s", Class::Handle(constructor().Owner()).ToCString()); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 519 if (i > 0) f->Print(", "); | 519 if (i > 0) f->Print(", "); |
| 520 PushArgumentAt(i)->value()->PrintTo(f); | 520 PushArgumentAt(i)->value()->PrintTo(f); |
| 521 } | 521 } |
| 522 } | 522 } |
| 523 | 523 |
| 524 | 524 |
| 525 void LoadFieldInstr::PrintOperandsTo(BufferFormatter* f) const { | 525 void LoadFieldInstr::PrintOperandsTo(BufferFormatter* f) const { |
| 526 instance()->PrintTo(f); | 526 instance()->PrintTo(f); |
| 527 f->Print(", %"Pd, offset_in_bytes()); | 527 f->Print(", %"Pd, offset_in_bytes()); |
| 528 | 528 |
| 529 if (field_name_ != NULL) { | |
| 530 f->Print(" {%s}", field_name_); | |
| 531 } | |
| 532 | |
| 533 if (field() != NULL) { | 529 if (field() != NULL) { |
| 530 f->Print(" {%s}", String::Handle(field()->name()).ToCString()); |
| 534 const char* expected = "?"; | 531 const char* expected = "?"; |
| 535 if (field()->guarded_cid() != kIllegalCid) { | 532 if (field()->guarded_cid() != kIllegalCid) { |
| 536 const Class& cls = Class::Handle( | 533 const Class& cls = Class::Handle( |
| 537 Isolate::Current()->class_table()->At(field()->guarded_cid())); | 534 Isolate::Current()->class_table()->At(field()->guarded_cid())); |
| 538 expected = String::Handle(cls.Name()).ToCString(); | 535 expected = String::Handle(cls.Name()).ToCString(); |
| 539 } | 536 } |
| 540 | 537 |
| 541 f->Print(" [%s %s]", | 538 f->Print(" [%s %s]", |
| 542 field()->is_nullable() ? "nullable" : "non-nullable", | 539 field()->is_nullable() ? "nullable" : "non-nullable", |
| 543 expected); | 540 expected); |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 f->Print(" ["); | 959 f->Print(" ["); |
| 963 locations_[i].PrintTo(f); | 960 locations_[i].PrintTo(f); |
| 964 f->Print("]"); | 961 f->Print("]"); |
| 965 } | 962 } |
| 966 } | 963 } |
| 967 f->Print(" }"); | 964 f->Print(" }"); |
| 968 if (outer_ != NULL) outer_->PrintTo(f); | 965 if (outer_ != NULL) outer_->PrintTo(f); |
| 969 } | 966 } |
| 970 | 967 |
| 971 } // namespace dart | 968 } // namespace dart |
| OLD | NEW |