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/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
10 #include "vm/flow_graph_compiler.h" | 10 #include "vm/flow_graph_compiler.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 const char* Location::ToCString() const { | 218 const char* Location::ToCString() const { |
219 char buffer[1024]; | 219 char buffer[1024]; |
220 BufferFormatter bf(buffer, 1024); | 220 BufferFormatter bf(buffer, 1024); |
221 PrintTo(&bf); | 221 PrintTo(&bf); |
222 return Thread::Current()->zone()->MakeCopyOfString(buffer); | 222 return Thread::Current()->zone()->MakeCopyOfString(buffer); |
223 } | 223 } |
224 | 224 |
225 | 225 |
226 void Location::Print() const { | 226 void Location::Print() const { |
227 if (kind() == kStackSlot) { | 227 if (kind() == kStackSlot) { |
228 ISL_Print("S%+" Pd "", stack_index()); | 228 THR_Print("S%+" Pd "", stack_index()); |
229 } else { | 229 } else { |
230 ISL_Print("%s", Name()); | 230 THR_Print("%s", Name()); |
231 } | 231 } |
232 } | 232 } |
233 | 233 |
234 | 234 |
235 Location Location::Copy() const { | 235 Location Location::Copy() const { |
236 if (IsPairLocation()) { | 236 if (IsPairLocation()) { |
237 PairLocation* pair = AsPairLocation(); | 237 PairLocation* pair = AsPairLocation(); |
238 ASSERT(!pair->At(0).IsPairLocation()); | 238 ASSERT(!pair->At(0).IsPairLocation()); |
239 ASSERT(!pair->At(1).IsPairLocation()); | 239 ASSERT(!pair->At(1).IsPairLocation()); |
240 return Location::Pair(pair->At(0).Copy(), pair->At(1).Copy()); | 240 return Location::Pair(pair->At(0).Copy(), pair->At(1).Copy()); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 // with the right representation because register allocator does not know | 349 // with the right representation because register allocator does not know |
350 // how they are used within the instruction template. | 350 // how they are used within the instruction template. |
351 ASSERT(in(i).IsMachineRegister()); | 351 ASSERT(in(i).IsMachineRegister()); |
352 ASSERT(live_registers()->Contains(in(i))); | 352 ASSERT(live_registers()->Contains(in(i))); |
353 } | 353 } |
354 } | 354 } |
355 } | 355 } |
356 #endif | 356 #endif |
357 | 357 |
358 } // namespace dart | 358 } // namespace dart |
OLD | NEW |