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

Side by Side Diff: runtime/vm/flow_graph_compiler_arm64.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 const int num_locals = parsed_function().num_stack_locals(); 1041 const int num_locals = parsed_function().num_stack_locals();
1042 StubCode* stub_code = isolate()->stub_code(); 1042 StubCode* stub_code = isolate()->stub_code();
1043 1043
1044 // We check the number of passed arguments when we have to copy them due to 1044 // We check the number of passed arguments when we have to copy them due to
1045 // the presence of optional parameters. 1045 // the presence of optional parameters.
1046 // No such checking code is generated if only fixed parameters are declared, 1046 // No such checking code is generated if only fixed parameters are declared,
1047 // unless we are in debug mode or unless we are compiling a closure. 1047 // unless we are in debug mode or unless we are compiling a closure.
1048 if (num_copied_params == 0) { 1048 if (num_copied_params == 0) {
1049 #ifdef DEBUG 1049 #ifdef DEBUG
1050 ASSERT(!parsed_function().function().HasOptionalParameters()); 1050 ASSERT(!parsed_function().function().HasOptionalParameters());
1051 const bool check_arguments = !flow_graph().IsCompiledForOsr(); 1051 const bool check_arguments = !flow_graph().IsCompiledForOsr() &&
1052 !function.IsIrregexpFunction();
Florian Schneider 2014/10/01 17:04:13 Is this necessary? IsClosureFunction implies !IsIr
jgruber1 2014/10/03 18:59:51 Done.
1052 #else 1053 #else
1053 const bool check_arguments = 1054 const bool check_arguments =
1054 function.IsClosureFunction() && !flow_graph().IsCompiledForOsr(); 1055 function.IsClosureFunction() && !flow_graph().IsCompiledForOsr() &&
1056 !function.IsIrregexpFunction();
1055 #endif 1057 #endif
1056 if (check_arguments) { 1058 if (check_arguments) {
1057 __ Comment("Check argument count"); 1059 __ Comment("Check argument count");
1058 // Check that exactly num_fixed arguments are passed in. 1060 // Check that exactly num_fixed arguments are passed in.
1059 Label correct_num_arguments, wrong_num_arguments; 1061 Label correct_num_arguments, wrong_num_arguments;
1060 __ LoadFieldFromOffset(R0, R4, ArgumentsDescriptor::count_offset(), PP); 1062 __ LoadFieldFromOffset(R0, R4, ArgumentsDescriptor::count_offset(), PP);
1061 __ CompareImmediate(R0, Smi::RawValue(num_fixed_params), PP); 1063 __ CompareImmediate(R0, Smi::RawValue(num_fixed_params), PP);
1062 __ b(&wrong_num_arguments, NE); 1064 __ b(&wrong_num_arguments, NE);
1063 __ LoadFieldFromOffset(R1, R4, 1065 __ LoadFieldFromOffset(R1, R4,
1064 ArgumentsDescriptor::positional_count_offset(), PP); 1066 ArgumentsDescriptor::positional_count_offset(), PP);
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 1769 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
1768 __ PopDouble(reg); 1770 __ PopDouble(reg);
1769 } 1771 }
1770 1772
1771 1773
1772 #undef __ 1774 #undef __
1773 1775
1774 } // namespace dart 1776 } // namespace dart
1775 1777
1776 #endif // defined TARGET_ARCH_ARM64 1778 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698