Commit Graph

767 Commits (ndarray)

Author SHA1 Message Date
David Nadlinger b7ee07d7f1 core/builtins: Simplify vector of None creation [nfc] 2022-04-22 23:50:00 +01:00
David Nadlinger 188208b959 core/typecheck: Implement unification for scalar indexing of ndarrays 2022-04-22 22:46:24 +01:00
David Nadlinger 164edd266e core/typecheck: Explicitly give errors on "advanced" (subset) indexing 2022-04-22 22:28:59 +01:00
David Nadlinger c74b7992f6 core/typecheck: Basic ndarray indexing support 2022-04-22 21:56:35 +01:00
David Nadlinger 72cb693e2e core/typecheck: First btis of NumPy-like array type inference
For readability of the codebase, I chose ndarray for the name of the
type, while [numpy.]array() is the name of the most commonly used
constructor.
2022-04-22 21:56:35 +01:00
David Nadlinger 8454741f9e cargo fmt the world 2022-04-22 21:56:35 +01:00
David Nadlinger 2e6fc4cfe5 [tmp] nix: Switch to aarch64-darwin 2022-04-22 21:56:21 +01:00
ychenfo 48cb485b89 nac3core: show outer type info in type error messages
Reviewed-on: M-Labs/nac3#274
Co-authored-by: ychenfo <yc@m-labs.hk>
Co-committed-by: ychenfo <yc@m-labs.hk>
2022-04-22 15:31:55 +08:00
Sebastien Bourdeauducq 837aaa95f1 flake: contain sipyco to nac3artiq-profile 2022-04-19 10:34:55 +08:00
Sebastien Bourdeauducq a19e9c0bec flake: provide llvm-as for IRRT
clang already depends on llvmPackages_13.llvm, so, unlike the statically-linked tools
from llvm-nac3, this does not make the bloat even worse.
2022-04-19 10:23:41 +08:00
Sebastien Bourdeauducq 5dbe1d3d7d llvm: restore llvm-config 2022-04-19 10:23:12 +08:00
Sebastien Bourdeauducq e9bca3c822 llvm: set LLVM_BUILD_TOOLS=OFF 2022-04-19 00:30:11 +08:00
Sebastien Bourdeauducq 42d1aad507 flake: add PGO build to Hydra 2022-04-18 23:58:43 +08:00
Sebastien Bourdeauducq 2777a6e05f flake: use nac3devices example for PGO 2022-04-18 23:57:57 +08:00
Sebastien Bourdeauducq 05be5e93c4 flake: update nixpkgs 2022-04-18 18:48:05 +08:00
Sebastien Bourdeauducq 85f21060e4 update to LLVM 14 2022-04-18 18:47:20 +08:00
Sebastien Bourdeauducq a308d24caa nac3standalone: cleanup 2022-04-18 16:02:48 +08:00
Sebastien Bourdeauducq 1eac111d4c cleanup 2022-04-18 15:55:37 +08:00
ychenfo 44199781dc nac3standalone: add tests for operators 2022-04-18 15:31:56 +08:00
ychenfo 711c3d3303 nac3core: support custom operators 2022-04-18 15:31:56 +08:00
sb10q 0975264482 README: center icon 2022-04-18 15:11:32 +08:00
Sebastien Bourdeauducq 087aded3a3 add icon
Icon is copyright Evgeny Filatov and not covered by any free software license.
2022-04-18 15:07:53 +08:00
ychenfo f14b32be67 nac3artiq: type check host int bound instead of panic when codegen 2022-04-16 03:01:37 +08:00
David Nadlinger 879c66cccf flake.nix: Fix outdated nixConfig keys
The old syntax seems to be silently ignored on (at least)
Nix 2.7.0.
2022-04-13 21:21:18 +01:00
wylited 35b6459c58 nac3core: replace paramter with parameter 2022-04-13 15:42:26 +08:00
wylited e94b25f544 spelling (#264)
Co-authored-by: wylited <ds@m-labs.hk>
Co-committed-by: wylited <ds@m-labs.hk>
2022-04-13 11:32:31 +08:00
Sebastien Bourdeauducq 6972689469 nac3artiq: cleanup demo 2022-04-12 10:34:14 +08:00
Sebastien Bourdeauducq 3fb22c9182 nac3artiq: treat host numpy.float64 as float. Closes #90 2022-04-12 10:33:28 +08:00
Sebastien Bourdeauducq 1e7abf0268 fix tests 2022-04-12 10:06:41 +08:00
Sebastien Bourdeauducq f5a6d29106 update insta snapshots 2022-04-12 09:56:49 +08:00
Sebastien Bourdeauducq ca07cb66cd format typevars consistently 2022-04-12 09:28:17 +08:00
Sebastien Bourdeauducq 93e9a6a38a update dependencies 2022-04-12 09:13:04 +08:00
ychenfo 722e3df086 nac3core, artiq: optimize kernel invariant for tuple index 2022-04-11 14:58:40 +08:00
ychenfo ad9ad22cb8 nac3core: optimize unwrap KernelInvariant 2022-04-11 14:58:35 +08:00
ychenfo f66f66b3a4 nac3core, artiq: remove unnecessary ptr casts 2022-04-10 01:28:46 +08:00
ychenfo 6c485bc9dc nac3artiq: skip attribute writeback for option
option types do not have any fields to be written back to the host so it is ok to skip. If we do not skip, there will be error when getting the value of it since it can be `none`, whose type is not concrete
2022-04-10 01:28:30 +08:00
ychenfo 089bba96a3 nac3artiq: get_obj_value take an additional argument for expected type 2022-04-10 01:28:30 +08:00
ychenfo 0e0871bc38 nac3core, artiq: to_basic_value_enum takes an argument indicating the expected type 2022-04-10 01:28:22 +08:00
ychenfo 26187bff0b nac3core: add missing bound check and negative index handling for list subscription assignment 2022-04-09 04:56:31 +08:00
ychenfo 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
ychenfo c29cbf6ddd nac3core: add bound check for list slice 2022-04-05 18:21:46 +08:00
ychenfo 7443c5ea0f nac3core: add location information to codegen context 2022-04-05 18:21:46 +08:00
Sebastien Bourdeauducq f55b077e60 README: update Windows instructions 2022-04-05 18:07:38 +08:00
Sebastien Bourdeauducq e05b0bf5dc flake: update nixpkgs 2022-04-05 10:10:08 +08:00
Sebastien Bourdeauducq 8eda0affc9 windows: add wine-msys2-build 2022-04-05 10:06:36 +08:00
Sebastien Bourdeauducq 75c53b40a3 windows: update msys2 packages, add setuptools to environment 2022-04-05 10:06:14 +08:00
pca006132 0d10044d66 Merge pull request 'Fix float**int with negative power' (#254) from neg_powi_fix into master
Reviewed-on: M-Labs/nac3#254
2022-04-04 22:43:20 +08:00
ychenfo 23b7f4ef18 nac3standalone: add tests for power 2022-04-04 22:10:56 +08:00
ychenfo 710904f975 nac3core: fix powi with negative integer power 2022-04-04 22:10:56 +08:00
Sebastien Bourdeauducq 4bf452ec5a windows: do not check dependencies when making package 2022-04-04 16:03:59 +08:00