Commit Graph

255 Commits

Author SHA1 Message Date
David Mak 5e7d86bd50 WIP - [artiq] Test 2024-08-15 05:15:46 +08:00
David Mak 1e5b68fc04 WIP - [artiq] Test 2024-08-15 05:14:42 +08:00
David Mak 4b6e5e488e WIP - [artiq] Test 2024-08-15 05:08:45 +08:00
David Mak 14d6443bc7 WIP - [artiq] Test 2024-08-15 05:03:52 +08:00
David Mak 7ba1560442 WIP - [artiq] Test 2024-08-15 04:57:24 +08:00
David Mak 5c4118a1e1 WIP - [artiq] Test 2024-08-15 04:54:11 +08:00
David Mak 4afe1d6edb WIP - [artiq] Test 2024-08-15 04:47:29 +08:00
David Mak b3d86f7187 WIP - [artiq] Revert to unified 2024-08-15 04:03:26 +08:00
David Mak 4522077644 WIP - [artiq] More test 2024-08-15 04:03:06 +08:00
David Mak 758ea48a4b WIP - [artiq] More test 2024-08-15 04:01:12 +08:00
David Mak 22a2c3f3dd WIP - [artiq] More test 2024-08-15 03:55:08 +08:00
David Mak 2c2f3e4da4 WIP - [artiq] Invert parse order 2024-08-15 03:16:10 +08:00
David Mak 0c18154d15 WIP - [artiq] Force completion 2024-08-15 02:59:42 +08:00
David Mak 710038288a WIP - [artiq] Change to unified implementation 2024-08-15 02:19:05 +08:00
David Mak ad1b2dfd88 WIP - [artiq] only change slot 2024-08-14 18:23:43 +08:00
David Mak 6afcd37b83 WIP - [artiq] Nope 2024-08-14 18:12:13 +08:00
David Mak 2b2cc06776 WIP - [artiq] Constants 2024-08-14 18:10:16 +08:00
David Mak c55ee08e4c WIP - [artiq] Fix RPC of ndarrays from host 2024-08-14 17:54:02 +08:00
David Mak 3486c7942c [artiq] Fix RPC of ndarrays to host 2024-08-14 15:53:52 +08:00
David Mak 33792bea0d [artiq] Fix LLVM representation of strings
Should be `%str` rather than `[N x i8]`.
2024-08-13 16:24:17 +08:00
David Mak 6beff7a268 [artiq] Implement core_log and rtio_log in terms of polymorphic_print
Implementation mostly references the original implementation in Python.
2024-08-13 15:19:03 +08:00
David Mak 6ca7aecd4a [artiq] Add core_log and rtio_log function declarations 2024-08-13 15:19:03 +08:00
David Mak 8fd7216243 [core] toplevel/composer: Add lateinit_builtins
This is required for the new core_log and rtio_log functions, which take
a generic type as its parameter. However, in ARTIQ builtins are
initialized using one unifier and then actually used by another unifier.

lateinit_builtins workaround this issue by deferring the initialization
of functions requiring type variables until the actual unifier is ready.
2024-08-13 15:19:03 +08:00
David Mak 4f5e417012 [core] codegen: Add function to get format constants for integers 2024-08-13 15:19:03 +08:00
David Mak 6a64c9d1de core/typecheck/typedef: Add is_vararg_ctx to TTuple 2024-08-06 11:45:54 +08:00
David Mak cbf79c5e9c core/typecheck/typedef: Add is_vararg to FuncArg, ConcreteFuncArg 2024-08-06 11:43:13 +08:00
David Mak 0ba68f6657 core: Set target triple and datalayout for each module
Fixes an issue with inconsistent pointer sizes causing crashes.
2024-07-26 13:35:40 +08:00
David Mak 5faeede0e5 Determine size_t using LLVM target machine 2024-07-26 13:35:38 +08:00
David Mak 4948395ca2 core/toplevel/type_annotation: Add handling for mismatching class def
Primitive types only contain fields in its Type and not its TopLevelDef.
This causes primitive object types to lack some fields.
2024-07-19 14:42:14 +08:00
David Mak 3db3061d99 artiq/symbol_resolver: Handle type of zero-length lists 2024-07-19 14:42:14 +08:00
David Mak 2194dbddd5 core/type_annotation: Refactor List type to TObj
In preparation for operators on lists.
2024-07-04 15:32:18 +08:00
abdul124 b0b804051a nac3artiq: allow class attribute access without init function 2024-06-25 16:06:33 +08:00
abdul124 134af79fd6 core: add support for class attributes 2024-06-25 16:06:33 +08:00
lyken 06e9d90d57 apply clippy changes 2024-06-21 14:14:01 +08:00
David Mak d3cd2a8d99 artiq: Add support for generating RPC tag for ndarray 2024-06-19 18:56:16 +08:00
David Mak 202a63274d artiq: Implement pyty-to-ty conversion 2024-06-19 18:56:15 +08:00
David Mak 76dd5191f5 artiq: Implement Python-to-LLVM conversion of ndarray 2024-06-19 18:56:15 +08:00
David Mak 8d9df0a615 artiq: Fix ndarray class ID
We want the class ID of the ndarray class, not its corresponding typing
class.
2024-06-19 18:56:15 +08:00
David Mak 1bc95a7ba6 Add handling for np.bool_ and np.str_ 2024-06-19 15:10:47 +08:00
abdul124 ce3e9bf4fe nac3artiq: add support string attributes in classes 2024-06-17 16:53:51 +08:00
lyken 676412fe6d apply cargo fmt 2024-06-14 09:46:42 +08:00
lyken fed1361c6a core: rename to_var_map to into_var_map 2024-06-13 16:59:10 +08:00
lyken f026b48e2a core: refactor to use `TypeVarId` and `TypeVar` 2024-06-13 16:59:10 +08:00
David Mak 23974feae7 meta: Restrict number of allowed lints 2024-06-12 16:10:57 +08:00
David Mak 40a3bded36 meta: Set clippy lints in {main,lib}.rs
So that this does not have to be manually passed to the `cargo clippy`
command-line every single time. Also allows incrementally addressing
these lints by removing and fixing them one-by-one.
2024-06-12 16:10:57 +08:00
lyken fd36f78005 core: refactor `PrimitiveDefinitionId` into enum `PrimDef` 2024-06-12 15:01:01 +08:00
lyken 8168692cc3 apply cargo fmt 2024-06-12 14:45:03 +08:00
David Mak 82cc693b11 meta: Update dependencies 2024-06-03 16:40:02 +08:00
David Mak 3a6c53d760 core/toplevel/numpy: Split ndarray type var utilities 2024-04-03 00:07:33 +08:00
David Mak 5ca2dbeec8 core/typedef: Add Type::obj_id to replace get_obj_id 2024-04-02 16:49:10 +08:00