summaryrefslogtreecommitdiffstats
path: root/js/src/irregexp/RegExpMacroAssembler.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-13 05:54:58 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-13 05:54:58 -0500
commit9308ec68e863e4c6e650680370a5d7baa9f0d1f3 (patch)
treec70b2b78369b4554cdeb0db2dd0161b9945d6c21 /js/src/irregexp/RegExpMacroAssembler.cpp
parentecdfbc692322ccc0f2dbc8811fee8282cf125b3b (diff)
parentce0dd36a78814c59950fde6c19413c1f7ea85ee1 (diff)
downloadUXP-9308ec68e863e4c6e650680370a5d7baa9f0d1f3.tar
UXP-9308ec68e863e4c6e650680370a5d7baa9f0d1f3.tar.gz
UXP-9308ec68e863e4c6e650680370a5d7baa9f0d1f3.tar.lz
UXP-9308ec68e863e4c6e650680370a5d7baa9f0d1f3.tar.xz
UXP-9308ec68e863e4c6e650680370a5d7baa9f0d1f3.zip
Merge branch 'master' into mailnews-work
Diffstat (limited to 'js/src/irregexp/RegExpMacroAssembler.cpp')
-rw-r--r--js/src/irregexp/RegExpMacroAssembler.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/js/src/irregexp/RegExpMacroAssembler.cpp b/js/src/irregexp/RegExpMacroAssembler.cpp
index d66d0d204..6b1ceba8a 100644
--- a/js/src/irregexp/RegExpMacroAssembler.cpp
+++ b/js/src/irregexp/RegExpMacroAssembler.cpp
@@ -226,32 +226,37 @@ InterpretedRegExpMacroAssembler::CheckGreedyLoop(jit::Label* on_tos_equals_curre
}
void
-InterpretedRegExpMacroAssembler::CheckNotAtStart(jit::Label* on_not_at_start)
+InterpretedRegExpMacroAssembler::CheckNotAtStart(int cp_offset, jit::Label* on_not_at_start)
{
- Emit(BC_CHECK_NOT_AT_START, 0);
+ Emit(BC_CHECK_NOT_AT_START, cp_offset);
EmitOrLink(on_not_at_start);
}
void
-InterpretedRegExpMacroAssembler::CheckNotBackReference(int start_reg, jit::Label* on_no_match)
+InterpretedRegExpMacroAssembler::CheckNotBackReference(int start_reg, bool read_backward,
+ jit::Label* on_no_match)
{
MOZ_ASSERT(start_reg >= 0);
MOZ_ASSERT(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_no_match);
}
void
InterpretedRegExpMacroAssembler::CheckNotBackReferenceIgnoreCase(int start_reg,
+ bool read_backward,
jit::Label* on_no_match,
bool unicode)
{
MOZ_ASSERT(start_reg >= 0);
MOZ_ASSERT(start_reg <= kMaxRegister);
if (unicode)
- Emit(BC_CHECK_NOT_BACK_REF_NO_CASE_UNICODE, start_reg);
+ Emit(read_backward ? BC_CHECK_NOT_BACK_REF_NO_CASE_BACKWARD_UNICODE : BC_CHECK_NOT_BACK_REF_NO_CASE_UNICODE,
+ start_reg);
else
- 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_no_match);
}