Commit 6cdf6a77 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: [regexp] correctly advance zero length matches for global/unicode.

  port 57d202d8 (r33550)

  original commit message:

BUG=

Review URL: https://codereview.chromium.org/1640823003

Cr-Commit-Position: refs/heads/master@{#33570}
parent aeb4ba1b
......@@ -828,13 +828,15 @@ Handle<HeapObject> RegExpMacroAssemblerX87::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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment