Lines Matching refs:sctx
31 static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
72 re_sift_context_t *sctx,
76 re_sift_context_t *sctx);
78 re_sift_context_t *sctx, Idx str_idx,
81 re_sift_context_t *sctx,
105 re_sift_context_t *sctx,
913 re_sift_context_t sctx; in prune_impossible_nodes() local
941 sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, in prune_impossible_nodes()
943 ret = sift_states_backward (mctx, &sctx); in prune_impossible_nodes()
944 re_node_set_free (&sctx.limits); in prune_impossible_nodes()
972 sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); in prune_impossible_nodes()
973 ret = sift_states_backward (mctx, &sctx); in prune_impossible_nodes()
974 re_node_set_free (&sctx.limits); in prune_impossible_nodes()
1560 sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) in sift_states_backward() argument
1564 Idx str_idx = sctx->last_str_idx; in sift_states_backward()
1571 err = re_node_set_init_1 (&cur_dest, sctx->last_node); in sift_states_backward()
1574 err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); in sift_states_backward()
1582 null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; in sift_states_backward()
1585 memset (sctx->sifted_states, '\0', in sift_states_backward()
1595 err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); in sift_states_backward()
1604 err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); in sift_states_backward()
1616 build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, in build_sifted_states() argument
1640 naccepted = sift_states_iter_mb (mctx, sctx, prev_node, in build_sifted_states()
1641 str_idx, sctx->last_str_idx); in build_sifted_states()
1648 && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], in build_sifted_states()
1655 if (sctx->limits.nelem) in build_sifted_states()
1658 if (check_dst_limits (mctx, &sctx->limits, in build_sifted_states()
1726 re_sift_context_t *sctx, Idx str_idx, in update_cur_sifted_state() argument
1736 sctx->sifted_states[str_idx] = NULL; in update_cur_sifted_state()
1748 if (sctx->limits.nelem) in update_cur_sifted_state()
1750 err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, in update_cur_sifted_state()
1757 sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); in update_cur_sifted_state()
1764 err = sift_states_bkref (mctx, sctx, str_idx, candidates); in update_cur_sifted_state()
2082 sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, in sift_states_bkref() argument
2104 if (node == sctx->last_node && str_idx == sctx->last_str_idx) in sift_states_bkref()
2126 if (to_idx > sctx->last_str_idx in sift_states_bkref()
2127 || sctx->sifted_states[to_idx] == NULL in sift_states_bkref()
2128 || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) in sift_states_bkref()
2129 || check_dst_limits (mctx, &sctx->limits, node, in sift_states_bkref()
2135 local_sctx = *sctx; in sift_states_bkref()
2136 err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); in sift_states_bkref()
2152 if (sctx->limited_states != NULL) in sift_states_bkref()
2154 err = merge_state_array (dfa, sctx->limited_states, in sift_states_bkref()
2181 sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, in sift_states_iter_mb() argument
2189 && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], in sift_states_iter_mb()
4255 sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, in sift_ctx_init() argument
4258 sctx->sifted_states = sifted_sts; in sift_ctx_init()
4259 sctx->limited_states = limited_sts; in sift_ctx_init()
4260 sctx->last_node = last_node; in sift_ctx_init()
4261 sctx->last_str_idx = last_str_idx; in sift_ctx_init()
4262 re_node_set_init_empty (&sctx->limits); in sift_ctx_init()