annotate src/if_mzsch.h @ 33566:e1e3805fcd96 v9.0.2028

patch 9.0.2028: confusing build dependencies Commit: https://github.com/vim/vim/commit/5d03525cdef5db1b1cedfa26c6f8a21aaa207ec0 Author: Yee Cheng Chin <ychin.git@gmail.com> Date: Sun Oct 15 09:50:53 2023 +0200 patch 9.0.2028: confusing build dependencies Problem: confusing build dependencies Solution: clean them up, make them parallelizable Separate vim binary and unittest dependencies, make them parallelizable Clean up make dependencies so Vim and unit test binaries only depend on the object files they need. This fixes an existing issue where after running unit tests, the Vim binary would be invalidated, which results in it having to be linked again when running script tests, even though Vim was already previously built. Make link.sh (script we use to link those binaries) generate namespaced temporary files for each app to avoid them colliding with each other. This allows `unittesttargets` to be built in parallel. These fixes are useful when using link-time-optimization as the link phase could now take minutes rather than a few seconds. closes: #13344 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
author Christian Brabandt <cb@256bit.org>
date Sun, 15 Oct 2023 10:00:03 +0200
parents 6e3dc2d630c2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10042
4aead6a9b7a9 commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents: 10025
diff changeset
1 /* vi:set ts=8 sts=4 sw=4 noet:
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
2 *
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
3 * MzScheme interface for Vim, wrapper around scheme.h
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
4 */
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
5 #ifndef _IF_MZSCH_H_
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
6 #define _IF_MZSCH_H_
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
7 #ifdef __MINGW32__
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
8 // Hack to engage Cygwin-specific settings
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
9 # define __CYGWIN32__
4074
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
10 # include <stdint.h>
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
11 #endif
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
12
10025
068f397d0da4 commit https://github.com/vim/vim/commit/d90b6c02e2900576fb37d95b5e4f4a32b2d7383f
Christian Brabandt <cb@256bit.org>
parents: 4074
diff changeset
13 #ifdef PROTO
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
14 // avoid syntax error for defining Thread_Local_Variables.
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
15 # define __thread // empty
10025
068f397d0da4 commit https://github.com/vim/vim/commit/d90b6c02e2900576fb37d95b5e4f4a32b2d7383f
Christian Brabandt <cb@256bit.org>
parents: 4074
diff changeset
16 #endif
068f397d0da4 commit https://github.com/vim/vim/commit/d90b6c02e2900576fb37d95b5e4f4a32b2d7383f
Christian Brabandt <cb@256bit.org>
parents: 4074
diff changeset
17
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
18 // #ifdef needed for "make depend"
800
d8f905020502 updated for version 7.0b
vimboss
parents: 274
diff changeset
19 #ifdef FEAT_MZSCHEME
1894
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
20 # include <schvers.h>
800
d8f905020502 updated for version 7.0b
vimboss
parents: 274
diff changeset
21 # include <scheme.h>
d8f905020502 updated for version 7.0b
vimboss
parents: 274
diff changeset
22 #endif
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
23
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
24 #ifdef __MINGW32__
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
25 # undef __CYGWIN32__
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
26 #endif
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
27
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
28 #if MZSCHEME_VERSION_MAJOR >= 299
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
29 # define SCHEME_STRINGP(obj) (SCHEME_BYTE_STRINGP(obj) || SCHEME_CHAR_STRINGP(obj))
4074
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
30 # define BYTE_STRING_VALUE(obj) ((char_u *)SCHEME_BYTE_STR_VAL(obj))
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
31 #else
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
32 // macros for compatibility with older versions
4074
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
33 # define scheme_current_config() scheme_config
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
34 # define scheme_make_sized_byte_string scheme_make_sized_string
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
35 # define scheme_format_utf8 scheme_format
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
36 # ifndef DYNAMIC_MZSCHEME
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
37 // for dynamic MzScheme there will be separate definitions in if_mzsch.c
4074
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
38 # define scheme_get_sized_byte_string_output scheme_get_sized_string_output
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
39 # define scheme_make_byte_string scheme_make_string
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
40 # define scheme_make_byte_string_output_port scheme_make_string_output_port
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
41 # endif
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
42
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
43 # define SCHEME_BYTE_STRLEN_VAL SCHEME_STRLEN_VAL
4074
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
44 # define BYTE_STRING_VALUE(obj) ((char_u *)SCHEME_STR_VAL(obj))
274
8fa8d7964cf1 updated for version 7.0073
vimboss
parents: 14
diff changeset
45 # define scheme_byte_string_to_char_string(obj) (obj)
4074
16e8a09e8ab0 updated for version 7.3.791
Bram Moolenaar <bram@vim.org>
parents: 2330
diff changeset
46 # define SCHEME_BYTE_STRINGP SCHEME_STRINGP
14
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
47 #endif
946da5994c01 updated for version 7.0006
vimboss
parents:
diff changeset
48
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
49 // Precise GC macros
1894
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
50 #ifndef MZ_GC_DECL_REG
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
51 # define MZ_GC_DECL_REG(size) // empty
1894
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
52 #endif
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
53 #ifndef MZ_GC_VAR_IN_REG
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
54 # define MZ_GC_VAR_IN_REG(x, v) // empty
1894
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
55 #endif
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
56 #ifndef MZ_GC_ARRAY_VAR_IN_REG
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
57 # define MZ_GC_ARRAY_VAR_IN_REG(x, v, l) // empty
1894
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
58 #endif
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
59 #ifndef MZ_GC_REG
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
60 # define MZ_GC_REG() // empty
1894
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
61 #endif
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
62 #ifndef MZ_GC_UNREG
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
63 # define MZ_GC_UNREG() // empty
1894
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
64 #endif
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
65
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
66 #ifdef MZSCHEME_FORCE_GC
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
67 /*
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
68 * force garbage collection to check all references are registered
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
69 * seg faults will indicate not registered refs
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
70 */
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
71 # define MZ_GC_CHECK() scheme_collect_garbage();
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
72 #else
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
73 # define MZ_GC_CHECK() // empty
1894
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
74 #endif
afb740b5dfab updated for version 7.2-191
vimboss
parents: 800
diff changeset
75
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 10042
diff changeset
76 #endif // _IF_MZSCH_H_