| 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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 f->Print("%s, ", type_args.ToCString()); | 571 f->Print("%s, ", type_args.ToCString()); |
| 572 instantiator()->PrintTo(f); | 572 instantiator()->PrintTo(f); |
| 573 } | 573 } |
| 574 | 574 |
| 575 | 575 |
| 576 void AllocateContextInstr::PrintOperandsTo(BufferFormatter* f) const { | 576 void AllocateContextInstr::PrintOperandsTo(BufferFormatter* f) const { |
| 577 f->Print("%"Pd"", num_context_variables()); | 577 f->Print("%"Pd"", num_context_variables()); |
| 578 } | 578 } |
| 579 | 579 |
| 580 | 580 |
| 581 void CatchEntryInstr::PrintOperandsTo(BufferFormatter* f) const { | |
| 582 f->Print("%s, %s", | |
| 583 exception_var().name().ToCString(), | |
| 584 stacktrace_var().name().ToCString()); | |
| 585 } | |
| 586 | |
| 587 | |
| 588 void BinarySmiOpInstr::PrintTo(BufferFormatter* f) const { | 581 void BinarySmiOpInstr::PrintTo(BufferFormatter* f) const { |
| 589 Definition::PrintTo(f); | 582 Definition::PrintTo(f); |
| 590 f->Print(" %co", overflow_ ? '+' : '-'); | 583 f->Print(" %co", overflow_ ? '+' : '-'); |
| 591 f->Print(" %ct", is_truncating() ? '+' : '-'); | 584 f->Print(" %ct", is_truncating() ? '+' : '-'); |
| 592 } | 585 } |
| 593 | 586 |
| 594 | 587 |
| 595 void BinarySmiOpInstr::PrintOperandsTo(BufferFormatter* f) const { | 588 void BinarySmiOpInstr::PrintOperandsTo(BufferFormatter* f) const { |
| 596 f->Print("%s, ", Token::Str(op_kind())); | 589 f->Print("%s, ", Token::Str(op_kind())); |
| 597 left()->PrintTo(f); | 590 left()->PrintTo(f); |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 f->Print(" "); | 885 f->Print(" "); |
| 893 parallel_move()->PrintTo(f); | 886 parallel_move()->PrintTo(f); |
| 894 } | 887 } |
| 895 } | 888 } |
| 896 | 889 |
| 897 | 890 |
| 898 void CatchBlockEntryInstr::PrintTo(BufferFormatter* f) const { | 891 void CatchBlockEntryInstr::PrintTo(BufferFormatter* f) const { |
| 899 f->Print("B%"Pd"[target catch try_idx %"Pd" catch_try_idx %"Pd"]", | 892 f->Print("B%"Pd"[target catch try_idx %"Pd" catch_try_idx %"Pd"]", |
| 900 block_id(), try_index(), catch_try_index()); | 893 block_id(), try_index(), catch_try_index()); |
| 901 if (HasParallelMove()) { | 894 if (HasParallelMove()) { |
| 902 f->Print(" "); | 895 f->Print("\n"); |
| 903 parallel_move()->PrintTo(f); | 896 parallel_move()->PrintTo(f); |
| 904 } | 897 } |
| 905 | 898 |
| 906 const GrowableArray<Definition*>& defns = initial_definitions_; | 899 const GrowableArray<Definition*>& defns = initial_definitions_; |
| 907 if (defns.length() > 0) { | 900 if (defns.length() > 0) { |
| 908 f->Print(" {"); | 901 f->Print(" {"); |
| 909 for (intptr_t i = 0; i < defns.length(); ++i) { | 902 for (intptr_t i = 0; i < defns.length(); ++i) { |
| 910 Definition* def = defns[i]; | 903 Definition* def = defns[i]; |
| 911 f->Print("\n "); | 904 f->Print("\n "); |
| 912 def->PrintTo(f); | 905 def->PrintTo(f); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 f->Print(" ["); | 963 f->Print(" ["); |
| 971 locations_[i].PrintTo(f); | 964 locations_[i].PrintTo(f); |
| 972 f->Print("]"); | 965 f->Print("]"); |
| 973 } | 966 } |
| 974 } | 967 } |
| 975 f->Print(" }"); | 968 f->Print(" }"); |
| 976 if (outer_ != NULL) outer_->PrintTo(f); | 969 if (outer_ != NULL) outer_->PrintTo(f); |
| 977 } | 970 } |
| 978 | 971 |
| 979 } // namespace dart | 972 } // namespace dart |
| OLD | NEW |