Index: runtime/vm/intermediate_language_mips.cc |
=================================================================== |
--- runtime/vm/intermediate_language_mips.cc (revision 25871) |
+++ runtime/vm/intermediate_language_mips.cc (working copy) |
@@ -2126,16 +2126,29 @@ |
} |
-LocationSummary* CatchEntryInstr::MakeLocationSummary() const { |
- return LocationSummary::Make(0, |
- Location::NoLocation(), |
- LocationSummary::kNoCall); |
+LocationSummary* CatchBlockEntryInstr::MakeLocationSummary() const { |
+ UNREACHABLE(); |
+ return NULL; |
} |
-// Restore stack and initialize the two exception variables: |
-// exception and stack trace variables. |
-void CatchEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
+void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
+ __ Bind(compiler->GetJumpLabel(this)); |
+ compiler->AddExceptionHandler(catch_try_index(), |
+ try_index(), |
+ compiler->assembler()->CodeSize(), |
+ catch_handler_types_); |
+ // Restore pool pointer. |
+ __ GetNextPC(CMPRES, TMP); |
+ const intptr_t object_pool_pc_dist = |
+ Instructions::HeaderSize() - Instructions::object_pool_offset() + |
+ compiler->assembler()->CodeSize() - 1 * Instr::kInstrSize; |
+ __ LoadFromOffset(PP, CMPRES, -object_pool_pc_dist); |
+ |
+ if (HasParallelMove()) { |
+ compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
+ } |
+ |
// Restore SP from FP as we are coming from a throw and the code for |
// popping arguments has not been run. |
const intptr_t fp_sp_dist = |
@@ -2143,22 +2156,12 @@ |
ASSERT(fp_sp_dist <= 0); |
__ AddImmediate(SP, FP, fp_sp_dist); |
- ASSERT(!exception_var().is_captured()); |
- ASSERT(!stacktrace_var().is_captured()); |
- |
+ // Restore stack and initialize the two exception variables: |
+ // exception and stack trace variables. |
__ sw(kExceptionObjectReg, |
Address(FP, exception_var().index() * kWordSize)); |
__ sw(kStackTraceObjectReg, |
Address(FP, stacktrace_var().index() * kWordSize)); |
- |
- __ GetNextPC(CMPRES, TMP); |
- |
- // Calculate offset of pool pointer from the PC. |
- const intptr_t object_pool_pc_dist = |
- Instructions::HeaderSize() - Instructions::object_pool_offset() + |
- compiler->assembler()->CodeSize() - 1 * Instr::kInstrSize; |
- |
- __ LoadFromOffset(PP, CMPRES, -object_pool_pc_dist); |
} |