blob: 76f3b2102954ea5bb65b17df0575a51d768dde91 [file] [log] [blame]
Bram Moolenaardc7c3662021-12-20 15:04:29 +00001/* vim9instr.c */
2isn_T *generate_instr(cctx_T *cctx, isntype_T isn_type);
3isn_T *generate_instr_drop(cctx_T *cctx, isntype_T isn_type, int drop);
4isn_T *generate_instr_type(cctx_T *cctx, isntype_T isn_type, type_T *type);
5isn_T *generate_instr_debug(cctx_T *cctx);
6int may_generate_2STRING(int offset, int tolerant, cctx_T *cctx);
7int generate_add_instr(cctx_T *cctx, vartype_T vartype, type_T *type1, type_T *type2, exprtype_T expr_type);
8vartype_T operator_type(type_T *type1, type_T *type2);
9int generate_two_op(cctx_T *cctx, char_u *op);
10int check_compare_types(exprtype_T type, typval_T *tv1, typval_T *tv2);
11int generate_COMPARE(cctx_T *cctx, exprtype_T exprtype, int ic);
12int generate_2BOOL(cctx_T *cctx, int invert, int offset);
13int generate_COND2BOOL(cctx_T *cctx);
14int generate_TYPECHECK(cctx_T *cctx, type_T *expected, int offset, int argidx);
15int generate_SETTYPE(cctx_T *cctx, type_T *expected);
16int generate_tv_PUSH(cctx_T *cctx, typval_T *tv);
17int generate_PUSHNR(cctx_T *cctx, varnumber_T number);
18int generate_PUSHBOOL(cctx_T *cctx, varnumber_T number);
19int generate_PUSHSPEC(cctx_T *cctx, varnumber_T number);
20int generate_PUSHF(cctx_T *cctx, float_T fnumber);
21int generate_PUSHS(cctx_T *cctx, char_u **str);
Bram Moolenaar397a87a2022-03-20 21:14:15 +000022int generate_PUSHCHANNEL(cctx_T *cctx);
23int generate_PUSHJOB(cctx_T *cctx);
Bram Moolenaardc7c3662021-12-20 15:04:29 +000024int generate_PUSHBLOB(cctx_T *cctx, blob_T *blob);
25int generate_PUSHFUNC(cctx_T *cctx, char_u *name, type_T *type);
Bram Moolenaar06b77222022-01-25 15:51:56 +000026int generate_AUTOLOAD(cctx_T *cctx, char_u *name, type_T *type);
Bram Moolenaardc7c3662021-12-20 15:04:29 +000027int generate_GETITEM(cctx_T *cctx, int index, int with_op);
28int generate_SLICE(cctx_T *cctx, int count);
29int generate_CHECKLEN(cctx_T *cctx, int min_len, int more_OK);
30int generate_STORE(cctx_T *cctx, isntype_T isn_type, int idx, char_u *name);
Bram Moolenaardc7c3662021-12-20 15:04:29 +000031int generate_STORENR(cctx_T *cctx, int idx, varnumber_T value);
Bram Moolenaardc7c3662021-12-20 15:04:29 +000032int generate_LOAD(cctx_T *cctx, isntype_T isn_type, int idx, char_u *name, type_T *type);
33int generate_LOADOUTER(cctx_T *cctx, int idx, int nesting, type_T *type);
34int generate_LOADV(cctx_T *cctx, char_u *name, int error);
35int generate_UNLET(cctx_T *cctx, isntype_T isn_type, char_u *name, int forceit);
36int generate_LOCKCONST(cctx_T *cctx);
37int generate_OLDSCRIPT(cctx_T *cctx, isntype_T isn_type, char_u *name, int sid, type_T *type);
38int generate_VIM9SCRIPT(cctx_T *cctx, isntype_T isn_type, int sid, int idx, type_T *type);
39int generate_NEWLIST(cctx_T *cctx, int count);
40int generate_NEWDICT(cctx_T *cctx, int count);
Bram Moolenaara915fa02022-03-23 11:29:15 +000041int generate_FUNCREF(cctx_T *cctx, ufunc_T *ufunc, isn_T **isnp);
Bram Moolenaardc7c3662021-12-20 15:04:29 +000042int generate_NEWFUNC(cctx_T *cctx, char_u *lambda_name, char_u *func_name);
43int generate_DEF(cctx_T *cctx, char_u *name, size_t len);
44int generate_JUMP(cctx_T *cctx, jumpwhen_T when, int where);
45int generate_JUMP_IF_ARG_SET(cctx_T *cctx, int arg_off);
46int generate_FOR(cctx_T *cctx, int loop_idx);
47int generate_TRYCONT(cctx_T *cctx, int levels, int where);
48int generate_BCALL(cctx_T *cctx, int func_idx, int argcount, int method_call);
49int generate_LISTAPPEND(cctx_T *cctx);
50int generate_BLOBAPPEND(cctx_T *cctx);
51int generate_CALL(cctx_T *cctx, ufunc_T *ufunc, int pushed_argcount);
52int generate_UCALL(cctx_T *cctx, char_u *name, int argcount);
53int generate_PCALL(cctx_T *cctx, int argcount, char_u *name, type_T *type, int at_top);
54int generate_STRINGMEMBER(cctx_T *cctx, char_u *name, size_t len);
55int generate_ECHO(cctx_T *cctx, int with_white, int count);
56int generate_MULT_EXPR(cctx_T *cctx, isntype_T isn_type, int count);
57int generate_PUT(cctx_T *cctx, int regname, linenr_T lnum);
58int generate_EXEC_copy(cctx_T *cctx, isntype_T isntype, char_u *line);
59int generate_EXEC(cctx_T *cctx, isntype_T isntype, char_u *str);
60int generate_LEGACY_EVAL(cctx_T *cctx, char_u *line);
61int generate_EXECCONCAT(cctx_T *cctx, int count);
62int generate_RANGE(cctx_T *cctx, char_u *range);
63int generate_UNPACK(cctx_T *cctx, int var_count, int semicolon);
64int generate_cmdmods(cctx_T *cctx, cmdmod_T *cmod);
65int generate_undo_cmdmods(cctx_T *cctx);
66int generate_store_var(cctx_T *cctx, assign_dest_T dest, int opt_flags, int vimvaridx, int scriptvar_idx, int scriptvar_sid, type_T *type, char_u *name);
Bram Moolenaar38ecd972022-01-15 21:44:44 +000067int inside_loop_scope(cctx_T *cctx);
Bram Moolenaar5cd64792021-12-25 18:23:24 +000068int generate_store_lhs(cctx_T *cctx, lhs_T *lhs, int instr_count, int is_decl);
Bram Moolenaardc7c3662021-12-20 15:04:29 +000069void may_generate_prof_end(cctx_T *cctx, int prof_lnum);
70void delete_instr(isn_T *isn);
71void clear_instr_ga(garray_T *gap);
72/* vim: set ft=c : */