| 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 #ifndef VM_LOCATIONS_H_ | 5 #ifndef VM_LOCATIONS_H_ |
| 6 #define VM_LOCATIONS_H_ | 6 #define VM_LOCATIONS_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/bitfield.h" | 10 #include "vm/bitfield.h" |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 } | 391 } |
| 392 | 392 |
| 393 class KindField : public BitField<uword, Kind, 0, kBitsForKind> {}; | 393 class KindField : public BitField<uword, Kind, 0, kBitsForKind> {}; |
| 394 class PayloadField : | 394 class PayloadField : |
| 395 public BitField<uword, uword, kBitsForKind, kBitsForPayload> {}; | 395 public BitField<uword, uword, kBitsForKind, kBitsForPayload> {}; |
| 396 | 396 |
| 397 // Layout for kUnallocated locations payload. | 397 // Layout for kUnallocated locations payload. |
| 398 typedef BitField<uword, Policy, 0, 3> PolicyField; | 398 typedef BitField<uword, Policy, 0, 3> PolicyField; |
| 399 | 399 |
| 400 // Layout for stack slots. | 400 // Layout for stack slots. |
| 401 #if defined(ARCH_IS_64_BIT) |
| 402 static const intptr_t kBitsForBaseReg = 6; |
| 403 #else |
| 401 static const intptr_t kBitsForBaseReg = 5; | 404 static const intptr_t kBitsForBaseReg = 5; |
| 405 #endif |
| 402 static const intptr_t kBitsForStackIndex = kBitsForPayload - kBitsForBaseReg; | 406 static const intptr_t kBitsForStackIndex = kBitsForPayload - kBitsForBaseReg; |
| 403 class StackSlotBaseField : | 407 class StackSlotBaseField : |
| 404 public BitField<uword, Register, 0, kBitsForBaseReg> {}; | 408 public BitField<uword, Register, 0, kBitsForBaseReg> {}; |
| 405 class StackIndexField : | 409 class StackIndexField : |
| 406 public BitField<uword, intptr_t, kBitsForBaseReg, kBitsForStackIndex> {}; | 410 public BitField<uword, intptr_t, kBitsForBaseReg, kBitsForStackIndex> {}; |
| 407 COMPILE_ASSERT(1 << kBitsForBaseReg >= kNumberOfCpuRegisters); | 411 COMPILE_ASSERT(1 << kBitsForBaseReg >= kNumberOfCpuRegisters); |
| 408 | 412 |
| 409 static const intptr_t kStackIndexBias = | 413 static const intptr_t kStackIndexBias = |
| 410 static_cast<intptr_t>(1) << (kBitsForStackIndex - 1); | 414 static_cast<intptr_t>(1) << (kBitsForStackIndex - 1); |
| 411 | 415 |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 | 721 |
| 718 #if defined(DEBUG) | 722 #if defined(DEBUG) |
| 719 intptr_t writable_inputs_; | 723 intptr_t writable_inputs_; |
| 720 #endif | 724 #endif |
| 721 }; | 725 }; |
| 722 | 726 |
| 723 | 727 |
| 724 } // namespace dart | 728 } // namespace dart |
| 725 | 729 |
| 726 #endif // VM_LOCATIONS_H_ | 730 #endif // VM_LOCATIONS_H_ |
| OLD | NEW |