1
0
forked from M-Labs/nac3
Commit Graph

42 Commits

Author SHA1 Message Date
769fd01df8 meta: Allow specifying compiler arguments for check_demos 2023-09-18 11:35:20 +08:00
008d50995c meta: Update run_demo.sh
- Allow more than one argument to nac3standalone executable
2023-09-12 16:20:50 +08:00
4481d48709 core: Use C-style for loop logic for iterables
Index increment is now performed at the end of the loop body.
2023-09-06 20:09:38 +08:00
e0de82993f core: Preserve value of variable shadowed by for loop
Previously, the final value of the target expression would be one after
the last element of the loop, which does not match Python's behavior.

This commit fixes this problem while also preserving the last assigned
value of the loop beyond the loop, matching Python's behavior.
2023-09-06 20:09:36 +08:00
17b4686260 standalone: Adapt loop example to output loop variable 2023-09-06 18:56:45 +08:00
8addf2b55e nac3standalone: add more tests 2022-06-01 17:58:16 +08:00
44199781dc nac3standalone: add tests for operators 2022-04-18 15:31:56 +08:00
86ce513cb5 nac3standalone: fix broken test
previously this test unexpectedly passed because it is a slice assignment to extend the list, which is valid in CPython and hence in interpret_demo, and which also happened to give the same output in nac3 by memmove the elements in the list of bool
2022-04-05 18:21:46 +08:00
23b7f4ef18 nac3standalone: add tests for power 2022-04-04 22:10:56 +08:00
b8ef44d64e nac3standalone: add test for default param 2022-03-30 04:05:47 +08:00
bed33a7421 nac3standalone: add tests for tuple 2022-03-27 10:31:20 +08:00
e4581a6d9b nac3standalone/demo: fix return type in loop.py 2022-03-26 21:10:12 +08:00
1a82d296e7 nac3core/codegen: prevent users from modifying loop counter
Fixes 
2022-03-26 20:58:37 +08:00
80631fc92b Option type support ()
Co-authored-by: ychenfo <yc@m-labs.hk>
Co-committed-by: ychenfo <yc@m-labs.hk>
2022-03-26 15:09:15 +08:00
3f890f183c nac3standalone/demo: handle imports consistently 2022-03-19 09:14:27 +08:00
234823c51a nac3standalone: added typevar test 2022-03-18 16:52:52 +08:00
60b3807ab3 nac3standalone: add test for abs function 2022-03-08 23:26:01 +08:00
1cc276cb43 nac3standalone: add test for max function 2022-03-08 22:23:13 +08:00
e9a17cf8f8 nac3standalone: add test for min function 2022-03-08 21:59:42 +08:00
aa79c8d8b7 rename exception symbols in host code 2022-02-23 11:43:41 +08:00
f97f93d92c applied rustfmt and clippy auto fix 2022-02-21 18:27:46 +08:00
91f41052fe test: remove outdated comment 2022-02-13 17:24:47 +08:00
14d25b3b9d Fixed broken tests 2022-02-13 17:21:42 +08:00
4b8e70f746 nac3standalone: disable broken tests () 2022-02-13 11:41:42 +08:00
31e76ca3b6 nac3standalone: add dummy support for artiq_personality
So existing tests can run again
2022-02-13 11:35:02 +08:00
43048eb8d8 nac3standalone: add tests for list slice and len 2022-01-26 03:58:27 +08:00
ced7acd871 check_demos: improve output 2022-01-24 11:38:43 +08:00
f8e3f7a4ca add some basic list tests 2022-01-23 14:28:08 +08:00
ba997ae094 flake: run nac3standalone demo checks
also keep auxiliary projects in separate Nix outputs
2022-01-23 11:32:34 +08:00
2a0caf931f nac3standalone: work around bash mess with exit codes of substituted processes
https://unix.stackexchange.com/questions/376114/how-to-detect-an-error-using-process-substitution
2022-01-23 11:15:11 +08:00
64b94955fe nac3standalone: reorganize demos, compare against cpython 2022-01-23 10:35:06 +08:00
096193f7ab demo: rewrite in Rust 2022-01-09 10:51:10 +08:00
4760851638 nac3standalone: link modules and load irrt like in nac3artiq 2022-01-09 02:17:58 +08:00
69b9ac5152 nac3standalone: consistent naming 2021-12-13 11:19:11 +08:00
ccfcba4066 nac3standalone: add output_long 2021-12-13 10:44:33 +08:00
dba1a8b3d4 nac3standalone: link libm in demo runner 2021-11-11 19:44:18 +08:00
0cbe4778d2 nac3standalone: demonstrate scalar conversion functions in mandelbrot 2021-10-02 19:21:59 +08:00
ba93931758 implement timeline functions for RISC-V (WIP) 2021-10-02 19:05:35 +08:00
db14b4b635 demo: remove old obj files 2021-09-22 15:02:05 +08:00
8acb39f31f fix parallel compilation 2021-09-22 15:00:32 +08:00
d561450bf5 demo: fix classes example 2021-09-22 14:57:24 +08:00
956cca6ac8 cleanup demos 2021-09-22 14:57:13 +08:00