| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| (...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 const int num_locals = parsed_function().num_stack_locals(); | 1033 const int num_locals = parsed_function().num_stack_locals(); |
| 1034 StubCode* stub_code = isolate()->stub_code(); | 1034 StubCode* stub_code = isolate()->stub_code(); |
| 1035 | 1035 |
| 1036 // We check the number of passed arguments when we have to copy them due to | 1036 // We check the number of passed arguments when we have to copy them due to |
| 1037 // the presence of optional parameters. | 1037 // the presence of optional parameters. |
| 1038 // No such checking code is generated if only fixed parameters are declared, | 1038 // No such checking code is generated if only fixed parameters are declared, |
| 1039 // unless we are in debug mode or unless we are compiling a closure. | 1039 // unless we are in debug mode or unless we are compiling a closure. |
| 1040 if (num_copied_params == 0) { | 1040 if (num_copied_params == 0) { |
| 1041 #ifdef DEBUG | 1041 #ifdef DEBUG |
| 1042 ASSERT(!parsed_function().function().HasOptionalParameters()); | 1042 ASSERT(!parsed_function().function().HasOptionalParameters()); |
| 1043 const bool check_arguments = !flow_graph().IsCompiledForOsr(); | 1043 const bool check_arguments = !flow_graph().IsCompiledForOsr() && |
| 1044 !function.IsIrregexpFunction(); |
| 1044 #else | 1045 #else |
| 1045 const bool check_arguments = | 1046 const bool check_arguments = |
| 1046 function.IsClosureFunction() && !flow_graph().IsCompiledForOsr(); | 1047 function.IsClosureFunction() && !flow_graph().IsCompiledForOsr() && |
| 1048 !function.IsIrregexpFunction(); |
| 1047 #endif | 1049 #endif |
| 1048 if (check_arguments) { | 1050 if (check_arguments) { |
| 1049 __ Comment("Check argument count"); | 1051 __ Comment("Check argument count"); |
| 1050 // Check that exactly num_fixed arguments are passed in. | 1052 // Check that exactly num_fixed arguments are passed in. |
| 1051 Label correct_num_arguments, wrong_num_arguments; | 1053 Label correct_num_arguments, wrong_num_arguments; |
| 1052 __ ldr(R0, FieldAddress(R4, ArgumentsDescriptor::count_offset())); | 1054 __ ldr(R0, FieldAddress(R4, ArgumentsDescriptor::count_offset())); |
| 1053 __ CompareImmediate(R0, Smi::RawValue(num_fixed_params)); | 1055 __ CompareImmediate(R0, Smi::RawValue(num_fixed_params)); |
| 1054 __ b(&wrong_num_arguments, NE); | 1056 __ b(&wrong_num_arguments, NE); |
| 1055 __ ldr(R1, FieldAddress(R4, | 1057 __ ldr(R1, FieldAddress(R4, |
| 1056 ArgumentsDescriptor::positional_count_offset())); | 1058 ArgumentsDescriptor::positional_count_offset())); |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1802 DRegister dreg = EvenDRegisterOf(reg); | 1804 DRegister dreg = EvenDRegisterOf(reg); |
| 1803 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1805 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
| 1804 } | 1806 } |
| 1805 | 1807 |
| 1806 | 1808 |
| 1807 #undef __ | 1809 #undef __ |
| 1808 | 1810 |
| 1809 } // namespace dart | 1811 } // namespace dart |
| 1810 | 1812 |
| 1811 #endif // defined TARGET_ARCH_ARM | 1813 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |