Lines Matching refs:func

422 	size_t func;  member
765 BcFunc *func; member
1251 BcFunc *func = xc_program_func(ip->func); in bc_program_current_func() local
1252 return func; in bc_program_current_func()
1260 BcFunc *func = bc_program_current_func(); in xc_program_str() local
1261 return bc_vec_item(&func->strs, idx); in xc_program_str()
1271 BcFunc *func = bc_program_current_func(); in xc_program_const() local
1272 return bc_vec_item(&func->consts, idx); in xc_program_const()
2464 static FAST_FUNC void bc_func_free(void *func) in bc_func_free() argument
2466 BcFunc *f = (BcFunc *) func; in bc_func_free()
3588 BcVec *code = &G.prs.func->code; in xc_parse_push()
3596 BcVec *code = &G.prs.func->code; in xc_parse_pushName()
3647 bc_vec_pushIndex(&G.prs.func->code, idx); in xc_parse_pushIndex()
3672 xc_parse_pushInst_and_Index(XC_INST_STR, p->func->strs.len); in zbc_parse_pushSTR()
3673 bc_vec_push(&p->func->strs, &str); in zbc_parse_pushSTR()
3685 size_t idx = bc_vec_push(IS_BC ? &p->func->consts : &G.prog.consts, &num); in xc_parse_pushNUM()
3687 size_t idx = bc_vec_push(&p->func->consts, &num); in xc_parse_pushNUM()
3696 G.prs.func = xc_program_func(G.prs.fidx); in zxc_parse_text_init()
3724 bc_func_free(p->func); in xc_parse_reset()
3725 bc_func_init(p->func); in xc_parse_reset()
3728 p->func = xc_program_func_BC_PROG_MAIN(); in xc_parse_reset()
3760 p->func = xc_program_func(fidx); in xc_parse_create()
3794 BcFunc *func = xc_program_func(entry_ptr->idx); in bc_program_addFunc() local
3795 bc_func_free(func); in bc_program_addFunc()
3796 bc_func_init(func); in bc_program_addFunc()
4232 size_t *label = bc_vec_item(&p->func->labels, idx); in rewrite_label_to_current()
4233 *label = p->func->code.len; in rewrite_label_to_current()
4256 ip_idx = bc_vec_push(&p->func->labels, &ip_idx); in zbc_parse_if()
4267 ip2_idx = bc_vec_push(&p->func->labels, &ip2_idx); in zbc_parse_if()
4271 …dbg_lex("%s:%d rewriting 'if_zero' label to jump to 'else'-> %zd", __func__, __LINE__, p->func->co… in zbc_parse_if()
4280 …dbg_lex("%s:%d rewriting label to jump after 'if' body-> %zd", __func__, __LINE__, p->func->code.l… in zbc_parse_if()
4301 cond_idx = bc_vec_push(&p->func->labels, &p->func->code.len); in zbc_parse_while()
4306 bc_vec_push(&p->func->labels, &ip_idx); in zbc_parse_while()
4320 dbg_lex("%s:%d rewriting label-> %zd", __func__, __LINE__, p->func->code.len); in zbc_parse_while()
4356 cond_idx = bc_vec_push(&p->func->labels, &p->func->code.len); in zbc_parse_for()
4382 bc_vec_push(&p->func->labels, &p->func->code.len); in zbc_parse_for()
4395 bc_vec_push(&p->func->labels, &p->func->code.len); in zbc_parse_for()
4398 bc_vec_push(&p->func->labels, &exit_idx); in zbc_parse_for()
4406 dbg_lex("%s:%d rewriting label-> %zd", __func__, __LINE__, p->func->code.len); in zbc_parse_for()
4492 p->func = xc_program_func(p->fidx); in zbc_parse_funcdef()
4493 p->func->voidfunc = voidfunc; in zbc_parse_funcdef()
4513 ++p->func->nparams; in zbc_parse_funcdef()
4543 s = zbc_func_insert(p->func, name, t); in zbc_parse_funcdef()
4573 p->func = xc_program_func_BC_PROG_MAIN(); in zbc_parse_funcdef()
4618 s = zbc_func_insert(p->func, name, t); in zbc_parse_auto()
5050 p->func = xc_program_func(p->fidx); in dc_parse_string()
5500 ip.func = BC_PROG_READ; in zxc_program_read()
6165 BcFunc *func; in zbc_program_call() local
6168 ip.func = xc_program_index(code, idx); in zbc_program_call()
6169 func = xc_program_func(ip.func); in zbc_program_call()
6171 if (func->code.len == 0) { in zbc_program_call()
6174 if (nparams != func->nparams) { in zbc_program_call()
6175 …RETURN_STATUS(bc_error_fmt("function has %u parameters, but called with %u", func->nparams, nparam… in zbc_program_call()
6184 a = bc_vec_item(&func->autos, nparams - 1 - i); in zbc_program_call()
6198 a = bc_vec_item(&func->autos, i); in zbc_program_call()
6199 for (; i < func->autos.len; i++, a++) { in zbc_program_call()
6229 f = xc_program_func(ip->func); in zbc_program_return()
6638 ip.func = fidx; in zdc_program_execStr()
6674 BcFunc *func = xc_program_func(ip->func); in zxc_program_exec() local
6675 char *code = func->code.v; in zxc_program_exec()
6678 ip->func, func->code.len, ip->inst_idx, G.prog.results.len); in zxc_program_exec()
6679 while (ip->inst_idx < func->code.len) { in zxc_program_exec()
6712 size_t *addr = bc_vec_item(&func->labels, idx); in zxc_program_exec()
6927 func = xc_program_func(ip->func); in zxc_program_exec()
6928 code = func->code.v; in zxc_program_exec()
6929 dbg_exec("func:%zd bytes:%zd ip:%zd", ip->func, func->code.len, ip->inst_idx); in zxc_program_exec()
6996 if (ip->func != BC_PROG_MAIN) in zxc_vm_process()