aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 18:22:04 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 20:03:38 +0330
commit459b7661aaa0d65d01be064bd4b9976c4f045a5c (patch)
treeeccb0738631fc52e5116fb238c2f7f961784ff36 /src/core
parentzy: nonzero exit on compile errors (diff)
bounds: body scan, loop-entry hoisting, pointer proofs from requested size, --explain-checks v1 (non-o3 code)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/core.c b/src/core/core.c
index e3895ae..e7b1ef6 100644
--- a/src/core/core.c
+++ b/src/core/core.c
@@ -7160,6 +7160,10 @@ int main(int argc, char **argv)
"program arguments are available through std.argv; stdin has the name <eval>.\n",
stdout);
#endif
+#ifndef USE_LSP_GENOME
+ fputs(" zy --explain-checks [file] < source.zc compiles without running and lists\n"
+ " the bounds checks it kept as json lines (file names them; default <eval>).\n", stdout);
+#endif
fputs("options:\n --help, -h show this help and exit\n"
"environment:\n"
" TINYVM_MEMORY_WORDS initial vm memory in words\n"
@@ -7167,7 +7171,7 @@ int main(int argc, char **argv)
" ZYTRACE trace native translation and optimization\n", stdout);
return 0;
}
- if (argc > 1 && argv[1][0] == '-' && argv[1][1] == '-') {
+ if (argc > 1 && argv[1][0] == '-' && argv[1][1] == '-' && strcmp(argv[1], "--explain-checks")) {
#ifdef USE_LSP_GENOME
if (strcmp(argv[1], "--format") && strcmp(argv[1], "--annotate") && strcmp(argv[1], "--types")) {
#endif