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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 14682020: Optimize functions containing try-catch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed Srdjan's comments Created 7 years, 7 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/flow_graph_type_propagator.cc
===================================================================
--- runtime/vm/flow_graph_type_propagator.cc (revision 22436)
+++ runtime/vm/flow_graph_type_propagator.cc (working copy)
@@ -668,8 +668,11 @@
// always be wrongly eliminated.
// However there are parameters that are known to match their declared type:
// for example receiver and construction phase.
- const Function& function = block_->parsed_function().function();
- LocalScope* scope = block_->parsed_function().node_sequence()->scope();
+ GraphEntryInstr* graph_entry = block_->AsGraphEntry();
+ if (graph_entry == NULL) return CompileType::Dynamic();
Kevin Millikin (Google) 2013/05/08 11:42:00 Comment that this is for the parameters at a catch
Florian Schneider 2013/05/08 17:10:55 Done.
+
+ const Function& function = graph_entry->parsed_function().function();
+ LocalScope* scope = graph_entry->parsed_function().node_sequence()->scope();
const AbstractType& type = scope->VariableAt(index())->type();
// Parameter is the constructor phase.

Powered by Google App Engine
This is Rietveld 408576698