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

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

Issue 1640823003: X87: [regexp] correctly advance zero length matches for global/unicode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp/x87/regexp-macro-assembler-x87.cc
diff --git a/src/regexp/x87/regexp-macro-assembler-x87.cc b/src/regexp/x87/regexp-macro-assembler-x87.cc
index 01d0b249b6fe15b9f0d56e65742d6b0d6910c5f9..c1aa54f8f42de21cd4dfa6d97710365f79e90355 100644
--- a/src/regexp/x87/regexp-macro-assembler-x87.cc
+++ b/src/regexp/x87/regexp-macro-assembler-x87.cc
@@ -187,7 +187,6 @@ void RegExpMacroAssemblerX87::CheckGreedyLoop(Label* on_equal) {
__ bind(&fallthrough);
}
-
void RegExpMacroAssemblerX87::CheckNotBackReferenceIgnoreCase(
int start_reg, bool read_backward, Label* on_no_match) {
Label fallthrough;
@@ -822,13 +821,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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698