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 264b623ade62d524a66d1fd3562d0a00c9cc2d39..dd03a01ab3582295651d5797f94113efdc9cda1a 100644 |
| --- a/runtime/vm/flow_graph_compiler.cc |
| +++ b/runtime/vm/flow_graph_compiler.cc |
| @@ -237,8 +237,24 @@ void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) { |
| if (is_optimizing()) { |
| BitmapBuilder* bitmap = locs->stack_bitmap(); |
| ASSERT(bitmap != NULL); |
| + ASSERT(bitmap->Length() <= StackSize()); |
| + // Pad the bitmap out to describe all the spill slots. |
| bitmap->SetLength(StackSize()); |
| - stackmap_table_builder_->AddEntry(assembler()->CodeSize(), bitmap); |
| + |
| + // Slow path code can have registers at the safepoint. |
| + if (!locs->always_calls()) { |
| + for (intptr_t i = 0; i < kNumberOfCpuRegisters; ++i) { |
|
Vyacheslav Egorov (Google)
2012/08/27 14:54:51
This is tightly couple with the way we push regist
Kevin Millikin (Google)
2012/08/29 12:40:41
Done.
|
| + Register reg = static_cast<Register>(i); |
| + if (locs->live_registers()->ContainsRegister(reg)) { |
| + bitmap->Set(bitmap->Length(), true); |
| + } |
| + } |
|
Vyacheslav Egorov (Google)
2012/08/27 14:54:51
Also please handle XMMRegisters here and remove a
|
| + } |
| + |
| + intptr_t register_count = bitmap->Length() - StackSize(); |
| + stackmap_table_builder_->AddEntry(assembler()->CodeSize(), |
| + bitmap, |
| + register_count); |
| } |
| } |