| OLD | NEW |
| 1 // Copyright (c) 2012, 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" |
| 11 | 11 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 (ParsedFunction::kFirstLocalSlotIndex - index) * kWordSize; | 96 (ParsedFunction::kFirstLocalSlotIndex - index) * kWordSize; |
| 97 return Address(FPREG, offset); | 97 return Address(FPREG, offset); |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 | 100 |
| 101 | 101 |
| 102 const char* Location::Name() const { | 102 const char* Location::Name() const { |
| 103 switch (kind()) { | 103 switch (kind()) { |
| 104 case kInvalid: return "?"; | 104 case kInvalid: return "?"; |
| 105 case kRegister: return Assembler::RegisterName(reg()); | 105 case kRegister: return Assembler::RegisterName(reg()); |
| 106 case kXmmRegister: return Assembler::XmmRegisterName(xmm_reg()); | 106 case kFpuRegister: return Assembler::FpuRegisterName(fpu_reg()); |
| 107 case kStackSlot: return "S"; | 107 case kStackSlot: return "S"; |
| 108 case kDoubleStackSlot: return "DS"; | 108 case kDoubleStackSlot: return "DS"; |
| 109 case kUnallocated: | 109 case kUnallocated: |
| 110 switch (policy()) { | 110 switch (policy()) { |
| 111 case kAny: | 111 case kAny: |
| 112 return "A"; | 112 return "A"; |
| 113 case kPrefersRegister: | 113 case kPrefersRegister: |
| 114 return "P"; | 114 return "P"; |
| 115 case kRequiresRegister: | 115 case kRequiresRegister: |
| 116 return "R"; | 116 return "R"; |
| 117 case kRequiresXmmRegister: | 117 case kRequiresFpuRegister: |
| 118 return "DR"; | 118 return "DR"; |
| 119 case kWritableRegister: | 119 case kWritableRegister: |
| 120 return "WR"; | 120 return "WR"; |
| 121 case kSameAsFirstInput: | 121 case kSameAsFirstInput: |
| 122 return "0"; | 122 return "0"; |
| 123 } | 123 } |
| 124 UNREACHABLE(); | 124 UNREACHABLE(); |
| 125 default: | 125 default: |
| 126 ASSERT(IsConstant()); | 126 ASSERT(IsConstant()); |
| 127 return "C"; | 127 return "C"; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 if (!out().IsInvalid()) { | 172 if (!out().IsInvalid()) { |
| 173 f->Print(" => "); | 173 f->Print(" => "); |
| 174 out().PrintTo(f); | 174 out().PrintTo(f); |
| 175 } | 175 } |
| 176 | 176 |
| 177 if (always_calls()) f->Print(" C"); | 177 if (always_calls()) f->Print(" C"); |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace dart | 180 } // namespace dart |
| OLD | NEW |