David Mak
6094e721db
[core] codegen/types: Implement NDArray in terms of i8*
...
Better aligns with the future implementation of ndstrides.
2024-11-20 15:57:46 +08:00
David Mak
a4f53b6e6b
[core] codegen: Refactor ProxyType and ProxyValue
...
Accepts generator+context object for generic type checking. Also
implements more default trait impl for easier delegation.
2024-11-19 13:46:25 +08:00
David Mak
9d9ead211e
[core] Move Proxies to their own modules
2024-11-19 13:46:23 +08:00
David Mak
26a1b85206
[core] codegen/classes: Remove Underlying type
...
This is confusing and we want a better abstraction than this.
2024-11-19 13:45:55 +08:00
David Mak
2822074b2d
[meta] Cleanup from upgrading Rust version
...
- Remove rust_2024_edition warnings, since it wouldn't be released for
another 3 months
- Fix new clippy warnings
2024-11-19 13:43:57 +08:00
Sebastien Bourdeauducq
2cee760404
turn rust_2024_compatibility lints into warnings
2024-11-16 13:41:49 +08:00
occheung
b53266e9e6
artiq: use async RPC for attributes writeback
2024-11-12 12:04:01 +08:00
occheung
86eb22bbf3
artiq: main is always the last module
2024-11-12 12:03:38 +08:00
occheung
beaa38047d
artiq: suppress main module debug warning
2024-11-12 12:03:08 +08:00
occheung
705dc4ff1c
artiq: lump return value into attributes writeback RPC
2024-11-12 12:02:35 +08:00
David Mak
45cd01556b
[meta] Apply cargo fmt
2024-10-18 14:16:42 +08:00
David Mak
b6cd2a6993
[meta] Reorganize order of use declarations - Phase 3
2024-10-17 16:25:52 +08:00
David Mak
a98f33e6d1
[meta] Reorganize order of use declarations - Phase 2
...
Some more rules:
- For module-level imports, prefer no prefix > super > crate.
- Use crate instead of super if super refers to the crate-level module
2024-10-17 15:57:33 +08:00
David Mak
9fdbe9695d
[core] Add generator to SymbolResolver::get_symbol_value
...
Needed in a future commit.
2024-10-04 13:20:29 +08:00
David Mak
c7697606e1
[core] Add TopLevelDef::Variable
2024-10-04 13:09:25 +08:00
David Mak
fe06b2806f
[meta] Reorganize order of use declarations
...
Use declarations are now grouped into 4 groups:
- Declarations from the standard library
- Declarations from external crates
- Declarations from other crates in this project
- Declarations from within this module
Furthermore, all use declarations are grouped together to enhance
readability. super::super is also replaced by an equivalent crate::
declaration.
2024-10-04 12:52:01 +08:00
David Mak
7f6c9a25ac
[meta] Update Cargo dependencies
2024-10-04 12:52:01 +08:00
mwojcik
f2c047ba57
artiq: support async rpcs
...
Co-authored-by: mwojcik <mw@m-labs.hk>
Co-committed-by: mwojcik <mw@m-labs.hk>
2024-09-13 12:12:13 +08:00
David Mak
5e2e77a500
[meta] Bump inkwell to v0.5
2024-09-13 11:11:14 +08:00
David Mak
f3dc02d646
[meta] Apply cargo fmt
2024-09-09 14:24:52 +08:00
Sebastien Bourdeauducq
6098b1b853
fix previous commit
2024-09-06 11:32:08 +08:00
Sebastien Bourdeauducq
668ccb1c95
nac3core: expose inkwell and nac3parser
2024-09-06 11:06:26 +08:00
David Mak
9c33c4209c
[core] Fix type of ndarray.element_type
...
Should be the element type of the NDArray itself, not the pointer to its
type.
2024-08-30 22:47:38 +08:00
David Mak
a59c26aa99
[artiq] Fix RPC of ndarrays from host
2024-08-29 16:08:45 +08:00
lyken
c8dfdcfdea
standalone & artiq: remove class_names from resolver
2024-08-27 23:43:40 +08:00
lyken
9848795dcc
core/irrt: add exceptions and debug utils
2024-08-27 22:55:22 +08:00
lyken
2cf64d8608
apply clippy comment changes
2024-08-21 11:21:10 +08:00
lyken
706759adb2
artiq: apply cargo fmt
2024-08-21 11:21:10 +08:00
David Mak
0b074c2cf2
[artiq] symbol_resolver: Set private linkage for constants
2024-08-19 14:41:43 +08:00
David Mak
b1c5c2e1d4
[artiq] Fix RPC of ndarrays to host
2024-08-15 15:41:24 +08:00
David Mak
69320a6cf1
[artiq] Fix LLVM representation of strings
...
Should be `%str` rather than `[N x i8]`.
2024-08-14 09:30:08 +08:00
David Mak
9e0601837a
core: Add compile-time feature to disable escape analysis
2024-08-14 09:29:48 +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