78639b1030
core/toplevel/helper: add {extract,create}_ndims
2024-08-30 13:05:16 +08:00
9723c17e24
core/object: introduce object
...
A small abstraction to simplify implementations.
2024-08-30 13:04:54 +08:00
d1c7a8ee50
StructKind::{traverse -> iter}_fields
2024-08-30 12:51:17 +08:00
e0524c19eb
Newline "Otherwise, it will be caught..."
2024-08-30 12:51:17 +08:00
32822f9052
gep_index must be u32
2024-08-30 12:51:17 +08:00
6283036815
FieldTraversal::{Out -> Output}
2024-08-30 12:51:17 +08:00
f167f5f215
Ptr::copy_from to use SizeT
2024-08-30 12:51:17 +08:00
baf8ee2b3d
Ptr::offset_const offset i64, can be negative
2024-08-30 12:51:17 +08:00
d68760447f
Int::const_int to have sign_extend
2024-08-30 12:51:17 +08:00
fdd194ee2a
FnCall::{begin -> builder}
2024-08-30 12:51:17 +08:00
5fca81c68e
CallFunction -> FnCall
2024-08-30 12:51:17 +08:00
0562e9a385
Instance add newline
2024-08-30 12:51:17 +08:00
36af473816
unsafe Model::believe_value
2024-08-30 12:51:17 +08:00
7c7e1b3ab8
Model::{sizeof -> size_of}
2024-08-30 12:51:17 +08:00
dbcfc9538a
ArrayLen::{get_length -> length}
2024-08-30 12:51:17 +08:00
5c4ba09e2f
LenKind -> ArrayLen
2024-08-30 12:51:17 +08:00
eb34b99ee9
core/model: renaming and add notes on upgrading Ptr to LLVM 15
2024-08-30 12:51:17 +08:00
d397b9ceaa
core/model: introduce models
2024-08-30 12:51:17 +08:00
71c3a65a31
[core] codegen/stmt: Fix obtaining return type of sret functions
2024-08-29 19:15:30 +08:00
8c540d1033
[core] codegen/stmt: Add more casts for boolean types
2024-08-29 16:36:32 +08:00
0cc60a3d33
[core] codegen/expr: Fix missing cast to i1
2024-08-29 16:36:32 +08:00
a59c26aa99
[artiq] Fix RPC of ndarrays from host
2024-08-29 16:08:45 +08:00
22c4d25802
core/typecheck: add missing typecheck in matmul
2024-08-27 22:59:39 +08:00
9848795dcc
core/irrt: add exceptions and debug utils
2024-08-27 22:55:22 +08:00
d3b4c60d7f
core/irrt: comment build.rs & move irrt to nac3core/irrt
2024-08-27 22:55:22 +08:00
5b2b6db7ed
core: improve error messages
2024-08-26 18:37:55 +08:00
2c88924ff7
core: add support for simple polymorphism
2024-08-26 18:37:55 +08:00
a744b139ba
core: allow Call and AnnAssign in init block
2024-08-26 18:37:55 +08:00
2b2b2dbf8f
[core] Fix resolution of exception names in raise short form
...
Previous implementation fails as `resolver.get_identifier_def` in ARTIQ
would return the exception __init__ function rather than the class.
We fix this by limiting the exception class resolution to only include
raise statements, and to force the exception name to always be treated
as a class.
Fixes #501 .
2024-08-26 18:35:02 +08:00
d9f96dab33
[core] Add codegen_unreachable
2024-08-23 13:10:55 +08:00
4d80ba38b7
[core] codegen/expr: Implement comparison of tuples
2024-08-21 16:25:32 +08:00
33929bda24
[core] typecheck/typedef: Add support for tuple methods
2024-08-21 16:25:32 +08:00
a8e92212c0
[core] codegen/expr: Implement string equality
2024-08-21 16:25:32 +08:00
908271014a
[core] typecheck/magic_methods: Add equality methods to string
2024-08-21 16:25:32 +08:00
c407622f5c
[core] codegen/expr: Add compilation error for unsupported cmpop
2024-08-21 15:46:13 +08:00
d7952d0629
[core] codegen/expr: Fix assertions not generated for -O0
2024-08-21 15:36:54 +08:00
ca1395aed6
[core] codegen: Remove redundant return
2024-08-21 15:36:54 +08:00
76016a26ad
[meta] Apply clippy suggestions
2024-08-21 13:07:57 +08:00
2cf64d8608
apply clippy comment changes
2024-08-21 11:21:10 +08:00
b90cf2300b
core/fix: add missing lifetime in gen_for*
2024-08-21 11:05:30 +08:00
9e0601837a
core: Add compile-time feature to disable escape analysis
2024-08-14 09:29:48 +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
a0614bad83
[core] codegen/expr: Make gen_string return StructValue
...
So that it is clear that the value itself is returned rather than a
pointer to the struct or its data.
2024-08-13 15:19:03 +08:00
5539d144ed
[core] Add CodeGenContext::build_in_bounds_gep_and_load
...
For safer accesses to `gep`-able values and faster fails.
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
12c4e1cf48
core/toplevel/builtins: Add support for len() on tuples
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
35a7cecc12
core/typecheck: fix np_array ndmin bug
2024-08-13 12:50:04 +08:00
7e3d87f841
core/codegen: fix bug in call_ceil function
2024-08-07 16:40:55 +08:00