Chromium Code Reviews| Index: runtime/vm/flow_graph_allocator.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_allocator.cc (revision 24096) |
| +++ runtime/vm/flow_graph_allocator.cc (working copy) |
| @@ -60,6 +60,12 @@ |
| } |
| +static intptr_t NextInstructionPos(intptr_t pos) { |
| + ASSERT(IsInstructionStartPosition(pos)); |
| + return pos + 2; |
| +} |
| + |
| + |
| FlowGraphAllocator::FlowGraphAllocator(const FlowGraph& flow_graph) |
| : flow_graph_(flow_graph), |
| reaching_defs_(flow_graph), |
| @@ -512,6 +518,15 @@ |
| range->DefineAt(catch_entry->start_pos()); // Defined at block entry. |
| ProcessInitialDefinition(defn, range, catch_entry); |
| } |
| + // Block the two registers used by CatchEntryInstr from the block start to |
| + // until the end of the instruction so that they are preserved. |
| + intptr_t start = catch_entry->start_pos(); |
| + BlockLocation(Location::RegisterLocation(kExceptionObjectReg), |
| + start, |
| + ToInstructionEnd(NextInstructionPos(start))); |
| + BlockLocation(Location::RegisterLocation(kStackTraceObjectReg), |
| + start, |
| + ToInstructionEnd(NextInstructionPos(start))); |
|
Vyacheslav Egorov (Google)
2013/06/17 15:11:39
Assert that the next instruction is actually Catch
Florian Schneider
2013/06/17 17:35:35
Done.
|
| } |
| } |