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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 f->Print("%s ", DebugName()); | 970 f->Print("%s ", DebugName()); |
971 for (intptr_t i = 0; i < moves_.length(); i++) { | 971 for (intptr_t i = 0; i < moves_.length(); i++) { |
972 if (i != 0) f->Print(", "); | 972 if (i != 0) f->Print(", "); |
973 moves_[i]->dest().PrintTo(f); | 973 moves_[i]->dest().PrintTo(f); |
974 f->Print(" <- "); | 974 f->Print(" <- "); |
975 moves_[i]->src().PrintTo(f); | 975 moves_[i]->src().PrintTo(f); |
976 } | 976 } |
977 } | 977 } |
978 | 978 |
979 | 979 |
| 980 void StringCharCodeInstr::PrintTo(BufferFormatter* f) const { |
| 981 PrintUse(f, *this); |
| 982 if (is_used()) { |
| 983 if (HasSSATemp() || (temp_index() != -1)) f->Print(" <- "); |
| 984 } |
| 985 f->Print("%s:%" Pd "(", |
| 986 (kind() == kToCharCode) ? "StringToCharCode" : "StringFromCharCode", |
| 987 GetDeoptId()); |
| 988 PrintOperandsTo(f); |
| 989 f->Print(")"); |
| 990 if (range_ != NULL) { |
| 991 f->Print(" "); |
| 992 range_->PrintTo(f); |
| 993 } |
| 994 |
| 995 if (type_ != NULL) { |
| 996 f->Print(" "); |
| 997 type_->PrintTo(f); |
| 998 } |
| 999 } |
| 1000 |
| 1001 |
980 void Environment::PrintTo(BufferFormatter* f) const { | 1002 void Environment::PrintTo(BufferFormatter* f) const { |
981 f->Print(" env={ "); | 1003 f->Print(" env={ "); |
982 int arg_count = 0; | 1004 int arg_count = 0; |
983 for (intptr_t i = 0; i < values_.length(); ++i) { | 1005 for (intptr_t i = 0; i < values_.length(); ++i) { |
984 if (i > 0) f->Print(", "); | 1006 if (i > 0) f->Print(", "); |
985 if (values_[i]->definition()->IsPushArgument()) { | 1007 if (values_[i]->definition()->IsPushArgument()) { |
986 f->Print("a%d", arg_count++); | 1008 f->Print("a%d", arg_count++); |
987 } else { | 1009 } else { |
988 values_[i]->PrintTo(f); | 1010 values_[i]->PrintTo(f); |
989 } | 1011 } |
990 if ((locations_ != NULL) && !locations_[i].IsInvalid()) { | 1012 if ((locations_ != NULL) && !locations_[i].IsInvalid()) { |
991 f->Print(" ["); | 1013 f->Print(" ["); |
992 locations_[i].PrintTo(f); | 1014 locations_[i].PrintTo(f); |
993 f->Print("]"); | 1015 f->Print("]"); |
994 } | 1016 } |
995 } | 1017 } |
996 f->Print(" }"); | 1018 f->Print(" }"); |
997 if (outer_ != NULL) outer_->PrintTo(f); | 1019 if (outer_ != NULL) outer_->PrintTo(f); |
998 } | 1020 } |
999 | 1021 |
1000 } // namespace dart | 1022 } // namespace dart |
OLD | NEW |