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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 265443002: VM: Explicitly load function and context before calling a closure. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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_builder.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_inliner.cc
===================================================================
--- runtime/vm/flow_graph_inliner.cc (revision 35546)
+++ runtime/vm/flow_graph_inliner.cc (working copy)
@@ -858,26 +858,9 @@
TimerScope timer(FLAG_compiler_stats,
&CompilerStats::graphinliner_subst_timer,
Isolate::Current());
-
- // For closure calls: Store context value.
FlowGraph* callee_graph = call_data->callee_graph;
TargetEntryInstr* callee_entry =
callee_graph->graph_entry()->normal_entry();
- ClosureCallInstr* closure_call = call_data->call->AsClosureCall();
- if (closure_call != NULL) {
- // TODO(fschneider): Avoid setting the context, if not needed.
- Definition* closure =
- closure_call->PushArgumentAt(0)->value()->definition();
- Definition* context = new LoadFieldInstr(new Value(closure),
- Closure::context_offset(),
- Type::ZoneHandle());
- context->set_ssa_temp_index(caller_graph()->alloc_ssa_temp_index());
- context->InsertAfter(callee_entry);
- StoreContextInstr* set_context =
- new StoreContextInstr(new Value(context));
- set_context->InsertAfter(context);
- }
-
// Plug result in the caller graph.
InlineExitCollector* exit_collector = call_data->exit_collector;
exit_collector->PrepareGraphs(callee_graph);
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698