Skip to content

Commit

Permalink
patch 8.2.3860: Vim9: codecov struggles with the file size
Browse files Browse the repository at this point in the history
Problem:    Vim9: codecov struggles with the file size.
Solution:   Split vim9compile.c into four files.
  • Loading branch information
brammool committed Dec 20, 2021
1 parent a99fb23 commit dc7c366
Show file tree
Hide file tree
Showing 18 changed files with 9,356 additions and 9,078 deletions.
3 changes: 3 additions & 0 deletions src/Make_ami.mak
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,11 @@ SRC += \
userfunc.c \
version.c \
viminfo.c \
vim9cmds.c \
vim9compile.c \
vim9execute.c \
vim9expr.c \
vim9instr.c \
vim9script.c \
vim9type.c \
window.c \
Expand Down
9 changes: 9 additions & 0 deletions src/Make_cyg_ming.mak
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,11 @@ OBJ = \
$(OUTDIR)/usercmd.o \
$(OUTDIR)/userfunc.o \
$(OUTDIR)/version.o \
$(OUTDIR)/vim9cmds.o \
$(OUTDIR)/vim9compile.o \
$(OUTDIR)/vim9execute.o \
$(OUTDIR)/vim9expr.o \
$(OUTDIR)/vim9instr.o \
$(OUTDIR)/vim9script.o \
$(OUTDIR)/vim9type.o \
$(OUTDIR)/viminfo.o \
Expand Down Expand Up @@ -1203,10 +1206,16 @@ $(OUTDIR)/netbeans.o: netbeans.c $(INCL) version.h

$(OUTDIR)/version.o: version.c $(INCL) version.h

$(OUTDIR)/vim9cmds.o: vim9cmds.c $(INCL) version.h

$(OUTDIR)/vim9compile.o: vim9compile.c $(INCL) version.h

$(OUTDIR)/vim9execute.o: vim9execute.c $(INCL) version.h

$(OUTDIR)/vim9expr.o: vim9expr.c $(INCL) version.h

$(OUTDIR)/vim9instr.o: vim9instr.c $(INCL) version.h

$(OUTDIR)/vim9script.o: vim9script.c $(INCL) version.h

$(OUTDIR)/vim9type.o: vim9type.c $(INCL) version.h
Expand Down
12 changes: 12 additions & 0 deletions src/Make_mvc.mak
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,11 @@ OBJ = \
$(OUTDIR)\undo.obj \
$(OUTDIR)\usercmd.obj \
$(OUTDIR)\userfunc.obj \
$(OUTDIR)\vim9cmds.obj \
$(OUTDIR)\vim9compile.obj \
$(OUTDIR)\vim9execute.obj \
$(OUTDIR)\vim9expr.obj \
$(OUTDIR)\vim9instr.obj \
$(OUTDIR)\vim9script.obj \
$(OUTDIR)\vim9type.obj \
$(OUTDIR)\viminfo.obj \
Expand Down Expand Up @@ -1834,10 +1837,16 @@ $(OUTDIR)/userfunc.obj: $(OUTDIR) userfunc.c $(INCL)

$(OUTDIR)/version.obj: $(OUTDIR) version.c $(INCL) version.h

$(OUTDIR)/vim9cmds.obj: $(OUTDIR) vim9cmds.c $(INCL)

$(OUTDIR)/vim9compile.obj: $(OUTDIR) vim9compile.c $(INCL)

$(OUTDIR)/vim9execute.obj: $(OUTDIR) vim9execute.c $(INCL)

$(OUTDIR)/vim9expr.obj: $(OUTDIR) vim9expr.c $(INCL)

$(OUTDIR)/vim9instr.obj: $(OUTDIR) vim9instr.c $(INCL)

$(OUTDIR)/vim9script.obj: $(OUTDIR) vim9script.c $(INCL)

$(OUTDIR)/vim9type.obj: $(OUTDIR) vim9type.c $(INCL)
Expand Down Expand Up @@ -2041,8 +2050,11 @@ proto.h: \
proto/undo.pro \
proto/usercmd.pro \
proto/userfunc.pro \
proto/vim9cmds.pro \
proto/vim9compile.pro \
proto/vim9execute.pro \
proto/vim9expr.pro \
proto/vim9instr.pro \
proto/vim9script.pro \
proto/vim9type.pro \
proto/viminfo.pro \
Expand Down
20 changes: 19 additions & 1 deletion src/Make_vms.mms
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS
#
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
# Last change: 2021 Nov 19
# Last change: 2021 Dec 20
#
# This script has been tested on VMS 6.2 to 8.4 on DEC Alpha, VAX and IA64
# with MMS and MMK
Expand Down Expand Up @@ -410,8 +410,11 @@ SRC = \
usercmd.c \
userfunc.c \
version.c \
vim9cmds.c \
vim9compile.c \
vim9execute.c \
vim9expr.c \
vim9instr.c \
vim9script.c \
vim9type.c \
viminfo.c \
Expand Down Expand Up @@ -531,8 +534,11 @@ OBJ = \
usercmd.obj \
userfunc.obj \
version.obj \
vim9cmds.obj \
vim9compile.obj \
vim9execute.obj \
vim9expr.obj \
vim9instr.obj \
vim9script.obj \
vim9type.obj \
viminfo.obj \
Expand Down Expand Up @@ -1112,6 +1118,10 @@ viminfo.obj : viminfo.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
errors.h globals.h version.h
vim9cmds.obj : vim9cmds.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
errors.h globals.h version.h
vim9compile.obj : vim9compile.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
Expand All @@ -1120,6 +1130,14 @@ vim9execute.obj : vim9execute.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
errors.h globals.h version.h
vim9expr.obj : vim9expr.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
errors.h globals.h version.h
vim9instr.obj : vim9instr.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
errors.h globals.h version.h
vim9script.obj : vim9script.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
Expand Down
52 changes: 41 additions & 11 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ CClink = $(CC)
#CONF_OPT_GUI = --enable-gui=gtk2 --disable-gtktest
#CONF_OPT_GUI = --enable-gui=gnome2
#CONF_OPT_GUI = --enable-gui=gnome2 --disable-gtktest
#CONF_OPT_GUI = --enable-gui=gtk3
CONF_OPT_GUI = --enable-gui=gtk3
#CONF_OPT_GUI = --enable-gui=gtk3 --disable-gtktest
#CONF_OPT_GUI = --enable-gui=motif
#CONF_OPT_GUI = --enable-gui=motif --with-motif-lib="-static -lXm -shared"
Expand Down Expand Up @@ -404,7 +404,7 @@ CClink = $(CC)
# Use --with-luajit if you want to use LuaJIT instead of Lua.
# Set PATH environment variable to find lua or luajit executable.
# This requires at least "normal" features, "tiny" and "small" don't work.
#CONF_OPT_LUA = --enable-luainterp
CONF_OPT_LUA = --enable-luainterp
#CONF_OPT_LUA = --enable-luainterp=dynamic
#CONF_OPT_LUA = --enable-luainterp --with-luajit
#CONF_OPT_LUA = --enable-luainterp=dynamic --with-luajit
Expand Down Expand Up @@ -433,7 +433,7 @@ CClink = $(CC)
# When you get an error for a missing "perl.exp" file, try creating an empty
# one: "touch perl.exp".
# This requires at least "normal" features, "tiny" and "small" don't work.
#CONF_OPT_PERL = --enable-perlinterp
CONF_OPT_PERL = --enable-perlinterp
#CONF_OPT_PERL = --enable-perlinterp=dynamic

# PYTHON
Expand All @@ -453,7 +453,7 @@ CClink = $(CC)
#CONF_OPT_PYTHON = --enable-pythoninterp
#CONF_OPT_PYTHON = --enable-pythoninterp --with-python-command=python2.7
#CONF_OPT_PYTHON = --enable-pythoninterp=dynamic
#CONF_OPT_PYTHON3 = --enable-python3interp
CONF_OPT_PYTHON3 = --enable-python3interp
#CONF_OPT_PYTHON3 = --enable-python3interp --with-python3-command=python3.6
#CONF_OPT_PYTHON3 = --enable-python3interp=dynamic

Expand All @@ -462,21 +462,21 @@ CClink = $(CC)
# First one for static linking, second one for loading when used.
# Debian package is "ruby-dev".
# This requires at least "normal" features, "tiny" and "small" don't work.
#CONF_OPT_RUBY = --enable-rubyinterp
CONF_OPT_RUBY = --enable-rubyinterp
#CONF_OPT_RUBY = --enable-rubyinterp=dynamic
#CONF_OPT_RUBY = --enable-rubyinterp --with-ruby-command=ruby1.9.1

# TCL
# Uncomment this when you want to include the Tcl interface.
# First one is for static linking, second one for dynamic loading.
# Debian package is "tcl-dev".
#CONF_OPT_TCL = --enable-tclinterp
CONF_OPT_TCL = --enable-tclinterp
#CONF_OPT_TCL = --enable-tclinterp=dynamic
#CONF_OPT_TCL = --enable-tclinterp --with-tclsh=tclsh8.4

# CSCOPE
# Uncomment this when you want to include the Cscope interface.
#CONF_OPT_CSCOPE = --enable-cscope
CONF_OPT_CSCOPE = --enable-cscope

# NETBEANS - NetBeans interface. Only works with Motif, GTK, and gnome.
# Motif version must have XPM libraries (see |netbeans-xpm|).
Expand Down Expand Up @@ -548,7 +548,7 @@ CClink = $(CC)
#CONF_OPT_FEAT = --with-features=small
#CONF_OPT_FEAT = --with-features=normal
#CONF_OPT_FEAT = --with-features=big
#CONF_OPT_FEAT = --with-features=huge
CONF_OPT_FEAT = --with-features=huge

# COMPILED BY - For including a specific e-mail address for ":version".
#CONF_OPT_COMPBY = "--with-compiledby=John Doe <JohnDoe@yahoo.com>"
Expand Down Expand Up @@ -623,7 +623,7 @@ CClink = $(CC)
# Note: If you use -Wextra and get warnings in GTK code about function
# parameters, you can add -Wno-cast-function-type (but not with clang)
#CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -Wno-cast-function-type -Wno-deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
#CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -Wno-deprecated-declarations -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -Wno-deprecated-declarations -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
# Add -Wpedantic to find // comments and other C99 constructs.
# Better disable Perl and Python to avoid a lot of warnings.
#CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wpedantic -Wunreachable-code -Wunused-result -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Expand Down Expand Up @@ -727,12 +727,12 @@ SANITIZER_LIBS = $(SANITIZER_CFLAGS)
# Configuration is in the .ccmalloc or ~/.ccmalloc file.
# Doesn't work very well, since memory linked to from global variables
# (in libraries) is also marked as leaked memory.
#LEAK_CFLAGS = -DEXITFREE
LEAK_CFLAGS = -DEXITFREE
#LEAK_LIBS = -lccmalloc

# Uncomment this line to have Vim call abort() when an internal error is
# detected. Useful when using a tool to find errors.
#ABORT_CFLAGS = -DABORT_ON_INTERNAL_ERROR
ABORT_CFLAGS = -DABORT_ON_INTERNAL_ERROR

####################################################
### Specific systems, check if yours is listed ### {{{
Expand Down Expand Up @@ -1695,8 +1695,11 @@ BASIC_SRC = \
usercmd.c \
userfunc.c \
version.c \
vim9cmds.c, \
vim9compile.c \
vim9execute.c \
vim9expr.c, \
vim9instr.c, \
vim9script.c \
vim9type.c \
viminfo.c \
Expand Down Expand Up @@ -1848,8 +1851,11 @@ OBJ_COMMON = \
objects/usercmd.o \
objects/userfunc.o \
objects/version.o \
objects/vim9cmds.o \
objects/vim9compile.o \
objects/vim9execute.o \
objects/vim9expr.o \
objects/vim9instr.o \
objects/vim9script.o \
objects/vim9type.o \
objects/viminfo.o \
Expand Down Expand Up @@ -2034,8 +2040,11 @@ PRO_AUTO = \
usercmd.pro \
userfunc.pro \
version.pro \
vim9cmds.pro \
vim9compile.pro \
vim9execute.pro \
vim9expr.pro \
vim9instr.pro \
vim9script.pro \
vim9type.pro \
viminfo.pro \
Expand Down Expand Up @@ -3575,12 +3584,21 @@ objects/usercmd.o: usercmd.c
objects/userfunc.o: userfunc.c
$(CCC) -o $@ userfunc.c

objects/vim9cmds.o: vim9cmds.c
$(CCC) -o $@ vim9cmds.c

objects/vim9compile.o: vim9compile.c
$(CCC) -o $@ vim9compile.c

objects/vim9execute.o: vim9execute.c
$(CCC) -o $@ vim9execute.c

objects/vim9expr.o: vim9expr.c
$(CCC) -o $@ vim9expr.c

objects/vim9instr.o: vim9instr.c
$(CCC) -o $@ vim9instr.c

objects/vim9script.o: vim9script.c
$(CCC) -o $@ vim9script.c

Expand Down Expand Up @@ -4137,6 +4155,10 @@ objects/version.o: version.c vim.h protodef.h auto/config.h feature.h os_unix.h
auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h version.h
objects/vim9cmds.o: vim9cmds.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h vim9.h
objects/vim9compile.o: vim9compile.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
Expand All @@ -4145,6 +4167,14 @@ objects/vim9execute.o: vim9execute.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h vim9.h
objects/vim9expr.o: vim9expr.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h vim9.h
objects/vim9instr.o: vim9instr.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h vim9.h
objects/vim9script.o: vim9script.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
Expand Down
5 changes: 5 additions & 0 deletions src/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,13 @@ void mbyte_im_set_active(int active_arg);
# include "version.pro"
# include "vim9script.pro"
# ifdef FEAT_EVAL
// include vim9.h here, the types defined there are used by function arguments.
# include "vim9.h"
# include "vim9cmds.pro"
# include "vim9compile.pro"
# include "vim9execute.pro"
# include "vim9expr.pro"
# include "vim9instr.pro"
# include "vim9type.pro"
# endif
# include "window.pro"
Expand Down
33 changes: 33 additions & 0 deletions src/proto/vim9cmds.pro
Original file line number Diff line number Diff line change
@@ -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 : */

0 comments on commit dc7c366

Please sign in to comment.