| 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 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 value()->PrintTo(f); | 164 value()->PrintTo(f); |
| 165 f->Print(", lvl: %d", context_level()); | 165 f->Print(", lvl: %d", context_level()); |
| 166 } | 166 } |
| 167 | 167 |
| 168 | 168 |
| 169 void NativeCallComp::PrintOperandsTo(BufferFormatter* f) const { | 169 void NativeCallComp::PrintOperandsTo(BufferFormatter* f) const { |
| 170 f->Print("%s", native_name().ToCString()); | 170 f->Print("%s", native_name().ToCString()); |
| 171 } | 171 } |
| 172 | 172 |
| 173 | 173 |
| 174 static void PrintClassIds(BufferFormatter* f, | |
| 175 const ZoneGrowableArray<intptr_t>& class_ids) { | |
| 176 f->Print(" ["); | |
| 177 for (intptr_t i = 0; i < class_ids.length(); i++) { | |
| 178 if (i != 0) f->Print(", "); | |
| 179 f->Print("%d", class_ids[i]); | |
| 180 } | |
| 181 f->Print("]"); | |
| 182 } | |
| 183 | |
| 184 | |
| 185 void LoadInstanceFieldComp::PrintOperandsTo(BufferFormatter* f) const { | 174 void LoadInstanceFieldComp::PrintOperandsTo(BufferFormatter* f) const { |
| 186 f->Print("%s, ", String::Handle(field().name()).ToCString()); | 175 f->Print("%s, ", String::Handle(field().name()).ToCString()); |
| 187 instance()->PrintTo(f); | 176 instance()->PrintTo(f); |
| 188 if (class_ids() != NULL) { | |
| 189 PrintClassIds(f, *class_ids()); | |
| 190 } | |
| 191 } | 177 } |
| 192 | 178 |
| 193 | 179 |
| 194 void StoreInstanceFieldComp::PrintOperandsTo(BufferFormatter* f) const { | 180 void StoreInstanceFieldComp::PrintOperandsTo(BufferFormatter* f) const { |
| 195 f->Print("%s, ", String::Handle(field().name()).ToCString()); | 181 f->Print("%s, ", String::Handle(field().name()).ToCString()); |
| 196 instance()->PrintTo(f); | 182 instance()->PrintTo(f); |
| 197 f->Print(", "); | 183 f->Print(", "); |
| 198 value()->PrintTo(f); | 184 value()->PrintTo(f); |
| 199 if (class_ids() != NULL) { | |
| 200 PrintClassIds(f, *class_ids()); | |
| 201 } | |
| 202 } | 185 } |
| 203 | 186 |
| 204 | 187 |
| 205 void LoadStaticFieldComp::PrintOperandsTo(BufferFormatter* f) const { | 188 void LoadStaticFieldComp::PrintOperandsTo(BufferFormatter* f) const { |
| 206 f->Print("%s", String::Handle(field().name()).ToCString()); | 189 f->Print("%s", String::Handle(field().name()).ToCString()); |
| 207 } | 190 } |
| 208 | 191 |
| 209 | 192 |
| 210 void StoreStaticFieldComp::PrintOperandsTo(BufferFormatter* f) const { | 193 void StoreStaticFieldComp::PrintOperandsTo(BufferFormatter* f) const { |
| 211 f->Print("%s, ", String::Handle(field().name()).ToCString()); | 194 f->Print("%s, ", String::Handle(field().name()).ToCString()); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 f->Print("_ %s ", DebugName()); | 630 f->Print("_ %s ", DebugName()); |
| 648 f->Print("if "); | 631 f->Print("if "); |
| 649 value()->PrintTo(f); | 632 value()->PrintTo(f); |
| 650 f->Print(" goto (B%d, B%d)", | 633 f->Print(" goto (B%d, B%d)", |
| 651 true_successor()->block_id(), | 634 true_successor()->block_id(), |
| 652 false_successor()->block_id()); | 635 false_successor()->block_id()); |
| 653 } | 636 } |
| 654 | 637 |
| 655 | 638 |
| 656 } // namespace dart | 639 } // namespace dart |
| OLD | NEW |