| 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);
|
|
|