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 5a22e4bd4f3354fbf45f5028b41d6e23db63cf79..cbf0205bf38eb8647462b3b1565a57ca9c4e5f83 100644 |
| --- a/runtime/vm/flow_graph_compiler.cc |
| +++ b/runtime/vm/flow_graph_compiler.cc |
| @@ -847,12 +847,17 @@ void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs, |
| // with the same instruction (and same location summary) sees a bitmap that |
| // is larger that StackSize(). It will never be larger than StackSize() + |
| // live_registers_size. |
| - ASSERT(bitmap->Length() <= (spill_area_size + live_registers_size)); |
| // The first safepoint will grow the bitmap to be the size of |
| // spill_area_size but the second safepoint will truncate the bitmap and |
| // append the live registers to it again. The bitmap produced by both calls |
| // will be the same. |
| - bitmap->SetLength(spill_area_size); |
|
zra
2016/10/04 15:22:48
Don't you still need this line in non-DBC?
Florian Schneider
2016/10/04 17:01:04
Oops, yes of course. Thanks!
|
| +#if !defined(TARGET_ARCH_DBC) |
| + ASSERT(bitmap->Length() <= (spill_area_size + live_registers_size)); |
| +#else |
| + if (bitmap->Length() <= (spill_area_size + live_registers_size)) { |
| + bitmap->SetLength(Utils::Maximum(bitmap->Length(), spill_area_size)); |
| + } |
| +#endif |
| // Mark the bits in the stack map in the same order we push registers in |
| // slow path code (see FlowGraphCompiler::SaveLiveRegisters). |