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 549ddae05e9580062f7c93ebd5542623164886c2..952034fb0c08388633f0a2110e0117676102b114 100644 |
--- a/src/regexp/x64/regexp-macro-assembler-x64.cc |
+++ b/src/regexp/x64/regexp-macro-assembler-x64.cc |
@@ -877,11 +877,14 @@ Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) { |
__ testp(rdi, rdi); |
__ j(zero, &exit_label_, Label::kNear); |
// Advance current position after a zero-length match. |
+ Label advance; |
+ __ bind(&advance); |
if (mode_ == UC16) { |
__ addq(rdi, Immediate(2)); |
} else { |
__ incq(rdi); |
} |
+ if (global_unicode()) CheckNotInSurrogatePair(0, &advance); |
} |
__ jmp(&load_char_start_regexp); |