Index: src/regexp/arm64/regexp-macro-assembler-arm64.cc |
diff --git a/src/regexp/arm64/regexp-macro-assembler-arm64.cc b/src/regexp/arm64/regexp-macro-assembler-arm64.cc |
index c5065e5f09e303de020493ae931f4c788c615be2..941cceaa5973eda95162267f97243beb1c64b0f4 100644 |
--- a/src/regexp/arm64/regexp-macro-assembler-arm64.cc |
+++ b/src/regexp/arm64/regexp-macro-assembler-arm64.cc |
@@ -998,9 +998,12 @@ Handle<HeapObject> RegExpMacroAssemblerARM64::GetCode(Handle<String> source) { |
// Offset from the end is zero if we already reached the end. |
__ Cbz(current_input_offset(), &return_w0); |
// Advance current position after a zero-length match. |
+ Label advance; |
+ __ bind(&advance); |
__ Add(current_input_offset(), |
current_input_offset(), |
Operand((mode_ == UC16) ? 2 : 1)); |
+ if (global_unicode()) CheckNotInSurrogatePair(0, &advance); |
} |
__ B(&load_char_start_regexp); |