Lines Matching refs:opt
4496 set_bound_node_opt_info(NodeOptInfo* opt, MinMaxLen* mmd) in set_bound_node_opt_info() argument
4498 copy_mml(&(opt->exb.mmd), mmd); in set_bound_node_opt_info()
4499 copy_mml(&(opt->expr.mmd), mmd); in set_bound_node_opt_info()
4500 copy_mml(&(opt->map.mmd), mmd); in set_bound_node_opt_info()
4504 clear_node_opt_info(NodeOptInfo* opt) in clear_node_opt_info() argument
4506 clear_mml(&opt->len); in clear_node_opt_info()
4507 clear_opt_anc_info(&opt->anc); in clear_node_opt_info()
4508 clear_opt_exact_info(&opt->exb); in clear_node_opt_info()
4509 clear_opt_exact_info(&opt->exm); in clear_node_opt_info()
4510 clear_opt_exact_info(&opt->expr); in clear_node_opt_info()
4511 clear_opt_map_info(&opt->map); in clear_node_opt_info()
4595 optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env) in optimize_node_left() argument
4600 clear_node_opt_info(opt); in optimize_node_left()
4601 set_bound_node_opt_info(opt, &env->mmd); in optimize_node_left()
4616 concat_left_node_opt_info(env->enc, opt, &nopt); in optimize_node_left()
4630 if (nd == node) copy_node_opt_info(opt, &nopt); in optimize_node_left()
4631 else alt_merge_node_opt_info(opt, &nopt, env); in optimize_node_left()
4644 concat_opt_exact_info_str(&opt->exb, sn->s, sn->end, in optimize_node_left()
4647 add_char_opt_map_info(&opt->map, *(sn->s), env->enc); in optimize_node_left()
4649 set_mml(&opt->len, slen, slen); in optimize_node_left()
4659 concat_opt_exact_info_str(&opt->exb, sn->s, sn->end, in optimize_node_left()
4661 opt->exb.ignore_case = 1; in optimize_node_left()
4664 r = add_char_amb_opt_map_info(&opt->map, sn->s, sn->end, in optimize_node_left()
4672 set_mml(&opt->len, slen, max); in optimize_node_left()
4675 if (opt->exb.len == slen) in optimize_node_left()
4676 opt->exb.reach_end = 1; in optimize_node_left()
4691 set_mml(&opt->len, min, max); in optimize_node_left()
4697 add_char_opt_map_info(&opt->map, (UChar )i, env->enc); in optimize_node_left()
4700 set_mml(&opt->len, 1, 1); in optimize_node_left()
4719 add_char_opt_map_info(&opt->map, (UChar )i, env->enc); in optimize_node_left()
4726 add_char_opt_map_info(&opt->map, (UChar )i, env->enc); in optimize_node_left()
4736 set_mml(&opt->len, min, max); in optimize_node_left()
4744 set_mml(&opt->len, min, max); in optimize_node_left()
4758 add_opt_anc_info(&opt->anc, NANCHOR(node)->type); in optimize_node_left()
4768 copy_opt_exact_info(&opt->expr, &nopt.exb); in optimize_node_left()
4770 copy_opt_exact_info(&opt->expr, &nopt.exm); in optimize_node_left()
4772 opt->expr.reach_end = 0; in optimize_node_left()
4775 copy_opt_map_info(&opt->map, &nopt.map); in optimize_node_left()
4794 set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE); in optimize_node_left()
4810 if (r == 0) set_mml(&opt->len, min, max); in optimize_node_left()
4817 set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE); in optimize_node_left()
4821 r = optimize_node_left(NCALL(node)->target, opt, env); in optimize_node_left()
4841 add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_ML); in optimize_node_left()
4843 add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR); in optimize_node_left()
4848 copy_node_opt_info(opt, &nopt); in optimize_node_left()
4852 ! is_full_opt_exact_info(&opt->exb); i++) { in optimize_node_left()
4853 concat_opt_exact_info(&opt->exb, &nopt.exb, env->enc); in optimize_node_left()
4856 opt->exb.reach_end = 0; in optimize_node_left()
4862 opt->exb.reach_end = 0; in optimize_node_left()
4863 opt->exm.reach_end = 0; in optimize_node_left()
4866 opt->exm.reach_end = 0; in optimize_node_left()
4876 set_mml(&opt->len, min, max); in optimize_node_left()
4890 r = optimize_node_left(en->target, opt, env); in optimize_node_left()
4905 set_mml(&opt->len, min, max); in optimize_node_left()
4910 r = optimize_node_left(en->target, opt, env); in optimize_node_left()
4912 if (is_set_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK)) { in optimize_node_left()
4914 remove_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK); in optimize_node_left()
4920 r = optimize_node_left(en->target, opt, env); in optimize_node_left()
5018 NodeOptInfo opt; in set_optimize_info_from_tree() local
5027 r = optimize_node_left(node, &opt, &env); in set_optimize_info_from_tree()
5030 reg->anchor = opt.anc.left_anchor & (ANCHOR_BEGIN_BUF | in set_optimize_info_from_tree()
5034 if ((opt.anc.left_anchor & (ANCHOR_LOOK_BEHIND | ANCHOR_PREC_READ_NOT)) != 0) in set_optimize_info_from_tree()
5037 reg->anchor |= opt.anc.right_anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF | in set_optimize_info_from_tree()
5041 reg->anchor_dmin = opt.len.min; in set_optimize_info_from_tree()
5042 reg->anchor_dmax = opt.len.max; in set_optimize_info_from_tree()
5045 if (opt.exb.len > 0 || opt.exm.len > 0) { in set_optimize_info_from_tree()
5046 select_opt_exact_info(reg->enc, &opt.exb, &opt.exm); in set_optimize_info_from_tree()
5047 if (opt.map.value > 0 && in set_optimize_info_from_tree()
5048 comp_opt_exact_or_map_info(&opt.exb, &opt.map) > 0) { in set_optimize_info_from_tree()
5052 r = set_optimize_exact_info(reg, &opt.exb); in set_optimize_info_from_tree()
5053 set_sub_anchor(reg, &opt.exb.anc); in set_optimize_info_from_tree()
5056 else if (opt.map.value > 0) { in set_optimize_info_from_tree()
5058 set_optimize_map_info(reg, &opt.map); in set_optimize_info_from_tree()
5059 set_sub_anchor(reg, &opt.map.anc); in set_optimize_info_from_tree()
5062 reg->sub_anchor |= opt.anc.left_anchor & ANCHOR_BEGIN_LINE; in set_optimize_info_from_tree()
5063 if (opt.len.max == 0) in set_optimize_info_from_tree()
5064 reg->sub_anchor |= opt.anc.right_anchor & ANCHOR_END_LINE; in set_optimize_info_from_tree()