int r;
int saved_num_null_check = reg->num_null_check;
- if (empty_info != QUANT_BODY_IS_NOT_EMPTY) {
+ if (empty_info != BODY_IS_NOT_EMPTY) {
r = add_op(reg, OP_EMPTY_CHECK_START);
if (r != 0) return r;
COP(reg)->empty_check_start.mem = reg->num_null_check; /* NULL CHECK ID */
r = compile_tree(node, reg, env);
if (r != 0) return r;
- if (empty_info != QUANT_BODY_IS_NOT_EMPTY) {
- if (empty_info == QUANT_BODY_IS_EMPTY)
+ if (empty_info != BODY_IS_NOT_EMPTY) {
+ if (empty_info == BODY_IS_EMPTY)
r = add_op(reg, OP_EMPTY_CHECK_END);
- else if (empty_info == QUANT_BODY_IS_EMPTY_MEM)
+ else if (empty_info == BODY_IS_EMPTY_MEM)
r = add_op(reg, OP_EMPTY_CHECK_END_MEMST);
- else if (empty_info == QUANT_BODY_IS_EMPTY_REC)
+ else if (empty_info == BODY_IS_EMPTY_REC)
r = add_op(reg, OP_EMPTY_CHECK_END_MEMST_PUSH);
if (r != 0) return r;
}
}
- if (empty_info == QUANT_BODY_IS_NOT_EMPTY)
+ if (empty_info == BODY_IS_NOT_EMPTY)
mod_tlen = tlen;
else
mod_tlen = tlen + (SIZE_OP_EMPTY_CHECK_START + SIZE_OP_EMPTY_CHECK_END);
}
}
- if (empty_info == QUANT_BODY_IS_NOT_EMPTY)
+ if (empty_info == BODY_IS_NOT_EMPTY)
mod_tlen = tlen;
else
mod_tlen = tlen + (SIZE_OP_EMPTY_CHECK_START + SIZE_OP_EMPTY_CHECK_END);
static enum QuantBodyEmpty
quantifiers_memory_node_info(Node* node)
{
- int r = QUANT_BODY_IS_EMPTY;
+ int r = BODY_IS_EMPTY;
switch (NODE_TYPE(node)) {
case NODE_LIST:
#ifdef USE_CALL
case NODE_CALL:
if (NODE_IS_RECURSION(node)) {
- return QUANT_BODY_IS_EMPTY_REC; /* tiny version */
+ return BODY_IS_EMPTY_REC; /* tiny version */
}
else
r = quantifiers_memory_node_info(NODE_BODY(node));
switch (en->type) {
case BAG_MEMORY:
if (NODE_IS_RECURSION(node)) {
- return QUANT_BODY_IS_EMPTY_REC;
+ return BODY_IS_EMPTY_REC;
}
- return QUANT_BODY_IS_EMPTY_MEM;
+ return BODY_IS_EMPTY_MEM;
break;
case BAG_OPTION:
if (d == 0) {
#ifdef USE_INSISTENT_CHECK_CAPTURES_IN_EMPTY_REPEAT
qn->empty_info = quantifiers_memory_node_info(body);
- if (qn->empty_info == QUANT_BODY_IS_EMPTY_REC) {
+ if (qn->empty_info == BODY_IS_EMPTY_REC) {
if (NODE_TYPE(body) == NODE_BAG &&
BAG_(body)->type == BAG_MEMORY) {
MEM_STATUS_ON(env->bt_mem_end, BAG_(body)->m.regnum);
}
}
#else
- qn->empty_info = QUANT_BODY_IS_EMPTY;
+ qn->empty_info = BODY_IS_EMPTY;
#endif
}
}
}
}
- if (qn->greedy && (qn->empty_info == QUANT_BODY_IS_NOT_EMPTY)) {
+ if (qn->greedy && (qn->empty_info == BODY_IS_NOT_EMPTY)) {
if (NODE_TYPE(body) == NODE_QUANT) {
QuantNode* tqn = QUANT_(body);
if (IS_NOT_NULL(tqn->head_exact)) {