Index: src/regexp/regexp-macro-assembler-irregexp.cc |
diff --git a/src/regexp/regexp-macro-assembler-irregexp.cc b/src/regexp/regexp-macro-assembler-irregexp.cc |
index ca567c9bdab5c4dabe54099495e199db0ce0efb8..90a92e48b4cbf5dfd2ffe5848202b8c6d7061ba5 100644 |
--- a/src/regexp/regexp-macro-assembler-irregexp.cc |
+++ b/src/regexp/regexp-macro-assembler-irregexp.cc |
@@ -273,8 +273,9 @@ void RegExpMacroAssemblerIrregexp::CheckAtStart(Label* on_at_start) { |
} |
-void RegExpMacroAssemblerIrregexp::CheckNotAtStart(Label* on_not_at_start) { |
- Emit(BC_CHECK_NOT_AT_START, 0); |
+void RegExpMacroAssemblerIrregexp::CheckNotAtStart(int cp_offset, |
+ Label* on_not_at_start) { |
+ Emit(BC_CHECK_NOT_AT_START, cp_offset); |
EmitOrLink(on_not_at_start); |
} |
@@ -370,20 +371,23 @@ void RegExpMacroAssemblerIrregexp::CheckBitInTable( |
void RegExpMacroAssemblerIrregexp::CheckNotBackReference(int start_reg, |
+ bool read_backward, |
Label* on_not_equal) { |
DCHECK(start_reg >= 0); |
DCHECK(start_reg <= kMaxRegister); |
- Emit(BC_CHECK_NOT_BACK_REF, start_reg); |
+ Emit(read_backward ? BC_CHECK_NOT_BACK_REF_BACKWARD : BC_CHECK_NOT_BACK_REF, |
+ start_reg); |
EmitOrLink(on_not_equal); |
} |
void RegExpMacroAssemblerIrregexp::CheckNotBackReferenceIgnoreCase( |
- int start_reg, |
- Label* on_not_equal) { |
+ int start_reg, bool read_backward, Label* on_not_equal) { |
DCHECK(start_reg >= 0); |
DCHECK(start_reg <= kMaxRegister); |
- Emit(BC_CHECK_NOT_BACK_REF_NO_CASE, start_reg); |
+ Emit(read_backward ? BC_CHECK_NOT_BACK_REF_NO_CASE_BACKWARD |
+ : BC_CHECK_NOT_BACK_REF_NO_CASE, |
+ start_reg); |
EmitOrLink(on_not_equal); |
} |