Chromium Code Reviews| Index: runtime/vm/deopt_instructions.h |
| diff --git a/runtime/vm/deopt_instructions.h b/runtime/vm/deopt_instructions.h |
| index 551d04302ba0761eea836b5496bb4b16cb785f36..23a5e970c614a6566aa28d6b6d14f4184447b18d 100644 |
| --- a/runtime/vm/deopt_instructions.h |
| +++ b/runtime/vm/deopt_instructions.h |
| @@ -58,21 +58,29 @@ class DeoptContext { |
| intptr_t RegisterValue(Register reg) const { |
| ASSERT(cpu_registers_ != NULL); |
| + ASSERT(reg >= 0); |
| + ASSERT(reg < kNumberOfCpuRegisters); |
|
srdjan
2014/05/21 17:12:49
I am OK merging these two ASSERTs into one (also f
|
| return cpu_registers_[reg]; |
| } |
| double FpuRegisterValue(FpuRegister reg) const { |
| ASSERT(fpu_registers_ != NULL); |
| + ASSERT(reg >= 0); |
| + ASSERT(reg < kNumberOfFpuRegisters); |
| return *reinterpret_cast<double*>(&fpu_registers_[reg]); |
| } |
| int64_t FpuRegisterValueAsInt64(FpuRegister reg) const { |
| ASSERT(fpu_registers_ != NULL); |
| + ASSERT(reg >= 0); |
| + ASSERT(reg < kNumberOfFpuRegisters); |
| return *reinterpret_cast<int64_t*>(&fpu_registers_[reg]); |
| } |
| simd128_value_t FpuRegisterValueAsSimd128(FpuRegister reg) const { |
| ASSERT(fpu_registers_ != NULL); |
| + ASSERT(reg >= 0); |
| + ASSERT(reg < kNumberOfFpuRegisters); |
| const float* address = reinterpret_cast<float*>(&fpu_registers_[reg]); |
| return simd128_value_t().readFrom(address); |
| } |
| @@ -216,16 +224,18 @@ class DeoptInstr : public ZoneAllocated { |
| kConstant, |
| kRegister, |
| kFpuRegister, |
| - kInt64FpuRegister, |
| + kInt64RegisterPair, |
| kFloat32x4FpuRegister, |
| kFloat64x2FpuRegister, |
| kInt32x4FpuRegister, |
| kStackSlot, |
| kDoubleStackSlot, |
| kInt64StackSlot, |
| + kInt64StackSlotPair, |
| kFloat32x4StackSlot, |
| kFloat64x2StackSlot, |
| kInt32x4StackSlot, |
| + kInt64StackSlotRegister, |
| kPcMarker, |
| kPp, |
| kCallerFp, |