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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 10910119: Implement new optional parameters syntax in the vm (issue 4290). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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_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 12003)
+++ runtime/vm/flow_graph_compiler.cc (working copy)
@@ -50,8 +50,8 @@
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 num_args =
+ function.HasOptionalParameters() ? 0 : function.num_fixed_parameters();
const intptr_t fixed_parameter_count =
deoptimization_env_->fixed_parameter_count();
DeoptInfoBuilder builder(compiler->object_table(), num_args);
@@ -128,7 +128,7 @@
bool FlowGraphCompiler::IsLeaf() const {
return is_dart_leaf_ &&
!parsed_function_.function().IsClosureFunction() &&
- (parsed_function().copied_parameter_count() == 0);
+ (parsed_function().num_copied_params() == 0);
}
@@ -196,8 +196,8 @@
if (is_optimizing_) {
return block_order_[0]->AsGraphEntry()->spill_slot_count();
} else {
- return parsed_function_.stack_local_count() +
- parsed_function_.copied_parameter_count();
+ return parsed_function_.num_stack_locals() +
+ parsed_function_.num_copied_params();
}
}
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698