Lines Matching refs:opt

4235 set_bound_node_opt_info(NodeOptInfo* opt, MinMaxLen* mmd)  in set_bound_node_opt_info()  argument
4237 copy_mml(&(opt->exb.mmd), mmd); in set_bound_node_opt_info()
4238 copy_mml(&(opt->expr.mmd), mmd); in set_bound_node_opt_info()
4239 copy_mml(&(opt->map.mmd), mmd); in set_bound_node_opt_info()
4243 clear_node_opt_info(NodeOptInfo* opt) in clear_node_opt_info() argument
4245 clear_mml(&opt->len); in clear_node_opt_info()
4246 clear_opt_anc_info(&opt->anc); in clear_node_opt_info()
4247 clear_opt_exact_info(&opt->exb); in clear_node_opt_info()
4248 clear_opt_exact_info(&opt->exm); in clear_node_opt_info()
4249 clear_opt_exact_info(&opt->expr); in clear_node_opt_info()
4250 clear_opt_map_info(&opt->map); in clear_node_opt_info()
4334 optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env) in optimize_node_left() argument
4339 clear_node_opt_info(opt); in optimize_node_left()
4340 set_bound_node_opt_info(opt, &env->mmd); in optimize_node_left()
4355 concat_left_node_opt_info(env->enc, opt, &nopt); in optimize_node_left()
4369 if (nd == node) copy_node_opt_info(opt, &nopt); in optimize_node_left()
4370 else alt_merge_node_opt_info(opt, &nopt, env); in optimize_node_left()
4383 concat_opt_exact_info_str(&opt->exb, sn->s, sn->end, in optimize_node_left()
4386 add_char_opt_map_info(&opt->map, *(sn->s), env->enc); in optimize_node_left()
4388 set_mml(&opt->len, slen, slen); in optimize_node_left()
4393 concat_opt_exact_info_str(&opt->exb, sn->s, sn->end, in optimize_node_left()
4395 opt->exb.ignore_case = 1; in optimize_node_left()
4398 r = add_char_amb_opt_map_info(&opt->map, sn->s, sn->end, in optimize_node_left()
4410 set_mml(&opt->len, slen, max); in optimize_node_left()
4413 if (opt->exb.len == slen) in optimize_node_left()
4414 opt->exb.reach_end = 1; in optimize_node_left()
4429 set_mml(&opt->len, min, max); in optimize_node_left()
4435 add_char_opt_map_info(&opt->map, (UChar )i, env->enc); in optimize_node_left()
4438 set_mml(&opt->len, 1, 1); in optimize_node_left()
4456 add_char_opt_map_info(&opt->map, (UChar )i, env->enc); in optimize_node_left()
4464 add_char_opt_map_info(&opt->map, (UChar )i, env->enc); in optimize_node_left()
4473 set_mml(&opt->len, min, max); in optimize_node_left()
4481 set_mml(&opt->len, min, max); in optimize_node_left()
4493 add_opt_anc_info(&opt->anc, NANCHOR(node).type); in optimize_node_left()
4503 copy_opt_exact_info(&opt->expr, &nopt.exb); in optimize_node_left()
4505 copy_opt_exact_info(&opt->expr, &nopt.exm); in optimize_node_left()
4507 opt->expr.reach_end = 0; in optimize_node_left()
4510 copy_opt_map_info(&opt->map, &nopt.map); in optimize_node_left()
4531 set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE); in optimize_node_left()
4547 if (r == 0) set_mml(&opt->len, min, max); in optimize_node_left()
4554 set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE); in optimize_node_left()
4558 r = optimize_node_left(NCALL(node).target, opt, env); in optimize_node_left()
4578 add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_ML); in optimize_node_left()
4580 add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR); in optimize_node_left()
4585 copy_node_opt_info(opt, &nopt); in optimize_node_left()
4589 ! is_full_opt_exact_info(&opt->exb); i++) { in optimize_node_left()
4590 concat_opt_exact_info(&opt->exb, &nopt.exb, env->enc); in optimize_node_left()
4593 opt->exb.reach_end = 0; in optimize_node_left()
4599 opt->exb.reach_end = 0; in optimize_node_left()
4600 opt->exm.reach_end = 0; in optimize_node_left()
4603 opt->exm.reach_end = 0; in optimize_node_left()
4613 set_mml(&opt->len, min, max); in optimize_node_left()
4627 r = optimize_node_left(en->target, opt, env); in optimize_node_left()
4642 set_mml(&opt->len, min, max); in optimize_node_left()
4647 r = optimize_node_left(en->target, opt, env); in optimize_node_left()
4649 if (is_set_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK)) { in optimize_node_left()
4651 remove_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK); in optimize_node_left()
4657 r = optimize_node_left(en->target, opt, env); in optimize_node_left()
4755 NodeOptInfo opt; in set_optimize_info_from_tree() local
4764 r = optimize_node_left(node, &opt, &env); in set_optimize_info_from_tree()
4767 reg->anchor = opt.anc.left_anchor & (ANCHOR_BEGIN_BUF | in set_optimize_info_from_tree()
4770 reg->anchor |= opt.anc.right_anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF); in set_optimize_info_from_tree()
4773 reg->anchor_dmin = opt.len.min; in set_optimize_info_from_tree()
4774 reg->anchor_dmax = opt.len.max; in set_optimize_info_from_tree()
4777 if (opt.exb.len > 0 || opt.exm.len > 0) { in set_optimize_info_from_tree()
4778 select_opt_exact_info(reg->enc, &opt.exb, &opt.exm); in set_optimize_info_from_tree()
4779 if (opt.map.value > 0 && in set_optimize_info_from_tree()
4780 comp_opt_exact_or_map_info(&opt.exb, &opt.map) > 0) { in set_optimize_info_from_tree()
4784 r = set_optimize_exact_info(reg, &opt.exb); in set_optimize_info_from_tree()
4785 set_sub_anchor(reg, &opt.exb.anc); in set_optimize_info_from_tree()
4788 else if (opt.map.value > 0) { in set_optimize_info_from_tree()
4790 set_optimize_map_info(reg, &opt.map); in set_optimize_info_from_tree()
4791 set_sub_anchor(reg, &opt.map.anc); in set_optimize_info_from_tree()
4794 reg->sub_anchor |= opt.anc.left_anchor & ANCHOR_BEGIN_LINE; in set_optimize_info_from_tree()
4795 if (opt.len.max == 0) in set_optimize_info_from_tree()
4796 reg->sub_anchor |= opt.anc.right_anchor & ANCHOR_END_LINE; in set_optimize_info_from_tree()