1407553a2f
[core] Implement parsing of global variables
...
Globals are now parsed into symbol resolver and top level definitions.
2024-10-04 13:18:29 +08:00
c7697606e1
[core] Add TopLevelDef::Variable
2024-10-04 13:09:25 +08:00
a43b59539c
[meta] Move variables declarations closer to where they are first used
2024-10-04 13:00:16 +08:00
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
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
a744b139ba
core: allow Call and AnnAssign in init block
2024-08-26 18:37:55 +08:00
2cf64d8608
apply clippy comment changes
2024-08-21 11:21:10 +08:00
432c81a500
core: update insta after #489
2024-08-13 15:30:34 +08:00
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
973dc5041a
core/typecheck: Support tuple arg type in len()
2024-08-13 15:02:59 +08:00
9b988647ed
core/toplevel/builtins: Extract len() into builtin function
2024-08-13 15:02:59 +08:00
6a64c9d1de
core/typecheck/typedef: Add is_vararg_ctx to TTuple
2024-08-06 11:45:54 +08:00
cbf79c5e9c
core/typecheck/typedef: Add is_vararg to FuncArg, ConcreteFuncArg
2024-08-06 11:43:13 +08:00
b8aa17bf8c
core/toplevel/composer: Add parsing for vararg parameter
2024-08-06 10:52:24 +08:00
63d2b49b09
core: remove np_linalg_matmul
2024-08-05 11:44:55 +08:00
1c72698d02
core: add np_linalg_det and np_linalg_matrix_power functions
2024-07-31 18:02:54 +08:00
54f883f0a5
core: implement np_dot using LLVM_IR
2024-07-31 15:53:51 +08:00
00236f48bc
core: add np.transpose and np.reshape functions
2024-07-31 13:23:07 +08:00
a3e6bb2292
core/helper: add linalg section
2024-07-31 13:23:07 +08:00
2242c5af43
core: add linalg methods
2024-07-29 16:48:06 +08:00
72972fa909
core/toplevel: add more numpy categories
2024-07-27 21:57:47 +08:00
142cd48594
core/toplevel: reorder PrimDef::details
2024-07-27 21:57:47 +08:00
8adfe781c5
core/toplevel: fix PrimDef method names
2024-07-27 21:57:47 +08:00
339b74161b
core/toplevel: reorganize PrimDef
2024-07-27 21:57:47 +08:00
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
6c10e3d056
core: cargo clippy
2024-07-12 21:18:53 +08:00
2dbc1ec659
cargo fmt
2024-07-12 21:16:38 +08:00
cea7cade51
core: add np_argmax/np_argmin functions
2024-07-12 18:18:28 +08:00
a91602915a
core: Fix missing fields in range type
2024-07-09 13:53:50 +08:00
2cfb7a7e10
core: Refactor range function into constructor
2024-07-09 04:44:40 +08:00
c85e412206
core: Implement list::__mul__
2024-07-04 15:53:50 +08:00
2194dbddd5
core/type_annotation: Refactor List type to TObj
...
In preparation for operators on lists.
2024-07-04 15:32:18 +08:00
5b11a1dbdd
core: support tuple and int32 input for np_empty, np_ones, and more
2024-06-27 14:30:17 +08:00
134af79fd6
core: add support for class attributes
2024-06-25 16:06:33 +08:00
7fe2c3496c
core: add attribute field to class definition
2024-06-25 16:06:33 +08:00
06e9d90d57
apply clippy changes
2024-06-21 14:14:01 +08:00
e85f4f9bd2
core: refactor top_level::builtins::get_builtins()
2024-06-18 11:06:25 +08:00
82091b1be8
meta: Apply clippy changes
2024-06-17 14:10:31 +08:00
2abe75d1f4
core: remove code dup with make_exception_fields
2024-06-17 12:01:48 +08:00
676412fe6d
apply cargo fmt
2024-06-14 09:46:42 +08:00
fed1361c6a
core: rename to_var_map to into_var_map
2024-06-13 16:59:10 +08:00
f026b48e2a
core: refactor to use TypeVarId
and TypeVar
2024-06-13 16:59:10 +08:00
dc874f2994
core: use PrimDef
simple names in make_primitives()
2024-06-13 16:58:32 +08:00
23974feae7
meta: Restrict number of allowed lints
2024-06-12 16:10:57 +08:00
c4420e6ab9
core: refactor get_builtins()
2024-06-12 15:09:20 +08:00
fd36f78005
core: refactor PrimitiveDefinitionId
into enum PrimDef
2024-06-12 15:01:01 +08:00
8168692cc3
apply cargo fmt
2024-06-12 14:45:03 +08:00
6153f94b05
core/numpy: Implement codegen for np_array
2024-06-11 16:42:11 +08:00
4730b595f3
core/builtins: Add np_array function
2024-06-11 16:42:08 +08:00
82bf14785b
core: Add multidimensional array helpers
2024-06-11 15:30:06 +08:00