summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-01-15 13:00:46 +0100
committerYves Orton <demerphq@gmail.com>2023-03-13 21:26:08 +0800
commit17e3e02ad120eabda2bdb6c297a70d53294437ef (patch)
tree6fc99228c2a34c7ee5ec892de4c1f1a980e2f240 /regcomp.c
parent59db194299c94c6707095797c3df0e2f67ff82b2 (diff)
downloadperl-17e3e02ad120eabda2bdb6c297a70d53294437ef.tar.gz
regex engine - simplify regnode structures and make them consistent
This eliminates the regnode_2L data structure, and merges it with the older regnode_2 data structure. At the same time it makes each "arg" property of the various regnode types that have one be consistently structured as an anonymous union like this: union { U32 arg1u; I32 arg2i; struct { U16 arg1a; U16 arg1b; }; }; We then expose four macros for accessing each slot: ARG1u() ARG1i() and ARG1a() and ARG1b(). Code then explicitly designates which they want. The old logic used ARG() to access an U32 arg1, and ARG1() to access an I32 arg1, which was confusing to say the least. The regnode_2L structure had a U32 arg1, and I32 arg2, and the regnode_2 data strucutre had two I32 args. With the new set of macros we use the regnode_2 for both, and use the appropriate macros to show whether we want to signed or unsigned values. This also renames the regnode_4 to regnode_3. The 3 stands for "three 32-bit args". However as each slot can also store two U16s, a regnode_3 can hold up to 6 U16s, or as 3 I32's, or a combination. For instance the CURLY style nodes use regnode_3 to store 4 values, ARG1i() for min count, ARG2i() for max count and ARG3a() and ARG3b() for parens before and inside the quantifier. It also changes the functions reganode() to reg1node() and changes reg2Lanode() to reg2node(). The 2L thing was just confusing.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c138
1 files changed, 69 insertions, 69 deletions
diff --git a/regcomp.c b/regcomp.c
index bf9825941f..da8b3e32f1 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1841,7 +1841,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
(OP(first) == PLUS) ||
(OP(first) == MINMOD) ||
/* An {n,m} with n>0 */
- (REGNODE_TYPE(OP(first)) == CURLY && ARG1(first) > 0) ||
+ (REGNODE_TYPE(OP(first)) == CURLY && ARG1i(first) > 0) ||
(OP(first) == NOTHING && REGNODE_TYPE(OP(first_next)) != END ))
{
/*
@@ -1873,7 +1873,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
}
#ifdef TRIE_STCLASS
else if (REGNODE_TYPE(OP(first)) == TRIE &&
- ((reg_trie_data *)RExC_rxi->data->data[ ARG(first) ])->minlen>0)
+ ((reg_trie_data *)RExC_rxi->data->data[ ARG1u(first) ])->minlen>0)
{
/* this can happen only on restudy
* Search for "restudy" in this file to find
@@ -2263,11 +2263,11 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
*
* If for some reason someone writes code that optimises
* away a GOSUB opcode then the assert should be changed to
- * an if(scan) to guard the ARG2L_SET() - Yves
+ * an if(scan) to guard the ARG2i_SET() - Yves
*
*/
assert(scan && OP(scan) == GOSUB);
- ARG2L_SET( scan, RExC_open_parens[ARG(scan)] - REGNODE_OFFSET(scan));
+ ARG2i_SET( scan, RExC_open_parens[ARG1u(scan)] - REGNODE_OFFSET(scan));
}
if (RExC_logical_total_parens != RExC_total_parens) {
Newxz(RExC_parno_to_logical_next, RExC_total_parens, I32);
@@ -2754,7 +2754,7 @@ S_handle_named_backref(pTHX_ RExC_state_t *pRExC_state,
SvREFCNT_inc_simple_void_NN(sv_dat);
}
RExC_sawback = 1;
- ret = reganode(pRExC_state,
+ ret = reg1node(pRExC_state,
((! FOLD)
? REFN
: (ASCII_FOLD_RESTRICTED)
@@ -2857,7 +2857,7 @@ S_reg_la_OPFAIL(pTHX_ RExC_state_t *pRExC_state, U32 flags,
vFAIL2("Sequence (%s... not terminated", type);
if (*RExC_parse == ')') {
- regnode_offset ret= reganode(pRExC_state, OPFAIL, 0);
+ regnode_offset ret= reg1node(pRExC_state, OPFAIL, 0);
nextchar(pRExC_state);
return ret; /* return produced regop */
}
@@ -3250,7 +3250,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
* See also: S_reg_la_OPFAIL() */
/* Note: OPFAIL is *not* zerolen. */
- ret = reganode(pRExC_state, OPFAIL, 0);
+ ret = reg1node(pRExC_state, OPFAIL, 0);
nextchar(pRExC_state);
return ret;
}
@@ -3299,22 +3299,22 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
(int) verb_len, start_verb);
}
if (internal_argval == -1) {
- ret = reganode(pRExC_state, op, 0);
+ ret = reg1node(pRExC_state, op, 0);
} else {
- ret = reg2Lanode(pRExC_state, op, 0, internal_argval);
+ ret = reg2node(pRExC_state, op, 0, internal_argval);
}
RExC_seen |= REG_VERBARG_SEEN;
if (start_arg) {
SV *sv = newSVpvn( start_arg, RExC_parse - start_arg);
- ARG(REGNODE_p(ret)) = reg_add_data( pRExC_state,
+ ARG1u(REGNODE_p(ret)) = reg_add_data( pRExC_state,
STR_WITH_LEN("S"));
- RExC_rxi->data->data[ARG(REGNODE_p(ret))]=(void*)sv;
+ RExC_rxi->data->data[ARG1u(REGNODE_p(ret))]=(void*)sv;
FLAGS(REGNODE_p(ret)) = 1;
} else {
FLAGS(REGNODE_p(ret)) = 0;
}
if ( internal_argval != -1 )
- ARG2L_SET(REGNODE_p(ret), internal_argval);
+ ARG2i_SET(REGNODE_p(ret), internal_argval);
nextchar(pRExC_state);
return ret;
}
@@ -3649,20 +3649,20 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
}
/* We keep track how many GOSUB items we have produced.
- To start off the ARG2L() of the GOSUB holds its "id",
+ To start off the ARG2i() of the GOSUB holds its "id",
which is used later in conjunction with RExC_recurse
to calculate the offset we need to jump for the GOSUB,
which it will store in the final representation.
We have to defer the actual calculation until much later
as the regop may move.
*/
- ret = reg2Lanode(pRExC_state, GOSUB, num, RExC_recurse_count);
+ ret = reg2node(pRExC_state, GOSUB, num, RExC_recurse_count);
RExC_recurse_count++;
DEBUG_OPTIMISE_MORE_r(Perl_re_printf( aTHX_
"%*s%*s Recurse #%" UVuf " to %" IVdf "\n",
22, "| |", (int)(depth * 2 + 1), "",
- (UV)ARG(REGNODE_p(ret)),
- (IV)ARG2L(REGNODE_p(ret))));
+ (UV)ARG1u(REGNODE_p(ret)),
+ (IV)ARG2i(REGNODE_p(ret))));
RExC_seen |= REG_RECURSE_SEEN;
*flagp |= POSTPONED;
@@ -3730,7 +3730,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
ret = reg_node(pRExC_state, LOGICAL);
FLAGS(REGNODE_p(ret)) = 2;
- eval = reg2Lanode(pRExC_state, EVAL,
+ eval = reg2node(pRExC_state, EVAL,
n,
/* for later propagation into (??{})
@@ -3743,7 +3743,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
}
return ret;
}
- ret = reg2Lanode(pRExC_state, EVAL, n, 0);
+ ret = reg2node(pRExC_state, EVAL, n, 0);
FLAGS(REGNODE_p(ret)) = is_optimistic * EVAL_OPTIMISTIC_FLAG;
return ret;
@@ -3819,14 +3819,14 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
RExC_rxi->data->data[num]=(void*)sv_dat;
SvREFCNT_inc_simple_void_NN(sv_dat);
}
- ret = reganode(pRExC_state, GROUPPN, num);
+ ret = reg1node(pRExC_state, GROUPPN, num);
goto insert_if_check_paren;
}
else if (memBEGINs(RExC_parse,
(STRLEN) (RExC_end - RExC_parse),
"DEFINE"))
{
- ret = reganode(pRExC_state, DEFINEP, 0);
+ ret = reg1node(pRExC_state, DEFINEP, 0);
RExC_parse_inc_by(DEFINE_len);
is_define = 1;
goto insert_if_check_paren;
@@ -3860,7 +3860,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
if (sv_dat)
parno = 1 + *((I32 *)SvPVX(sv_dat));
}
- ret = reganode(pRExC_state, INSUBP, parno);
+ ret = reg1node(pRExC_state, INSUBP, parno);
goto insert_if_check_paren;
}
else if (inRANGE(RExC_parse[0], '1', '9')) {
@@ -3877,7 +3877,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
else {
vFAIL("panic: grok_atoUV returned FALSE");
}
- ret = reganode(pRExC_state, GROUPP, parno);
+ ret = reg1node(pRExC_state, GROUPP, parno);
insert_if_check_paren:
if (UCHARAT(RExC_parse) != ')') {
@@ -3886,7 +3886,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
}
nextchar(pRExC_state);
insert_if:
- if (! REGTAIL(pRExC_state, ret, reganode(pRExC_state,
+ if (! REGTAIL(pRExC_state, ret, reg1node(pRExC_state,
IFTHEN, 0)))
{
REQUIRE_BRANCHJ(flagp, 0);
@@ -3897,7 +3897,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
FAIL2("panic: regbranch returned failure, flags=%#" UVxf,
(UV) flags);
} else
- if (! REGTAIL(pRExC_state, br, reganode(pRExC_state,
+ if (! REGTAIL(pRExC_state, br, reg1node(pRExC_state,
LONGJMP, 0)))
{
REQUIRE_BRANCHJ(flagp, 0);
@@ -3911,7 +3911,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
vFAIL("(?(DEFINE)....) does not allow branches");
/* Fake one for optimizer. */
- lastbr = reganode(pRExC_state, IFTHEN, 0);
+ lastbr = reg1node(pRExC_state, IFTHEN, 0);
if (!regbranch(pRExC_state, &flags, 1, depth+1)) {
RETURN_FAIL_ON_RESTART(flags, flagp);
@@ -4055,7 +4055,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
}
}
- ret = reganode(pRExC_state, OPEN, parno);
+ ret = reg1node(pRExC_state, OPEN, parno);
if (!RExC_nestroot)
RExC_nestroot = parno;
if (RExC_open_parens && !RExC_open_parens[parno])
@@ -4096,13 +4096,13 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
if (*RExC_parse == '|') {
if (RExC_use_BRANCHJ) {
reginsert(pRExC_state, BRANCHJ, br, depth+1);
- ARG2La_SET(REGNODE_p(br), npar_before_regbranch);
- ARG2Lb_SET(REGNODE_p(br), (U16)RExC_npar - 1);
+ ARG2a_SET(REGNODE_p(br), npar_before_regbranch);
+ ARG2b_SET(REGNODE_p(br), (U16)RExC_npar - 1);
}
else {
reginsert(pRExC_state, BRANCH, br, depth+1);
- ARGa_SET(REGNODE_p(br), (U16)npar_before_regbranch);
- ARGb_SET(REGNODE_p(br), (U16)RExC_npar - 1);
+ ARG1a_SET(REGNODE_p(br), (U16)npar_before_regbranch);
+ ARG1b_SET(REGNODE_p(br), (U16)RExC_npar - 1);
}
have_branch = 1;
}
@@ -4122,7 +4122,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
if (RExC_use_BRANCHJ) {
bool shut_gcc_up;
- ender = reganode(pRExC_state, LONGJMP, 0);
+ ender = reg1node(pRExC_state, LONGJMP, 0);
/* Append to the previous. */
shut_gcc_up = REGTAIL(pRExC_state,
@@ -4149,16 +4149,16 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
assert(OP(REGNODE_p(lastbr)) == BRANCH || OP(REGNODE_p(lastbr))==BRANCHJ);
if (OP(REGNODE_p(br)) == BRANCH) {
if (OP(REGNODE_p(lastbr)) == BRANCH)
- ARGb_SET(REGNODE_p(lastbr),ARGa(REGNODE_p(br)));
+ ARG1b_SET(REGNODE_p(lastbr),ARG1a(REGNODE_p(br)));
else
- ARG2Lb_SET(REGNODE_p(lastbr),ARGa(REGNODE_p(br)));
+ ARG2b_SET(REGNODE_p(lastbr),ARG1a(REGNODE_p(br)));
}
else
if (OP(REGNODE_p(br)) == BRANCHJ) {
if (OP(REGNODE_p(lastbr)) == BRANCH)
- ARGb_SET(REGNODE_p(lastbr),ARG2La(REGNODE_p(br)));
+ ARG1b_SET(REGNODE_p(lastbr),ARG2a(REGNODE_p(br)));
else
- ARG2Lb_SET(REGNODE_p(lastbr),ARG2La(REGNODE_p(br)));
+ ARG2b_SET(REGNODE_p(lastbr),ARG2a(REGNODE_p(br)));
}
lastbr = br;
@@ -4174,7 +4174,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
ender = reg_node(pRExC_state, TAIL);
break;
case 1: case 2:
- ender = reganode(pRExC_state, CLOSE, parno);
+ ender = reg1node(pRExC_state, CLOSE, parno);
if ( RExC_close_parens ) {
DEBUG_OPTIMISE_MORE_r(Perl_re_printf( aTHX_
"%*s%*s Setting close paren #%" IVdf " to %zu\n",
@@ -4235,11 +4235,11 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
);
});
if (OP(REGNODE_p(lastbr)) == BRANCH) {
- ARGb_SET(REGNODE_p(lastbr),(U16)RExC_npar-1);
+ ARG1b_SET(REGNODE_p(lastbr),(U16)RExC_npar-1);
}
else
if (OP(REGNODE_p(lastbr)) == BRANCHJ) {
- ARG2Lb_SET(REGNODE_p(lastbr),(U16)RExC_npar-1);
+ ARG2b_SET(REGNODE_p(lastbr),(U16)RExC_npar-1);
}
if (! REGTAIL(pRExC_state, lastbr, ender)) {
@@ -4397,13 +4397,13 @@ S_regbranch(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth)
ret = 0;
else {
if (RExC_use_BRANCHJ) {
- ret = reg2Lanode(pRExC_state, BRANCHJ, 0, 0);
+ ret = reg2node(pRExC_state, BRANCHJ, 0, 0);
branch_node = REGNODE_p(ret);
- ARG2La_SET(branch_node, (U16)RExC_npar-1);
+ ARG2a_SET(branch_node, (U16)RExC_npar-1);
} else {
- ret = reganode(pRExC_state, BRANCH, 0);
+ ret = reg1node(pRExC_state, BRANCH, 0);
branch_node = REGNODE_p(ret);
- ARGa_SET(branch_node, (U16)RExC_npar-1);
+ ARG1a_SET(branch_node, (U16)RExC_npar-1);
}
}
@@ -4816,18 +4816,18 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
/* Finish up the CURLY/CURLYX case */
FLAGS(REGNODE_p(ret)) = 0;
- ARG1_SET(REGNODE_p(ret), min);
- ARG2_SET(REGNODE_p(ret), max);
+ ARG1i_SET(REGNODE_p(ret), min);
+ ARG2i_SET(REGNODE_p(ret), max);
/* if we had a npar_after then we need to increment npar_before,
* we want to track the range of parens we need to reset each iteration
*/
if (npar_after!=npar_before) {
- ARG3_SET(REGNODE_p(ret), (U16)npar_before+1);
- ARG4_SET(REGNODE_p(ret), (U16)npar_after);
+ ARG3a_SET(REGNODE_p(ret), (U16)npar_before+1);
+ ARG3b_SET(REGNODE_p(ret), (U16)npar_after);
} else {
- ARG3_SET(REGNODE_p(ret), 0);
- ARG4_SET(REGNODE_p(ret), 0);
+ ARG3a_SET(REGNODE_p(ret), 0);
+ ARG3b_SET(REGNODE_p(ret), 0);
}
done_main_op:
@@ -6028,7 +6028,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
}
}
RExC_sawback = 1;
- ret = reganode(pRExC_state,
+ ret = reg1node(pRExC_state,
((! FOLD)
? REF
: (ASCII_FOLD_RESTRICTED)
@@ -11762,7 +11762,7 @@ S_optimize_regclass(pTHX_
ANYOFM_mask = ~ bits_differing; /* This goes into FLAGS */
/* The argument is the lowest code point */
- *ret = reganode(pRExC_state, op, lowest_cp);
+ *ret = reg1node(pRExC_state, op, lowest_cp);
FLAGS(REGNODE_p(*ret)) = ANYOFM_mask;
}
@@ -11925,7 +11925,7 @@ S_optimize_regclass(pTHX_
&& *anyof_flags == 0
&& start[0] < (1 << ANYOFR_BASE_BITS)
&& end[0] - start[0]
- < ((1U << (sizeof(((struct regnode_1 *)NULL)->arg1)
+ < ((1U << (sizeof(((struct regnode_1 *)NULL)->arg1u)
* CHARBITS - ANYOFR_BASE_BITS))))
{
@@ -11933,7 +11933,7 @@ S_optimize_regclass(pTHX_
U8 high_utf8[UTF8_MAXBYTES+1];
op = ANYOFR;
- *ret = reganode(pRExC_state, op,
+ *ret = reg1node(pRExC_state, op,
(start[0] | (end[0] - start[0]) << ANYOFR_BASE_BITS));
/* Place the lowest UTF-8 start byte in the flags field, so as to allow
@@ -12089,7 +12089,7 @@ S_optimize_regclass(pTHX_
return_OPFAIL:
op = OPFAIL;
- *ret = reganode(pRExC_state, op, 0);
+ *ret = reg1node(pRExC_state, op, 0);
return op;
return_SANY:
@@ -12141,7 +12141,7 @@ Perl_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state,
* 1) there is no list of code points matched outside the bitmap
*/
if (! cp_list) {
- ARG_SET(node, ANYOF_MATCHES_NONE_OUTSIDE_BITMAP_VALUE);
+ ARG1u_SET(node, ANYOF_MATCHES_NONE_OUTSIDE_BITMAP_VALUE);
return;
}
@@ -12150,7 +12150,7 @@ Perl_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state,
&& invlist_highest_range_start(cp_list)
<= NUM_ANYOF_CODE_POINTS)
{
- ARG_SET(node, ANYOF_MATCHES_ALL_OUTSIDE_BITMAP_VALUE);
+ ARG1u_SET(node, ANYOF_MATCHES_ALL_OUTSIDE_BITMAP_VALUE);
return;
}
@@ -12223,7 +12223,7 @@ Perl_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state,
/* Here, the existence and contents of both compile-time lists
* are identical between the new and existing data. Re-use the
* existing one */
- ARG_SET(node, i);
+ ARG1u_SET(node, i);
return;
} /* end of loop through existing classes */
}
@@ -12255,7 +12255,7 @@ Perl_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state,
rv = newRV_noinc(MUTABLE_SV(av));
n = reg_add_data(pRExC_state, STR_WITH_LEN("s"));
RExC_rxi->data->data[n] = (void*)rv;
- ARG_SET(node, n);
+ ARG1u_SET(node, n);
}
SV *
@@ -12311,7 +12311,7 @@ Perl_get_re_gclass_aux_data(pTHX_ const regexp *prog, const regnode* node, bool
assert(! output_invlist || listsvp);
if (data && data->count) {
- const U32 n = ARG(node);
+ const U32 n = ARG1u(node);
if (data->what[n] == 's') {
SV * const rv = MUTABLE_SV(data->data[n]);
@@ -12704,20 +12704,20 @@ S_reg_node(pTHX_ RExC_state_t *pRExC_state, U8 op)
}
/*
-- reganode - emit a node with an argument
+- reg1node - emit a node with an argument
*/
STATIC regnode_offset /* Location. */
-S_reganode(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg)
+S_reg1node(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg)
{
const regnode_offset ret = REGNODE_GUTS(pRExC_state, op, REGNODE_ARG_LEN(op));
regnode_offset ptr = ret;
- PERL_ARGS_ASSERT_REGANODE;
+ PERL_ARGS_ASSERT_REG1NODE;
/* ANYOF are special cased to allow non-length 1 args */
assert(REGNODE_ARG_LEN(op) == 1);
- FILL_ADVANCE_NODE_ARG(ptr, op, arg);
+ FILL_ADVANCE_NODE_ARG1u(ptr, op, arg);
RExC_emit = ptr;
return(ret);
}
@@ -12739,18 +12739,18 @@ S_regpnode(pTHX_ RExC_state_t *pRExC_state, U8 op, SV * arg)
}
STATIC regnode_offset
-S_reg2Lanode(pTHX_ RExC_state_t *pRExC_state, const U8 op, const U32 arg1, const I32 arg2)
+S_reg2node(pTHX_ RExC_state_t *pRExC_state, const U8 op, const U32 arg1, const I32 arg2)
{
/* emit a node with U32 and I32 arguments */
const regnode_offset ret = REGNODE_GUTS(pRExC_state, op, REGNODE_ARG_LEN(op));
regnode_offset ptr = ret;
- PERL_ARGS_ASSERT_REG2LANODE;
+ PERL_ARGS_ASSERT_REG2NODE;
assert(REGNODE_ARG_LEN(op) == 2);
- FILL_ADVANCE_NODE_2L_ARG(ptr, op, arg1, arg2);
+ FILL_ADVANCE_NODE_2ui_ARG(ptr, op, arg1, arg2);
RExC_emit = ptr;
return(ret);
}
@@ -12879,7 +12879,7 @@ S_regtail(pTHX_ RExC_state_t * pRExC_state,
assert(val >= scan);
if (REGNODE_OFF_BY_ARG(OP(REGNODE_p(scan)))) {
assert((UV) (val - scan) <= U32_MAX);
- ARG_SET(REGNODE_p(scan), val - scan);
+ ARG1u_SET(REGNODE_p(scan), val - scan);
}
else {
if (val - scan > U16_MAX) {
@@ -12978,7 +12978,7 @@ S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode_offset p,
});
if (REGNODE_OFF_BY_ARG(OP(REGNODE_p(scan)))) {
assert((UV) (val - scan) <= U32_MAX);
- ARG_SET(REGNODE_p(scan), val - scan);
+ ARG1u_SET(REGNODE_p(scan), val - scan);
}
else {
if (val - scan > U16_MAX) {
@@ -13002,7 +13002,7 @@ Perl_get_ANYOFM_contents(pTHX_ const regnode * n) {
* ANYOFM/NANYOFM node 'n' */
SV * cp_list = _new_invlist(-1);
- const U8 lowest = (U8) ARG(n);
+ const U8 lowest = (U8) ARG1u(n);
unsigned int i;
U8 count = 0;
U8 needed = 1U << PL_bitcount[ (U8) ~ FLAGS(n)];
@@ -13012,7 +13012,7 @@ Perl_get_ANYOFM_contents(pTHX_ const regnode * n) {
/* Starting with the lowest code point, any code point that ANDed with the
* mask yields the lowest code point is in the set */
for (i = lowest; i <= 0xFF; i++) {
- if ((i & FLAGS(n)) == ARG(n)) {
+ if ((i & FLAGS(n)) == ARG1u(n)) {
cp_list = add_cp_to_invlist(cp_list, i);
count++;