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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 11341014: Remove --reject_named_argument_as_positional flag from the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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_compiler_ia32.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
===================================================================
--- runtime/vm/flow_graph_compiler_x64.cc (revision 14213)
+++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
@@ -20,7 +20,6 @@
DECLARE_FLAG(bool, print_ast);
DECLARE_FLAG(bool, print_scopes);
-DECLARE_FLAG(bool, reject_named_argument_as_positional);
DECLARE_FLAG(bool, trace_functions);
DECLARE_FLAG(bool, use_sse41);
DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
@@ -698,11 +697,6 @@
__ j(POSITIVE, &loop, Assembler::kNearJump);
// Copy or initialize optional named arguments.
-
- if (!FLAG_reject_named_argument_as_positional) {
- // Treat optional positional parameters as optional named parameters.
- num_opt_named_params += num_opt_pos_params;
- }
const Immediate raw_null =
Immediate(reinterpret_cast<intptr_t>(Object::null()));
Label all_arguments_processed;
@@ -738,13 +732,6 @@
for (int i = 0; i < num_opt_named_params; i++) {
Label load_default_value, assign_optional_parameter, next_parameter;
const int param_pos = opt_param_position[i];
- if (!FLAG_reject_named_argument_as_positional) {
- // Handle this optional parameter only if k or fewer positional
- // arguments have been passed, where k is the position of this optional
- // parameter in the formal parameter list.
- __ cmpq(RCX, Immediate(param_pos));
- __ j(GREATER, &next_parameter, Assembler::kNearJump);
- }
// Check if this named parameter was passed in.
__ movq(RAX, Address(RDI, 0)); // Load RAX with the name of the argument.
ASSERT(opt_param[i]->name().IsSymbol());
@@ -781,7 +768,6 @@
__ cmpq(Address(RDI, 0), raw_null);
__ j(EQUAL, &all_arguments_processed, Assembler::kNearJump);
} else if (num_opt_pos_params > 0) {
- ASSERT(FLAG_reject_named_argument_as_positional);
// Number of positional args is the second Smi in descriptor array (R10).
__ movq(RCX, FieldAddress(R10, Array::data_offset() + (1 * kWordSize)));
__ SmiUntag(RCX);
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698