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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 653073002: Fix bug with captured parameters and optimized try-catch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 41095)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -3755,6 +3755,12 @@
Type::ZoneHandle(I, Type::DynamicType())); // Type.
temp_local->set_index(param_frame_index);
+ // Mark this local as captured parameter so that the optimizer
+ // correctly handles these when compiling try-catch: Captured
+ // parameters are not in the stack environment, therefore they
+ // must be skipped when emitting sync-code in try-blocks.
+ temp_local->set_is_captured_parameter(true);
+
// Copy parameter from local frame to current context.
Value* load = Bind(BuildLoadLocal(*temp_local));
Do(BuildStoreLocal(parameter, load));
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698