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

Unified Diff: src/regexp/x64/regexp-macro-assembler-x64.cc

Issue 1599303002: [regexp] implement case-insensitive unicode regexps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@unicodeclass
Patch Set: fixes Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: src/regexp/x64/regexp-macro-assembler-x64.cc
diff --git a/src/regexp/x64/regexp-macro-assembler-x64.cc b/src/regexp/x64/regexp-macro-assembler-x64.cc
index 286f159cc8e5ac4d04416e6a2f32c7aec735aa06..549ddae05e9580062f7c93ebd5542623164886c2 100644
--- a/src/regexp/x64/regexp-macro-assembler-x64.cc
+++ b/src/regexp/x64/regexp-macro-assembler-x64.cc
@@ -203,7 +203,7 @@ void RegExpMacroAssemblerX64::CheckGreedyLoop(Label* on_equal) {
void RegExpMacroAssemblerX64::CheckNotBackReferenceIgnoreCase(
- int start_reg, bool read_backward, Label* on_no_match) {
+ int start_reg, bool read_backward, bool unicode, Label* on_no_match) {
Label fallthrough;
ReadPositionFromRegister(rdx, start_reg); // Offset of start of capture
ReadPositionFromRegister(rbx, start_reg + 1); // Offset of end of capture
@@ -308,8 +308,10 @@ void RegExpMacroAssemblerX64::CheckNotBackReferenceIgnoreCase(
// Address byte_offset1 - Address captured substring's start.
// Address byte_offset2 - Address of current character position.
// size_t byte_length - length of capture in bytes(!)
- // Isolate* isolate
+// Isolate* isolate or 0 if unicode flag.
#ifdef _WIN64
+ DCHECK(rcx.is(arg_reg_1));
+ DCHECK(rdx.is(arg_reg_2));
// Compute and set byte_offset1 (start of capture).
__ leap(rcx, Operand(rsi, rdx, times_1, 0));
// Set byte_offset2.
@@ -317,11 +319,9 @@ void RegExpMacroAssemblerX64::CheckNotBackReferenceIgnoreCase(
if (read_backward) {
__ subq(rdx, rbx);
}
- // Set byte_length.
- __ movp(r8, rbx);
- // Isolate.
- __ LoadAddress(r9, ExternalReference::isolate_address(isolate()));
#else // AMD64 calling convention
+ DCHECK(rdi.is(arg_reg_1));
+ DCHECK(rsi.is(arg_reg_2));
// Compute byte_offset2 (current position = rsi+rdi).
__ leap(rax, Operand(rsi, rdi, times_1, 0));
// Compute and set byte_offset1 (start of capture).
@@ -331,11 +331,19 @@ void RegExpMacroAssemblerX64::CheckNotBackReferenceIgnoreCase(
if (read_backward) {
__ subq(rsi, rbx);
}
+#endif // _WIN64
+
// Set byte_length.
- __ movp(rdx, rbx);
+ __ movp(arg_reg_3, rbx);
// Isolate.
- __ LoadAddress(rcx, ExternalReference::isolate_address(isolate()));
-#endif
+#ifdef V8_I18N_SUPPORT
+ if (unicode) {
+ __ movp(arg_reg_4, Immediate(0));
+ } else // NOLINT
+#endif // V8_I18N_SUPPORT
+ {
+ __ LoadAddress(arg_reg_4, ExternalReference::isolate_address(isolate()));
+ }
{ // NOLINT: Can't find a way to open this scope without confusing the
// linter.

Powered by Google App Engine
This is Rietveld 408576698