OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/locations.h" | 5 #include "vm/locations.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/il_printer.h" | 8 #include "vm/il_printer.h" |
9 #include "vm/log.h" | 9 #include "vm/log.h" |
10 #include "vm/stack_frame.h" | 10 #include "vm/stack_frame.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 } else { | 188 } else { |
189 ASSERT(IsPairLocation()); | 189 ASSERT(IsPairLocation()); |
190 return "2P"; | 190 return "2P"; |
191 } | 191 } |
192 } | 192 } |
193 return "?"; | 193 return "?"; |
194 } | 194 } |
195 | 195 |
196 | 196 |
197 void Location::PrintTo(BufferFormatter* f) const { | 197 void Location::PrintTo(BufferFormatter* f) const { |
| 198 if (!FLAG_support_il_printer) { |
| 199 return; |
| 200 } |
198 if (kind() == kStackSlot) { | 201 if (kind() == kStackSlot) { |
199 f->Print("S%+" Pd "", stack_index()); | 202 f->Print("S%+" Pd "", stack_index()); |
200 } else if (kind() == kDoubleStackSlot) { | 203 } else if (kind() == kDoubleStackSlot) { |
201 f->Print("DS%+" Pd "", stack_index()); | 204 f->Print("DS%+" Pd "", stack_index()); |
202 } else if (kind() == kQuadStackSlot) { | 205 } else if (kind() == kQuadStackSlot) { |
203 f->Print("QS%+" Pd "", stack_index()); | 206 f->Print("QS%+" Pd "", stack_index()); |
204 } else if (IsPairLocation()) { | 207 } else if (IsPairLocation()) { |
205 f->Print("("); | 208 f->Print("("); |
206 AsPairLocation()->At(0).PrintTo(f); | 209 AsPairLocation()->At(0).PrintTo(f); |
207 f->Print(", "); | 210 f->Print(", "); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 } else if (IsInvalid() && def->IsMaterializeObject()) { | 293 } else if (IsInvalid() && def->IsMaterializeObject()) { |
291 def->AsMaterializeObject()->RemapRegisters(cpu_reg_slots, fpu_reg_slots); | 294 def->AsMaterializeObject()->RemapRegisters(cpu_reg_slots, fpu_reg_slots); |
292 return *this; | 295 return *this; |
293 } | 296 } |
294 | 297 |
295 return *this; | 298 return *this; |
296 } | 299 } |
297 | 300 |
298 | 301 |
299 void LocationSummary::PrintTo(BufferFormatter* f) const { | 302 void LocationSummary::PrintTo(BufferFormatter* f) const { |
| 303 if (!FLAG_support_il_printer) { |
| 304 return; |
| 305 } |
300 if (input_count() > 0) { | 306 if (input_count() > 0) { |
301 f->Print(" ("); | 307 f->Print(" ("); |
302 for (intptr_t i = 0; i < input_count(); i++) { | 308 for (intptr_t i = 0; i < input_count(); i++) { |
303 if (i != 0) f->Print(", "); | 309 if (i != 0) f->Print(", "); |
304 in(i).PrintTo(f); | 310 in(i).PrintTo(f); |
305 } | 311 } |
306 f->Print(")"); | 312 f->Print(")"); |
307 } | 313 } |
308 | 314 |
309 if (temp_count() > 0) { | 315 if (temp_count() > 0) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 // with the right representation because register allocator does not know | 353 // with the right representation because register allocator does not know |
348 // how they are used within the instruction template. | 354 // how they are used within the instruction template. |
349 ASSERT(in(i).IsMachineRegister()); | 355 ASSERT(in(i).IsMachineRegister()); |
350 ASSERT(live_registers()->Contains(in(i))); | 356 ASSERT(live_registers()->Contains(in(i))); |
351 } | 357 } |
352 } | 358 } |
353 } | 359 } |
354 #endif | 360 #endif |
355 | 361 |
356 } // namespace dart | 362 } // namespace dart |
OLD | NEW |