This was changing the parse pointer around some code and restoring it
afterwards. The purpose must have been to get the debug offsets
correct. But there is a better way to do that, which doesn't take up
cycles on a non-Debugging build, and that is to set the offsets
directly.
if (optimizable) {
int posix_class = -1; /* Illegal value */
if (optimizable) {
int posix_class = -1; /* Illegal value */
- const char * cur_parse= RExC_parse;
U8 ANYOFM_mask = 0xFF;
U32 anode_arg = 0;
UV start, end;
U8 ANYOFM_mask = 0xFF;
U32 anode_arg = 0;
UV start, end;
- RExC_parse = (char *)orig_parse;
-
if (regarglen[op]) {
ret = reganode(pRExC_state, op, anode_arg);
} else {
ret = reg_node(pRExC_state, op);
}
if (regarglen[op]) {
ret = reganode(pRExC_state, op, anode_arg);
} else {
ret = reg_node(pRExC_state, op);
}
-
- RExC_parse = (char *)cur_parse;
+ Set_Node_Offset_Length(REGNODE_p(ret), orig_parse - RExC_start,
+ RExC_parse - orig_parse);;
if (PL_regkind[op] == EXACT) {
alloc_maybe_populate_EXACT(pRExC_state, ret, flagp, 0, value,
if (PL_regkind[op] == EXACT) {
alloc_maybe_populate_EXACT(pRExC_state, ret, flagp, 0, value,