diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /js/src/irregexp/imported/regexp-nodes.h | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/irregexp/imported/regexp-nodes.h')
-rw-r--r-- | js/src/irregexp/imported/regexp-nodes.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/js/src/irregexp/imported/regexp-nodes.h b/js/src/irregexp/imported/regexp-nodes.h index 9407f1c5ec..f3d7e6c58f 100644 --- a/js/src/irregexp/imported/regexp-nodes.h +++ b/js/src/irregexp/imported/regexp-nodes.h @@ -318,7 +318,8 @@ class ActionNode : public SeqRegExpNode { BEGIN_NEGATIVE_SUBMATCH, POSITIVE_SUBMATCH_SUCCESS, EMPTY_MATCH_CHECK, - CLEAR_CAPTURES + CLEAR_CAPTURES, + MODIFY_FLAGS }; static ActionNode* SetRegisterForLoop(int reg, int val, RegExpNode* on_success); @@ -341,6 +342,7 @@ class ActionNode : public SeqRegExpNode { int repetition_register, int repetition_limit, RegExpNode* on_success); + static ActionNode* ModifyFlags(RegExpFlags flags, RegExpNode* on_success); void Accept(NodeVisitor* visitor) override; void Emit(RegExpCompiler* compiler, Trace* trace) override; void GetQuickCheckDetails(QuickCheckDetails* details, @@ -353,6 +355,10 @@ class ActionNode : public SeqRegExpNode { int GreedyLoopTextLength() override { return kNodeIsTooComplexForGreedyLoops; } + RegExpFlags flags() { + DCHECK_EQ(action_type(), MODIFY_FLAGS); + return RegExpFlags{data_.u_modify_flags.flags}; + } private: union { @@ -382,9 +388,13 @@ class ActionNode : public SeqRegExpNode { int range_from; int range_to; } u_clear_captures; + struct { + int flags; + } u_modify_flags; } data_; ActionNode(ActionType action_type, RegExpNode* on_success) : SeqRegExpNode(on_success), action_type_(action_type) {} + ActionType action_type_; friend class DotPrinterImpl; friend Zone; @@ -499,12 +509,11 @@ class AssertionNode : public SeqRegExpNode { class BackReferenceNode : public SeqRegExpNode { public: - BackReferenceNode(int start_reg, int end_reg, RegExpFlags flags, - bool read_backward, RegExpNode* on_success) + BackReferenceNode(int start_reg, int end_reg, bool read_backward, + RegExpNode* on_success) : SeqRegExpNode(on_success), start_reg_(start_reg), end_reg_(end_reg), - flags_(flags), read_backward_(read_backward) {} void Accept(NodeVisitor* visitor) override; int start_register() { return start_reg_; } @@ -522,7 +531,6 @@ class BackReferenceNode : public SeqRegExpNode { private: int start_reg_; int end_reg_; - RegExpFlags flags_; bool read_backward_; }; |