From 616ffd7a5c751620b007dcc9d482749501319ff0 Mon Sep 17 00:00:00 2001 From: ProgramSnail Date: Sun, 16 Mar 2025 11:03:16 +0300 Subject: [PATCH] fixes, -O3 --- byterun/dune | 6 +++--- byterun/include/runtime_externs.h | 2 ++ byterun/src/types.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/byterun/dune b/byterun/dune index cf8dcb382..e4291745b 100644 --- a/byterun/dune +++ b/byterun/dune @@ -11,7 +11,7 @@ (mode (promote (until-clean))) (action - (run g++ -Wall -Wextra -std=c++20 -DWITH_CHECK -Iinclude/ %{main} %{parser} %{analyzer} %{module_manager} %{runtime} %{obj} -o %{target}))) + (run g++ -Wall -Wextra -O3 -std=c++20 -DWITH_CHECK -Iinclude/ %{main} %{parser} %{analyzer} %{module_manager} %{runtime} %{obj} -o %{target}))) (rule (target types.o) @@ -22,7 +22,7 @@ (mode (promote (until-clean))) (action - (run gcc -Wall -Wextra -Iinclude/ -DWITH_CHECK -c %{src} -o %{target}))) + (run gcc -Wall -Wextra -O3 -Iinclude/ -DWITH_CHECK -c %{src} -o %{target}))) (rule (target interpreter.o) @@ -33,4 +33,4 @@ (mode (promote (until-clean))) (action - (run gcc -Wall -Wextra -Iinclude/ -DWITH_CHECK -c %{src} -o %{target}))) + (run gcc -Wall -Wextra -O3 -Iinclude/ -DWITH_CHECK -c %{src} -o %{target}))) diff --git a/byterun/include/runtime_externs.h b/byterun/include/runtime_externs.h index 4cafbc7af..0140cc131 100644 --- a/byterun/include/runtime_externs.h +++ b/byterun/include/runtime_externs.h @@ -105,7 +105,9 @@ void *Lstring(aint *p); void *Bclosure(aint *args, aint bn); void *Barray(aint *args, aint bn); +void *Barray_rev(aint *args, aint bn); void *Bsexp(aint *args, aint bn); +void *Bsexp_rev(aint *args, aint bn); aint Btag(void *d, aint t, aint n); aint get_tag(data *d); diff --git a/byterun/src/types.c b/byterun/src/types.c index 292107ecd..7a8cf21f1 100644 --- a/byterun/src/types.c +++ b/byterun/src/types.c @@ -12,7 +12,7 @@ extern size_t __gc_stack_top, __gc_stack_bottom; // --- State --- void init_state(struct State* s, void** stack) { - // __init(); // FIXME, disable gc + __init(); // FIXME, disable gc s->stack = stack; s->fp = NULL;