PPC: [regexp] correctly advance zero length matches for global/unicode.
Port 57d202d879
R=yangguo@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:2952
LOG=N
Review URL: https://codereview.chromium.org/1646613002
Cr-Commit-Position: refs/heads/master@{#33566}
This commit is contained in:
parent
73aea9c13f
commit
510f4a9b8f
@ -851,8 +851,11 @@ Handle<HeapObject> RegExpMacroAssemblerPPC::GetCode(Handle<String> source) {
|
||||
__ cmpi(current_input_offset(), Operand::Zero());
|
||||
__ beq(&exit_label_);
|
||||
// Advance current position after a zero-length match.
|
||||
Label advance;
|
||||
__ bind(&advance);
|
||||
__ addi(current_input_offset(), current_input_offset(),
|
||||
Operand((mode_ == UC16) ? 2 : 1));
|
||||
if (global_unicode()) CheckNotInSurrogatePair(0, &advance);
|
||||
}
|
||||
|
||||
__ b(&load_char_start_regexp);
|
||||
|
Loading…
Reference in New Issue
Block a user