David Mak
5c105fccff
[core] codegen: Add dtype to NDArrayType
...
We won't have this once NDArray is refactored to strided impl.
2024-11-14 12:39:14 +08:00
David Mak
9e5bbdd60f
[core] codegen: Add Self::llvm_type to all type abstractions
2024-11-14 12:39:14 +08:00
lyken
4679fdccb6
core/irrt: fix exception.hpp C++ castings
2024-11-14 12:39:14 +08:00
lyken
01952ce55f
core/toplevel/helper: add {extract,create}_ndims
2024-11-14 12:39:14 +08:00
David Mak
91fb801c7d
[core] codegen/types: Implement StructField{,s}
...
Loosely based on FieldTraversal.
2024-11-14 12:39:12 +08:00
David Mak
71300f6c86
[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-11 20:56:18 +08:00
David Mak
cd0793f80e
[core] Move Proxies to their own modules
2024-11-11 20:45:28 +08:00
David Mak
b1adfb245c
[core] codegen/classes: Remove Underlying type
...
This is confusing and we want a better abstraction than this.
2024-11-11 19:09:50 +08:00
David Mak
383989b142
core: WIP - Add tracer runtime
2024-11-11 19:09:48 +08:00
David Mak
c92937eca3
[meta] Update pre-commit configuration
2024-11-11 15:00:33 +08:00
David Mak
9e8facf355
[meta] Update cargo dependencies
2024-11-11 15:00:33 +08:00
occheung
979209a526
binop: expand `not` operator as loglcal not
2024-11-08 17:12:01 +08:00
David Mak
c3927d0ef6
[ast] Refactor lazy_static to LazyLock
...
It is available in Rust 1.80 and reduces a dependency.
2024-10-30 12:29:51 +08:00
David Mak
202a902cd0
[meta] Update dependencies
2024-10-30 12:29:51 +08:00
David Mak
b6e2644391
[meta] Update cargo dependencies
2024-10-18 14:17:16 +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
5839badadd
[standalone] Update globals.py with type-inferred global var
2024-10-07 20:44:08 +08:00
David Mak
56c845aac4
[standalone] Add support for registering globals without type decl
2024-10-07 20:44:06 +08:00
David Mak
65a12d9ab3
[core] Refactor registration of top-level variables
2024-10-07 17:05:48 +08:00
David Mak
9c6685fa8f
[core] typecheck/function_check: Fix lookup of defined ids in scope
2024-10-07 16:51:37 +08:00
David Mak
2bb788e4bb
[core] codegen/expr: Materialize implicit globals
...
Required for when globals are read without the use of a global
declaration.
2024-10-07 13:13:20 +08:00
David Mak
42a2f243b5
[core] typecheck: Disallow redeclaration of var shadowing global
2024-10-07 13:11:00 +08:00
David Mak
3ce2eddcdc
[core] typecheck/type_inferencer: Infer whether variables are global
2024-10-07 13:10:46 +08:00
David Mak
51bf126a32
[core] typecheck/type_inferencer: Differentiate global symbols
...
Required for analyzing use of global symbols before global declaration.
2024-10-07 12:25:00 +08:00
David Mak
1a197c67f6
[core] toplevel/composer: Reduce lock scope while analyzing function
2024-10-05 15:53:20 +08:00
David Mak
581b2f7bb2
[standalone] Add demo for global variables
2024-10-04 13:24:30 +08:00
David Mak
746329ec5d
[standalone] Implement symbol resolution for globals
2024-10-04 13:24:30 +08:00
David Mak
e60e8e837f
[core] Add support for global statements
2024-10-04 13:24:27 +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
8065e73598
[core] toplevel/composer: Add type analysis for global variables
2024-10-04 13:20:29 +08:00
David Mak
192290889b
[core] Add IdentifierInfo
...
Keeps track of whether an identifier refers to a global or local
variable.
2024-10-04 13:20:24 +08:00
David Mak
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
David Mak
c7697606e1
[core] Add TopLevelDef::Variable
2024-10-04 13:09:25 +08:00
David Mak
88d0ccbf69
[standalone] Explicit panic when encountering a compilation error
...
Otherwise scripts will continue to execute.
2024-10-04 13:00:16 +08:00
David Mak
a43b59539c
[meta] Move variables declarations closer to where they are first used
2024-10-04 13:00:16 +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
Sébastien Bourdeauducq
6c8382219f
msys2: get python via numpy dependencies
2024-09-30 14:27:30 +08:00
Sebastien Bourdeauducq
9274a7b96b
flake: update nixpkgs
2024-09-30 14:22:40 +08:00
Sébastien Bourdeauducq
d1c0fe2900
cargo: update dependencies
2024-09-30 14:14:43 +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
f3cc4702b9
[meta] Update dependencies
2024-09-13 11:11:14 +08:00
David Mak
3e92c491f5
[standalone] Add tests creating ndarrays with tuple dims
2024-09-11 15:52:43 +08:00
lyken
7f629f1579
core: fix comment in unify_call
2024-09-11 15:46:19 +08:00
lyken
5640a793e2
core: allow np_full to take tuple shapes
2024-09-11 15:46:19 +08:00
David Mak
abbaa506ad
[standalone] Remove redundant recreation of TargetMachine
2024-09-09 14:27:10 +08:00
David Mak
f3dc02d646
[meta] Apply cargo fmt
2024-09-09 14:24:52 +08:00