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

Side by Side Diff: runtime/vm/flow_graph_compiler_arm.cc

Issue 539153002: Port and integrate the irregexp engine from V8 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Port remaining V8 regexp tests and fix exposed bugs. Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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();
Florian Schneider 2014/10/01 17:04:14 Is this necessary? IsClosureFunction implies !IsIr
jgruber1 2014/10/03 18:59:52 Done.
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698