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

Unified Diff: runtime/vm/flow_graph_compiler.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
Index: runtime/vm/flow_graph_compiler.cc
===================================================================
--- runtime/vm/flow_graph_compiler.cc (revision 35546)
+++ runtime/vm/flow_graph_compiler.cc (working copy)
@@ -472,12 +472,17 @@
void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id,
- intptr_t token_pos) {
+ intptr_t token_pos,
+ intptr_t input_count) {
ASSERT(is_optimizing());
+ Environment* env = pending_deoptimization_env_;
+ if (input_count > 0) {
+ env = env->DeepCopy(env->Length() - input_count);
+ }
CompilerDeoptInfo* info =
new CompilerDeoptInfo(deopt_id,
ICData::kDeoptAtCall,
- pending_deoptimization_env_);
+ env);
info->set_pc_offset(assembler()->CodeSize());
deopt_infos_.Add(info);
}

Powered by Google App Engine
This is Rietveld 408576698