Chromium Code Reviews| Index: runtime/vm/flow_graph_compiler.cc |
| diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc |
| index 6b4f67d46937bc78ba56db36a2463267a6c9c232..1416d951350a8e1f7e91b0cba785084943ae83ce 100644 |
| --- a/runtime/vm/flow_graph_compiler.cc |
| +++ b/runtime/vm/flow_graph_compiler.cc |
| @@ -455,10 +455,15 @@ void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id, |
| // and FlowGraphCompiler::SlowPathEnvironmentFor. |
| void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) { |
| if (is_optimizing()) { |
| + RegisterSet* registers = locs->live_registers(); |
| + ASSERT(registers != NULL); |
| + const intptr_t kFpuRegisterSpillFactor = |
| + kFpuRegisterSize / kWordSize; |
| + intptr_t live_registers_size = registers->CpuRegisterCount() + |
|
srdjan
2014/02/05 22:20:09
const intptr_t
Cutch
2014/02/05 23:16:02
Done.
|
| + (registers->FpuRegisterCount() * kFpuRegisterSpillFactor); |
| BitmapBuilder* bitmap = locs->stack_bitmap(); |
| ASSERT(bitmap != NULL); |
| - ASSERT(bitmap->Length() <= StackSize()); |
| - // Pad the bitmap out to describe all the spill slots. |
| + ASSERT(bitmap->Length() <= (StackSize() + live_registers_size)); |
| bitmap->SetLength(StackSize()); |
| // Mark the bits in the stack map in the same order we push registers in |
| @@ -475,8 +480,6 @@ void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) { |
| // |
| // FPU registers have the highest register number at the highest |
| // address (i.e., first in the stackmap). |
| - const intptr_t kFpuRegisterSpillFactor = |
| - kFpuRegisterSize / kWordSize; |
| for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) { |
| FpuRegister reg = static_cast<FpuRegister>(i); |
| if (regs->ContainsFpuRegister(reg)) { |