| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 } | 614 } |
| 615 | 615 |
| 616 | 616 |
| 617 void FlowGraphCompiler::CopyParameters() { | 617 void FlowGraphCompiler::CopyParameters() { |
| 618 __ Comment("Copy parameters"); | 618 __ Comment("Copy parameters"); |
| 619 const Function& function = parsed_function().function(); | 619 const Function& function = parsed_function().function(); |
| 620 const bool is_native_instance_closure = | 620 const bool is_native_instance_closure = |
| 621 function.is_native() && function.IsImplicitInstanceClosureFunction(); | 621 function.is_native() && function.IsImplicitInstanceClosureFunction(); |
| 622 LocalScope* scope = parsed_function().node_sequence()->scope(); | 622 LocalScope* scope = parsed_function().node_sequence()->scope(); |
| 623 const int num_fixed_params = function.num_fixed_parameters(); | 623 const int num_fixed_params = function.num_fixed_parameters(); |
| 624 const int num_opt_pos_params = function.num_optional_positional_parameters(); | 624 const int num_opt_pos_params = function.NumOptionalPositionalParameters(); |
| 625 int num_opt_named_params = function.num_optional_named_parameters(); | 625 int num_opt_named_params = function.NumOptionalNamedParameters(); |
| 626 const int num_params = | 626 const int num_params = |
| 627 num_fixed_params + num_opt_pos_params + num_opt_named_params; | 627 num_fixed_params + num_opt_pos_params + num_opt_named_params; |
| 628 int implicit_this_param_pos = is_native_instance_closure ? -1 : 0; | 628 int implicit_this_param_pos = is_native_instance_closure ? -1 : 0; |
| 629 ASSERT(parsed_function().first_parameter_index() == | 629 ASSERT(parsed_function().first_parameter_index() == |
| 630 ParsedFunction::kFirstLocalSlotIndex + implicit_this_param_pos); | 630 ParsedFunction::kFirstLocalSlotIndex + implicit_this_param_pos); |
| 631 | 631 |
| 632 // Check that min_num_pos_args <= num_pos_args <= max_num_pos_args, | 632 // Check that min_num_pos_args <= num_pos_args <= max_num_pos_args, |
| 633 // where num_pos_args is the number of positional arguments passed in. | 633 // where num_pos_args is the number of positional arguments passed in. |
| 634 const int min_num_pos_args = num_fixed_params; | 634 const int min_num_pos_args = num_fixed_params; |
| 635 const int max_num_pos_args = num_fixed_params + num_opt_pos_params; | 635 const int max_num_pos_args = num_fixed_params + num_opt_pos_params; |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1383 __ popl(ECX); | 1383 __ popl(ECX); |
| 1384 __ popl(EAX); | 1384 __ popl(EAX); |
| 1385 } | 1385 } |
| 1386 | 1386 |
| 1387 | 1387 |
| 1388 #undef __ | 1388 #undef __ |
| 1389 | 1389 |
| 1390 } // namespace dart | 1390 } // namespace dart |
| 1391 | 1391 |
| 1392 #endif // defined TARGET_ARCH_IA32 | 1392 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |