Lines Matching refs:ppconst
2782 static int compile_expr1(char_u **arg, cctx_T *cctx, ppconst_T *ppconst);
2834 generate_ppconst(cctx_T *cctx, ppconst_T *ppconst) in generate_ppconst() argument
2841 for (i = 0; i < ppconst->pp_used; ++i) in generate_ppconst()
2842 if (generate_tv_PUSH(cctx, &ppconst->pp_tv[i]) == FAIL) in generate_ppconst()
2844 ppconst->pp_used = 0; in generate_ppconst()
2853 check_ppconst_bool(ppconst_T *ppconst) in check_ppconst_bool() argument
2855 if (ppconst->pp_used > 0) in check_ppconst_bool()
2857 typval_T *tv = &ppconst->pp_tv[ppconst->pp_used - 1]; in check_ppconst_bool()
2869 clear_ppconst(ppconst_T *ppconst) in clear_ppconst() argument
2873 for (i = 0; i < ppconst->pp_used; ++i) in clear_ppconst()
2874 clear_tv(&ppconst->pp_tv[i]); in clear_ppconst()
2875 ppconst->pp_used = 0; in clear_ppconst()
3415 ppconst_T *ppconst, in compile_call() argument
3449 typval_T *tv = &ppconst->pp_tv[ppconst->pp_used]; in compile_call()
3460 ++ppconst->pp_used; in compile_call()
3471 if (generate_ppconst(cctx, ppconst) == FAIL) in compile_call()
3644 compile_list(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) in compile_list() argument
3688 ppconst->pp_is_const = is_all_const; in compile_list()
3812 compile_dict(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) in compile_dict() argument
3825 if (generate_ppconst(cctx, ppconst) == FAIL) in compile_dict()
3963 ppconst->pp_is_const = is_all_const; in compile_dict()
4280 compile_parenthesis(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) in compile_parenthesis() argument
4287 if (ppconst->pp_used <= PPSIZE - 10) in compile_parenthesis()
4289 ret = compile_expr1(arg, cctx, ppconst); in compile_parenthesis()
4294 if (generate_ppconst(cctx, ppconst) == FAIL) in compile_parenthesis()
4320 ppconst_T *ppconst) in compile_subscript() argument
4358 if (generate_ppconst(cctx, ppconst) == FAIL) in compile_subscript()
4360 ppconst->pp_is_const = FALSE; in compile_subscript()
4381 if (generate_ppconst(cctx, ppconst) == FAIL) in compile_subscript()
4383 ppconst->pp_is_const = FALSE; in compile_subscript()
4408 if (compile_parenthesis(arg, cctx, ppconst) == FAIL) in compile_subscript()
4483 if (compile_call(arg, p - *arg, cctx, ppconst, 1) == FAIL) in compile_subscript()
4501 if (generate_ppconst(cctx, ppconst) == FAIL) in compile_subscript()
4503 ppconst->pp_is_const = FALSE; in compile_subscript()
4571 if (generate_ppconst(cctx, ppconst) == FAIL) in compile_subscript()
4573 ppconst->pp_is_const = FALSE; in compile_subscript()
4646 ppconst_T *ppconst) in compile_expr7() argument
4650 typval_T *rettv = &ppconst->pp_tv[ppconst->pp_used]; in compile_expr7()
4651 int used_before = ppconst->pp_used; in compile_expr7()
4653 ppconst->pp_is_const = FALSE; in compile_expr7()
4758 case '[': if (generate_ppconst(cctx, ppconst) == FAIL) in compile_expr7()
4760 ret = compile_list(arg, cctx, ppconst); in compile_expr7()
4766 case '{': if (generate_ppconst(cctx, ppconst) == FAIL) in compile_expr7()
4768 ret = compile_dict(arg, cctx, ppconst); in compile_expr7()
4774 case '&': if (generate_ppconst(cctx, ppconst) == FAIL) in compile_expr7()
4782 case '$': if (generate_ppconst(cctx, ppconst) == FAIL) in compile_expr7()
4790 case '@': if (generate_ppconst(cctx, ppconst) == FAIL) in compile_expr7()
4802 ret = compile_parenthesis(arg, cctx, ppconst); in compile_expr7()
4811 if (rettv->v_type != VAR_UNKNOWN && used_before == ppconst->pp_used) in compile_expr7()
4818 ++ppconst->pp_used; in compile_expr7()
4847 r = compile_call(arg, p - *arg, cctx, ppconst, 0); in compile_expr7()
4852 && generate_ppconst(cctx, ppconst) == FAIL) in compile_expr7()
4863 ppconst) == FAIL) in compile_expr7()
4865 if (ppconst->pp_used > 0) in compile_expr7()
4868 rettv = &ppconst->pp_tv[ppconst->pp_used - 1]; in compile_expr7()
4894 compile_expr7t(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) in compile_expr7t() argument
4919 if (compile_expr7(arg, cctx, ppconst) == FAIL) in compile_expr7t()
4928 generate_ppconst(cctx, ppconst); in compile_expr7t()
4946 compile_expr6(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) in compile_expr6() argument
4950 int ppconst_used = ppconst->pp_used; in compile_expr6()
4953 if (compile_expr7t(arg, cctx, ppconst) == FAIL) in compile_expr6()
4979 if (compile_expr7t(arg, cctx, ppconst) == FAIL) in compile_expr6()
4982 if (ppconst->pp_used == ppconst_used + 2 in compile_expr6()
4983 && ppconst->pp_tv[ppconst_used].v_type == VAR_NUMBER in compile_expr6()
4984 && ppconst->pp_tv[ppconst_used + 1].v_type == VAR_NUMBER) in compile_expr6()
4986 typval_T *tv1 = &ppconst->pp_tv[ppconst_used]; in compile_expr6()
4987 typval_T *tv2 = &ppconst->pp_tv[ppconst_used + 1]; in compile_expr6()
5006 --ppconst->pp_used; in compile_expr6()
5010 generate_ppconst(cctx, ppconst); in compile_expr6()
5024 compile_expr5(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) in compile_expr5() argument
5029 int ppconst_used = ppconst->pp_used; in compile_expr5()
5032 if (compile_expr6(arg, cctx, ppconst) == FAIL) in compile_expr5()
5064 if (compile_expr6(arg, cctx, ppconst) == FAIL) in compile_expr5()
5067 if (ppconst->pp_used == ppconst_used + 2 in compile_expr5()
5069 ? (ppconst->pp_tv[ppconst_used].v_type == VAR_STRING in compile_expr5()
5070 && ppconst->pp_tv[ppconst_used + 1].v_type == VAR_STRING) in compile_expr5()
5071 : (ppconst->pp_tv[ppconst_used].v_type == VAR_NUMBER in compile_expr5()
5072 && ppconst->pp_tv[ppconst_used + 1].v_type == VAR_NUMBER))) in compile_expr5()
5074 typval_T *tv1 = &ppconst->pp_tv[ppconst_used]; in compile_expr5()
5075 typval_T *tv2 = &ppconst->pp_tv[ppconst_used + 1]; in compile_expr5()
5092 clear_ppconst(ppconst); in compile_expr5()
5100 --ppconst->pp_used; in compile_expr5()
5104 generate_ppconst(cctx, ppconst); in compile_expr5()
5105 ppconst->pp_is_const = FALSE; in compile_expr5()
5139 compile_expr4(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) in compile_expr4() argument
5146 int ppconst_used = ppconst->pp_used; in compile_expr4()
5149 if (compile_expr5(arg, cctx, ppconst) == FAIL) in compile_expr4()
5193 if (compile_expr5(arg, cctx, ppconst) == FAIL) in compile_expr4()
5196 if (ppconst->pp_used == ppconst_used + 2) in compile_expr4()
5198 typval_T * tv1 = &ppconst->pp_tv[ppconst->pp_used - 2]; in compile_expr4()
5199 typval_T *tv2 = &ppconst->pp_tv[ppconst->pp_used - 1]; in compile_expr4()
5214 --ppconst->pp_used; in compile_expr4()
5219 generate_ppconst(cctx, ppconst); in compile_expr4()
5226 static int compile_expr3(char_u **arg, cctx_T *cctx, ppconst_T *ppconst);
5236 ppconst_T *ppconst, in compile_and_or() argument
5283 status = check_ppconst_bool(ppconst); in compile_and_or()
5287 if (ppconst->pp_used > 0) in compile_and_or()
5289 typval_T *tv = &ppconst->pp_tv[ppconst->pp_used - 1]; in compile_and_or()
5306 --ppconst->pp_used; in compile_and_or()
5343 const_used = ppconst->pp_used; in compile_and_or()
5344 if ((opchar == '|' ? compile_expr3(arg, cctx, ppconst) in compile_and_or()
5345 : compile_expr4(arg, cctx, ppconst)) == FAIL) in compile_and_or()
5352 if (ppconst->pp_used == const_used + 1) in compile_and_or()
5354 typval_T *tv = &ppconst->pp_tv[ppconst->pp_used - 1]; in compile_and_or()
5368 if (check_ppconst_bool(ppconst) == FAIL) in compile_and_or()
5374 if (cctx->ctx_skip != SKIP_YES && ppconst->pp_used == 0) in compile_and_or()
5385 generate_ppconst(cctx, ppconst); in compile_and_or()
5417 compile_expr3(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) in compile_expr3() argument
5419 int ppconst_used = ppconst->pp_used; in compile_expr3()
5422 if (compile_expr4(arg, cctx, ppconst) == FAIL) in compile_expr3()
5426 return compile_and_or(arg, cctx, "&&", ppconst, ppconst_used); in compile_expr3()
5442 compile_expr2(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) in compile_expr2() argument
5444 int ppconst_used = ppconst->pp_used; in compile_expr2()
5447 if (compile_expr3(arg, cctx, ppconst) == FAIL) in compile_expr2()
5451 return compile_and_or(arg, cctx, "||", ppconst, ppconst_used); in compile_expr2()
5472 compile_expr1(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) in compile_expr1() argument
5475 int ppconst_used = ppconst->pp_used; in compile_expr1()
5486 if (compile_expr2(arg, cctx, ppconst) == FAIL) in compile_expr1()
5516 if (ppconst->pp_used == ppconst_used + 1) in compile_expr1()
5522 const_value = tv2bool(&ppconst->pp_tv[ppconst_used]); in compile_expr1()
5527 const_value = tv_get_bool_chk(&ppconst->pp_tv[ppconst_used], in compile_expr1()
5537 generate_ppconst(cctx, ppconst); in compile_expr1()
5540 clear_tv(&ppconst->pp_tv[ppconst_used]); in compile_expr1()
5541 --ppconst->pp_used; in compile_expr1()
5546 generate_ppconst(cctx, ppconst); in compile_expr1()
5558 if (compile_expr1(arg, cctx, ppconst) == FAIL) in compile_expr1()
5563 generate_ppconst(cctx, ppconst); in compile_expr1()
5608 if (compile_expr1(arg, cctx, ppconst) == FAIL) in compile_expr1()
5616 generate_ppconst(cctx, ppconst); in compile_expr1()
5640 ppconst_T ppconst; in compile_expr0_ext() local
5642 CLEAR_FIELD(ppconst); in compile_expr0_ext()
5643 if (compile_expr1(arg, cctx, &ppconst) == FAIL) in compile_expr0_ext()
5645 clear_ppconst(&ppconst); in compile_expr0_ext()
5649 *is_const = ppconst.pp_used > 0 || ppconst.pp_is_const; in compile_expr0_ext()
5650 if (generate_ppconst(cctx, &ppconst) == FAIL) in compile_expr0_ext()
7721 ppconst_T ppconst; in compile_if() local
7723 CLEAR_FIELD(ppconst); in compile_if()
7724 if (compile_expr1(&p, cctx, &ppconst) == FAIL) in compile_if()
7726 clear_ppconst(&ppconst); in compile_if()
7735 clear_ppconst(&ppconst); in compile_if()
7736 else if (instr->ga_len == instr_count && ppconst.pp_used == 1) in compile_if()
7742 v = tv_get_bool_chk(&ppconst.pp_tv[0], &error); in compile_if()
7743 clear_ppconst(&ppconst); in compile_if()
7752 if (generate_ppconst(cctx, &ppconst) == FAIL) in compile_if()
7800 ppconst_T ppconst; in compile_elseif() local
7877 CLEAR_FIELD(ppconst); in compile_elseif()
7896 if (compile_expr1(&p, cctx, &ppconst) == FAIL) in compile_elseif()
7898 clear_ppconst(&ppconst); in compile_elseif()
7908 clear_ppconst(&ppconst); in compile_elseif()
7909 else if (instr->ga_len == instr_count && ppconst.pp_used == 1) in compile_elseif()
7916 v = tv_get_bool_chk(&ppconst.pp_tv[0], &error); in compile_elseif()
7920 clear_ppconst(&ppconst); in compile_elseif()
7927 if (generate_ppconst(cctx, &ppconst) == FAIL) in compile_elseif()