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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 10825236: Replace deopt stubs location/register shuffling with using deopt-info. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« no previous file with comments | « runtime/vm/deopt_instructions.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
===================================================================
--- runtime/vm/flow_graph_compiler.cc (revision 10463)
+++ runtime/vm/flow_graph_compiler.cc (working copy)
@@ -31,11 +31,15 @@
RawDeoptInfo* DeoptimizationStub::CreateDeoptInfo(FlowGraphCompiler* compiler) {
if (deoptimization_env_ == NULL) return DeoptInfo::null();
+ const Function& function = compiler->parsed_function().function();
+ // For functions with optional arguments, all incoming are copied to local
+ // area below FP, deoptimization environment does not track them.
+ const intptr_t num_args = (function.num_optional_parameters() > 0) ?
+ 0 : function.num_fixed_parameters();
const intptr_t fixed_parameter_count =
deoptimization_env_->fixed_parameter_count();
- DeoptInfoBuilder builder(compiler->object_table(), fixed_parameter_count);
+ DeoptInfoBuilder builder(compiler->object_table(), num_args);
- const Function& function = compiler->parsed_function().function();
intptr_t slot_ix = 0;
builder.AddReturnAddress(function, deopt_id_, slot_ix++);
« no previous file with comments | « runtime/vm/deopt_instructions.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698