Index: src/regexp/ia32/regexp-macro-assembler-ia32.cc |
diff --git a/src/regexp/ia32/regexp-macro-assembler-ia32.cc b/src/regexp/ia32/regexp-macro-assembler-ia32.cc |
index 161219c87cfc201a4babd213fa47148e29a2885f..4c22b43f772d2c200e7fc641c42b822b25bc96e9 100644 |
--- a/src/regexp/ia32/regexp-macro-assembler-ia32.cc |
+++ b/src/regexp/ia32/regexp-macro-assembler-ia32.cc |
@@ -829,13 +829,15 @@ Handle<HeapObject> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) { |
__ test(edi, edi); |
__ j(zero, &exit_label_, Label::kNear); |
// Advance current position after a zero-length match. |
+ Label advance; |
+ __ bind(&advance); |
if (mode_ == UC16) { |
__ add(edi, Immediate(2)); |
} else { |
__ inc(edi); |
} |
+ if (global_unicode()) CheckNotInSurrogatePair(0, &advance); |
} |
- |
__ jmp(&load_char_start_regexp); |
} else { |
__ mov(eax, Immediate(SUCCESS)); |