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

Side by Side Diff: runtime/vm/flow_graph_compiler_x64.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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 const int num_locals = parsed_function().num_stack_locals(); 1074 const int num_locals = parsed_function().num_stack_locals();
1075 StubCode* stub_code = isolate()->stub_code(); 1075 StubCode* stub_code = isolate()->stub_code();
1076 1076
1077 // We check the number of passed arguments when we have to copy them due to 1077 // We check the number of passed arguments when we have to copy them due to
1078 // the presence of optional parameters. 1078 // the presence of optional parameters.
1079 // No such checking code is generated if only fixed parameters are declared, 1079 // No such checking code is generated if only fixed parameters are declared,
1080 // unless we are in debug mode or unless we are compiling a closure. 1080 // unless we are in debug mode or unless we are compiling a closure.
1081 if (num_copied_params == 0) { 1081 if (num_copied_params == 0) {
1082 #ifdef DEBUG 1082 #ifdef DEBUG
1083 ASSERT(!parsed_function().function().HasOptionalParameters()); 1083 ASSERT(!parsed_function().function().HasOptionalParameters());
1084 const bool check_arguments = !flow_graph().IsCompiledForOsr(); 1084 const bool check_arguments = !flow_graph().IsCompiledForOsr() &&
1085 !function.IsIrregexpFunction();
Florian Schneider 2014/10/01 17:04:15 Is this necessary? IsClosureFunction implies !IsIr
jgruber1 2014/10/03 18:59:54 Done.
1085 #else 1086 #else
1086 const bool check_arguments = 1087 const bool check_arguments =
1087 function.IsClosureFunction() && !flow_graph().IsCompiledForOsr(); 1088 function.IsClosureFunction() && !flow_graph().IsCompiledForOsr() &&
1089 !function.IsIrregexpFunction();
1088 #endif 1090 #endif
1089 if (check_arguments) { 1091 if (check_arguments) {
1090 __ Comment("Check argument count"); 1092 __ Comment("Check argument count");
1091 // Check that exactly num_fixed arguments are passed in. 1093 // Check that exactly num_fixed arguments are passed in.
1092 Label correct_num_arguments, wrong_num_arguments; 1094 Label correct_num_arguments, wrong_num_arguments;
1093 __ movq(RAX, FieldAddress(R10, ArgumentsDescriptor::count_offset())); 1095 __ movq(RAX, FieldAddress(R10, ArgumentsDescriptor::count_offset()));
1094 __ CompareImmediate(RAX, Immediate(Smi::RawValue(num_fixed_params)), PP); 1096 __ CompareImmediate(RAX, Immediate(Smi::RawValue(num_fixed_params)), PP);
1095 __ j(NOT_EQUAL, &wrong_num_arguments, Assembler::kNearJump); 1097 __ j(NOT_EQUAL, &wrong_num_arguments, Assembler::kNearJump);
1096 __ cmpq(RAX, 1098 __ cmpq(RAX,
1097 FieldAddress(R10, 1099 FieldAddress(R10,
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 __ movups(reg, Address(RSP, 0)); 1726 __ movups(reg, Address(RSP, 0));
1725 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP); 1727 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP);
1726 } 1728 }
1727 1729
1728 1730
1729 #undef __ 1731 #undef __
1730 1732
1731 } // namespace dart 1733 } // namespace dart
1732 1734
1733 #endif // defined TARGET_ARCH_X64 1735 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698