| Index: src/compiler/instruction.h
|
| diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
|
| index 8a6006a424dea35fb8e3a55929f3b9484ec3bf06..542ff56f7503319f954f31c08ff991eb071b536f 100644
|
| --- a/src/compiler/instruction.h
|
| +++ b/src/compiler/instruction.h
|
| @@ -120,6 +120,7 @@ class UnallocatedOperand : public InstructionOperand {
|
|
|
| explicit UnallocatedOperand(ExtendedPolicy policy)
|
| : InstructionOperand(UNALLOCATED, 0) {
|
| + value_ |= VirtualRegisterField::encode(kInvalidVirtualRegister);
|
| value_ |= BasicPolicyField::encode(EXTENDED_POLICY);
|
| value_ |= ExtendedPolicyField::encode(policy);
|
| value_ |= LifetimeField::encode(USED_AT_END);
|
| @@ -128,6 +129,7 @@ class UnallocatedOperand : public InstructionOperand {
|
| UnallocatedOperand(BasicPolicy policy, int index)
|
| : InstructionOperand(UNALLOCATED, 0) {
|
| DCHECK(policy == FIXED_SLOT);
|
| + value_ |= VirtualRegisterField::encode(kInvalidVirtualRegister);
|
| value_ |= BasicPolicyField::encode(policy);
|
| value_ |= index << FixedSlotIndexField::kShift;
|
| DCHECK(this->fixed_slot_index() == index);
|
| @@ -136,6 +138,7 @@ class UnallocatedOperand : public InstructionOperand {
|
| UnallocatedOperand(ExtendedPolicy policy, int index)
|
| : InstructionOperand(UNALLOCATED, 0) {
|
| DCHECK(policy == FIXED_REGISTER || policy == FIXED_DOUBLE_REGISTER);
|
| + value_ |= VirtualRegisterField::encode(kInvalidVirtualRegister);
|
| value_ |= BasicPolicyField::encode(EXTENDED_POLICY);
|
| value_ |= ExtendedPolicyField::encode(policy);
|
| value_ |= LifetimeField::encode(USED_AT_END);
|
| @@ -144,6 +147,7 @@ class UnallocatedOperand : public InstructionOperand {
|
|
|
| UnallocatedOperand(ExtendedPolicy policy, Lifetime lifetime)
|
| : InstructionOperand(UNALLOCATED, 0) {
|
| + value_ |= VirtualRegisterField::encode(kInvalidVirtualRegister);
|
| value_ |= BasicPolicyField::encode(EXTENDED_POLICY);
|
| value_ |= ExtendedPolicyField::encode(policy);
|
| value_ |= LifetimeField::encode(lifetime);
|
| @@ -198,7 +202,8 @@ class UnallocatedOperand : public InstructionOperand {
|
| class LifetimeField : public BitField<Lifetime, 25, 1> {};
|
| class FixedRegisterField : public BitField<int, 26, 6> {};
|
|
|
| - static const int kMaxVirtualRegisters = VirtualRegisterField::kMax + 1;
|
| + static const int kInvalidVirtualRegister = VirtualRegisterField::kMax;
|
| + static const int kMaxVirtualRegisters = VirtualRegisterField::kMax;
|
| static const int kFixedSlotIndexWidth = FixedSlotIndexField::kSize;
|
| static const int kMaxFixedSlotIndex = (1 << (kFixedSlotIndexWidth - 1)) - 1;
|
| static const int kMinFixedSlotIndex = -(1 << (kFixedSlotIndexWidth - 1));
|
| @@ -586,7 +591,11 @@ class GapInstruction : public Instruction {
|
| return parallel_moves_[pos];
|
| }
|
|
|
| - ParallelMove* GetParallelMove(InnerPosition pos) const {
|
| + ParallelMove* GetParallelMove(InnerPosition pos) {
|
| + return parallel_moves_[pos];
|
| + }
|
| +
|
| + const ParallelMove* GetParallelMove(InnerPosition pos) const {
|
| return parallel_moves_[pos];
|
| }
|
|
|
| @@ -634,6 +643,11 @@ class BlockStartInstruction FINAL : public GapInstruction {
|
| return static_cast<BlockStartInstruction*>(instr);
|
| }
|
|
|
| + static const BlockStartInstruction* cast(const Instruction* instr) {
|
| + DCHECK(instr->IsBlockStart());
|
| + return static_cast<const BlockStartInstruction*>(instr);
|
| + }
|
| +
|
| private:
|
| BlockStartInstruction() : GapInstruction(kBlockStartInstruction) {}
|
| };
|
|
|