summaryrefslogtreecommitdiffstats
path: root/src/proto
diff options
context:
space:
mode:
Diffstat (limited to 'src/proto')
-rw-r--r--src/proto/vim9cmds.pro33
-rw-r--r--src/proto/vim9compile.pro24
-rw-r--r--src/proto/vim9expr.pro17
-rw-r--r--src/proto/vim9instr.pro72
4 files changed, 136 insertions, 10 deletions
diff --git a/src/proto/vim9cmds.pro b/src/proto/vim9cmds.pro
new file mode 100644
index 0000000000..7529d63d62
--- /dev/null
+++ b/src/proto/vim9cmds.pro
@@ -0,0 +1,33 @@
+/* vim9cmds.c */
+void free_locals(cctx_T *cctx);
+int check_vim9_unlet(char_u *name);
+char_u *compile_unletlock(char_u *arg, exarg_T *eap, cctx_T *cctx);
+void drop_scope(cctx_T *cctx);
+char_u *compile_if(char_u *arg, cctx_T *cctx);
+char_u *compile_elseif(char_u *arg, cctx_T *cctx);
+char_u *compile_else(char_u *arg, cctx_T *cctx);
+char_u *compile_endif(char_u *arg, cctx_T *cctx);
+char_u *compile_for(char_u *arg_start, cctx_T *cctx);
+char_u *compile_endfor(char_u *arg, cctx_T *cctx);
+char_u *compile_while(char_u *arg, cctx_T *cctx);
+char_u *compile_endwhile(char_u *arg, cctx_T *cctx);
+char_u *compile_continue(char_u *arg, cctx_T *cctx);
+char_u *compile_break(char_u *arg, cctx_T *cctx);
+char_u *compile_block(char_u *arg, cctx_T *cctx);
+void compile_endblock(cctx_T *cctx);
+char_u *compile_try(char_u *arg, cctx_T *cctx);
+char_u *compile_catch(char_u *arg, cctx_T *cctx);
+char_u *compile_finally(char_u *arg, cctx_T *cctx);
+char_u *compile_endtry(char_u *arg, cctx_T *cctx);
+char_u *compile_throw(char_u *arg, cctx_T *cctx);
+char_u *compile_eval(char_u *arg, cctx_T *cctx);
+char_u *compile_mult_expr(char_u *arg, int cmdidx, cctx_T *cctx);
+char_u *compile_put(char_u *arg, exarg_T *eap, cctx_T *cctx);
+char_u *compile_exec(char_u *line_arg, exarg_T *eap, cctx_T *cctx);
+char_u *compile_script(char_u *line, cctx_T *cctx);
+char_u *compile_substitute(char_u *arg, exarg_T *eap, cctx_T *cctx);
+char_u *compile_redir(char_u *line, exarg_T *eap, cctx_T *cctx);
+char_u *compile_cexpr(char_u *line, exarg_T *eap, cctx_T *cctx);
+char_u *compile_return(char_u *arg, int check_return_type, int legacy, cctx_T *cctx);
+int check_global_and_subst(char_u *cmd, char_u *arg);
+/* vim: set ft=c : */
diff --git a/src/proto/vim9compile.pro b/src/proto/vim9compile.pro
index 5910c67d6c..33290d09e7 100644
--- a/src/proto/vim9compile.pro
+++ b/src/proto/vim9compile.pro
@@ -1,26 +1,30 @@
/* vim9compile.c */
+int lookup_local(char_u *name, size_t len, lvar_T *lvar, cctx_T *cctx);
+int arg_exists(char_u *name, size_t len, int *idxp, type_T **type, int *gen_load_outer, cctx_T *cctx);
+int script_is_vim9(void);
+int script_var_exists(char_u *name, size_t len, cctx_T *cctx);
int check_defined(char_u *p, size_t len, cctx_T *cctx, int is_arg);
-int check_compare_types(exprtype_T type, typval_T *tv1, typval_T *tv2);
int need_type(type_T *actual, type_T *expected, int offset, int arg_idx, cctx_T *cctx, int silent, int actual_is_const);
-int func_needs_compiling(ufunc_T *ufunc, compiletype_T compile_type);
+lvar_T *reserve_local(cctx_T *cctx, char_u *name, size_t len, int isConst, type_T *type);
int get_script_item_idx(int sid, char_u *name, int check_writable, cctx_T *cctx);
imported_T *find_imported(char_u *name, size_t len, cctx_T *cctx);
imported_T *find_imported_in_script(char_u *name, size_t len, int sid);
+char_u *may_peek_next_line(cctx_T *cctx, char_u *arg, char_u **nextp);
char_u *peek_next_line_from_context(cctx_T *cctx);
char_u *next_line_from_context(cctx_T *cctx, int skip_comment);
-char_u *to_name_end(char_u *arg, int use_namespace);
-char_u *to_name_const_end(char_u *arg);
-int get_lambda_tv_and_compile(char_u **arg, typval_T *rettv, int types_optional, evalarg_T *evalarg);
-exprtype_T get_compare_type(char_u *p, int *len, int *type_is);
-void error_white_both(char_u *op, int len);
+int may_get_next_line(char_u *whitep, char_u **arg, cctx_T *cctx);
+int may_get_next_line_error(char_u *whitep, char_u **arg, cctx_T *cctx);
void fill_exarg_from_cctx(exarg_T *eap, cctx_T *cctx);
+int func_needs_compiling(ufunc_T *ufunc, compiletype_T compile_type);
int assignment_len(char_u *p, int *heredoc);
void vim9_declare_error(char_u *name);
-int check_vim9_unlet(char_u *name);
-int check_global_and_subst(char_u *cmd, char_u *arg);
+int get_var_dest(char_u *name, assign_dest_T *dest, int cmdidx, int *option_scope, int *vimvaridx, type_T **type, cctx_T *cctx);
+int compile_lhs(char_u *var_start, lhs_T *lhs, int cmdidx, int heredoc, int oplen, cctx_T *cctx);
+int compile_assign_lhs(char_u *var_start, lhs_T *lhs, int cmdidx, int is_decl, int heredoc, int oplen, cctx_T *cctx);
+int compile_load_lhs_with_index(lhs_T *lhs, char_u *var_start, cctx_T *cctx);
+int compile_assign_unlet(char_u *var_start, lhs_T *lhs, int is_assign, type_T *rhs_type, cctx_T *cctx);
int compile_def_function(ufunc_T *ufunc, int check_return_type, compiletype_T compile_type, cctx_T *outer_cctx);
void set_function_type(ufunc_T *ufunc);
-void delete_instr(isn_T *isn);
void unlink_def_function(ufunc_T *ufunc);
void link_def_function(ufunc_T *ufunc);
void free_def_functions(void);
diff --git a/src/proto/vim9expr.pro b/src/proto/vim9expr.pro
new file mode 100644
index 0000000000..aa8450902d
--- /dev/null
+++ b/src/proto/vim9expr.pro
@@ -0,0 +1,17 @@
+/* vim9expr.c */
+int generate_ppconst(cctx_T *cctx, ppconst_T *ppconst);
+void clear_ppconst(ppconst_T *ppconst);
+int compile_member(int is_slice, int *keeping_dict, cctx_T *cctx);
+int compile_load_scriptvar(cctx_T *cctx, char_u *name, char_u *start, char_u **end, int error);
+int compile_load(char_u **arg, char_u *end_arg, cctx_T *cctx, int is_expr, int error);
+char_u *to_name_end(char_u *arg, int use_namespace);
+char_u *to_name_const_end(char_u *arg);
+int get_lambda_tv_and_compile(char_u **arg, typval_T *rettv, int types_optional, evalarg_T *evalarg);
+exprtype_T get_compare_type(char_u *p, int *len, int *type_is);
+void skip_expr_cctx(char_u **arg, cctx_T *cctx);
+int bool_on_stack(cctx_T *cctx);
+void error_white_both(char_u *op, int len);
+int compile_expr1(char_u **arg, cctx_T *cctx, ppconst_T *ppconst);
+int compile_expr0_ext(char_u **arg, cctx_T *cctx, int *is_const);
+int compile_expr0(char_u **arg, cctx_T *cctx);
+/* vim: set ft=c : */
diff --git a/src/proto/vim9instr.pro b/src/proto/vim9instr.pro
new file mode 100644
index 0000000000..4df3af0018
--- /dev/null
+++ b/src/proto/vim9instr.pro
@@ -0,0 +1,72 @@
+/* vim9instr.c */
+isn_T *generate_instr(cctx_T *cctx, isntype_T isn_type);
+isn_T *generate_instr_drop(cctx_T *cctx, isntype_T isn_type, int drop);
+isn_T *generate_instr_type(cctx_T *cctx, isntype_T isn_type, type_T *type);
+isn_T *generate_instr_debug(cctx_T *cctx);
+int may_generate_2STRING(int offset, int tolerant, cctx_T *cctx);
+int generate_add_instr(cctx_T *cctx, vartype_T vartype, type_T *type1, type_T *type2, exprtype_T expr_type);
+vartype_T operator_type(type_T *type1, type_T *type2);
+int generate_two_op(cctx_T *cctx, char_u *op);
+int check_compare_types(exprtype_T type, typval_T *tv1, typval_T *tv2);
+int generate_COMPARE(cctx_T *cctx, exprtype_T exprtype, int ic);
+int generate_2BOOL(cctx_T *cctx, int invert, int offset);
+int generate_COND2BOOL(cctx_T *cctx);
+int generate_TYPECHECK(cctx_T *cctx, type_T *expected, int offset, int argidx);
+int generate_SETTYPE(cctx_T *cctx, type_T *expected);
+int generate_tv_PUSH(cctx_T *cctx, typval_T *tv);
+int generate_PUSHNR(cctx_T *cctx, varnumber_T number);
+int generate_PUSHBOOL(cctx_T *cctx, varnumber_T number);
+int generate_PUSHSPEC(cctx_T *cctx, varnumber_T number);
+int generate_PUSHF(cctx_T *cctx, float_T fnumber);
+int generate_PUSHS(cctx_T *cctx, char_u **str);
+int generate_PUSHCHANNEL(cctx_T *cctx, channel_T *channel);
+int generate_PUSHJOB(cctx_T *cctx, job_T *job);
+int generate_PUSHBLOB(cctx_T *cctx, blob_T *blob);
+int generate_PUSHFUNC(cctx_T *cctx, char_u *name, type_T *type);
+int generate_GETITEM(cctx_T *cctx, int index, int with_op);
+int generate_SLICE(cctx_T *cctx, int count);
+int generate_CHECKLEN(cctx_T *cctx, int min_len, int more_OK);
+int generate_STORE(cctx_T *cctx, isntype_T isn_type, int idx, char_u *name);
+int generate_STOREOUTER(cctx_T *cctx, int idx, int level);
+int generate_STORENR(cctx_T *cctx, int idx, varnumber_T value);
+int generate_STOREOPT(cctx_T *cctx, isntype_T isn_type, char_u *name, int opt_flags);
+int generate_LOAD(cctx_T *cctx, isntype_T isn_type, int idx, char_u *name, type_T *type);
+int generate_LOADOUTER(cctx_T *cctx, int idx, int nesting, type_T *type);
+int generate_LOADV(cctx_T *cctx, char_u *name, int error);
+int generate_UNLET(cctx_T *cctx, isntype_T isn_type, char_u *name, int forceit);
+int generate_LOCKCONST(cctx_T *cctx);
+int generate_OLDSCRIPT(cctx_T *cctx, isntype_T isn_type, char_u *name, int sid, type_T *type);
+int generate_VIM9SCRIPT(cctx_T *cctx, isntype_T isn_type, int sid, int idx, type_T *type);
+int generate_NEWLIST(cctx_T *cctx, int count);
+int generate_NEWDICT(cctx_T *cctx, int count);
+int generate_FUNCREF(cctx_T *cctx, ufunc_T *ufunc);
+int generate_NEWFUNC(cctx_T *cctx, char_u *lambda_name, char_u *func_name);
+int generate_DEF(cctx_T *cctx, char_u *name, size_t len);
+int generate_JUMP(cctx_T *cctx, jumpwhen_T when, int where);
+int generate_JUMP_IF_ARG_SET(cctx_T *cctx, int arg_off);
+int generate_FOR(cctx_T *cctx, int loop_idx);
+int generate_TRYCONT(cctx_T *cctx, int levels, int where);
+int generate_BCALL(cctx_T *cctx, int func_idx, int argcount, int method_call);
+int generate_LISTAPPEND(cctx_T *cctx);
+int generate_BLOBAPPEND(cctx_T *cctx);
+int generate_CALL(cctx_T *cctx, ufunc_T *ufunc, int pushed_argcount);
+int generate_UCALL(cctx_T *cctx, char_u *name, int argcount);
+int generate_PCALL(cctx_T *cctx, int argcount, char_u *name, type_T *type, int at_top);
+int generate_STRINGMEMBER(cctx_T *cctx, char_u *name, size_t len);
+int generate_ECHO(cctx_T *cctx, int with_white, int count);
+int generate_MULT_EXPR(cctx_T *cctx, isntype_T isn_type, int count);
+int generate_PUT(cctx_T *cctx, int regname, linenr_T lnum);
+int generate_EXEC_copy(cctx_T *cctx, isntype_T isntype, char_u *line);
+int generate_EXEC(cctx_T *cctx, isntype_T isntype, char_u *str);
+int generate_LEGACY_EVAL(cctx_T *cctx, char_u *line);
+int generate_EXECCONCAT(cctx_T *cctx, int count);
+int generate_RANGE(cctx_T *cctx, char_u *range);
+int generate_UNPACK(cctx_T *cctx, int var_count, int semicolon);
+int generate_cmdmods(cctx_T *cctx, cmdmod_T *cmod);
+int generate_undo_cmdmods(cctx_T *cctx);
+int 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);
+int generate_store_lhs(cctx_T *cctx, lhs_T *lhs, int instr_count);
+void may_generate_prof_end(cctx_T *cctx, int prof_lnum);
+void delete_instr(isn_T *isn);
+void clear_instr_ga(garray_T *gap);
+/* vim: set ft=c : */