Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 22590002: Fix bug with optimized try-catch on ARM/MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: added cleanup of CatchEntry Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 25871)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -2057,16 +2057,22 @@
}
-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_);
+ if (HasParallelMove()) {
+ compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
+ }
+
// Restore RSP from RBP as we are coming from a throw and the code for
// popping arguments has not been run.
const intptr_t fp_sp_dist =
@@ -2074,8 +2080,8 @@
ASSERT(fp_sp_dist <= 0);
__ leaq(RSP, Address(RBP, 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.
__ movq(Address(RBP, exception_var().index() * kWordSize),
kExceptionObjectReg);
__ movq(Address(RBP, stacktrace_var().index() * kWordSize),

Powered by Google App Engine
This is Rietveld 408576698