1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 05:42:26 +03:00

Fix runtime C maybe benchmark example (#2195)

The constr_info_t struct has changed, so this example must be changed
accordingly.

The benchmark builds are still broken because I missed this file in
https://github.com/anoma/juvix/pull/2192

I've removed the unsupported wasm target from the `compile.sh` script in
the benchmark directory to make it easier to spot errors.
This commit is contained in:
Paul Cadman 2023-06-16 09:54:13 +01:00 committed by GitHub
parent 56cde347d3
commit 82a6f8c891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -34,7 +34,6 @@ do
cd juvix
for f in *.juvix; do
execute "juvix compile -o `basename $f .juvix`.exe $f"
execute "juvix compile --target=wasm -o `basename $f .juvix`.wasm $f"
done
cd ..
fi

View File

@ -9,7 +9,11 @@
#define CONSTRS_NUM (BUILTIN_UIDS_NUM + 4)
static constr_info_t juvix_constr_info_array[CONSTRS_NUM] = {
BUILTIN_UIDS_INFO, {"leaf"}, {"node"}, {"nothing"}, {"just"}};
BUILTIN_UIDS_INFO,
{"leaf", 0, APP_FIXITY},
{"node", 0, APP_FIXITY},
{"nothing", 0, APP_FIXITY},
{"just", 0, APP_FIXITY}};
#define UID_LEAF FIRST_USER_UID
#define UID_NODE (FIRST_USER_UID + 1)