lyken
|
19c2beffbb
|
core/irrt: fix improper template def
|
2024-07-26 15:06:57 +08:00 |
lyken
|
92b97a9f4f
|
core/ndstrides: add NDArray definition with strides
|
2024-07-26 15:06:14 +08:00 |
lyken
|
9c3a10377f
|
core/irrt: add ErrorContext
ErrorContext allows IRRT to report a Python-like exception
|
2024-07-26 15:01:09 +08:00 |
lyken
|
80e56bc081
|
core: fix list_slice_assignment assert int type
|
2024-07-26 14:59:11 +08:00 |
lyken
|
8a6dc1c1e1
|
core/model: refactor core to use CSlice & Exception
|
2024-07-26 14:50:23 +08:00 |
lyken
|
b304df8bcc
|
core/model: add SizeTModel::constant
|
2024-07-26 13:37:04 +08:00 |
lyken
|
679315acad
|
core/model: add CSlice & Exception models
|
2024-07-26 13:20:06 +08:00 |
lyken
|
afab0a997c
|
core/irrt: add cstr_utils
|
2024-07-26 12:39:59 +08:00 |
lyken
|
ae88175c4c
|
core/irrt: comment arrays_match()
|
2024-07-26 12:36:52 +08:00 |
lyken
|
ab663c3ec8
|
core/model: introduce `Model<'ctx>` abstraction
|
2024-07-26 12:33:58 +08:00 |
lyken
|
f9dc6bf40c
|
core/irrt: introduce irrt testing
`cargo test -F test` would compile `nac3core/irrt/irrt_test.cpp`
targetted to the host machine (it gets to use `std`) and run the
test executable.
|
2024-07-26 12:32:41 +08:00 |
lyken
|
e127171c81
|
core/irrt: split irrt.cpp into headers
To scale IRRT implementations
|
2024-07-26 12:32:11 +08:00 |
lyken
|
3e22e366ce
|
core/irrt: build.rs capture IR defined constants
|
2024-07-26 12:29:16 +08:00 |
lyken
|
98f7547695
|
core/irrt: build.rs capture IR defined types
|
2024-07-26 12:29:16 +08:00 |
lyken
|
e5fd93c0e0
|
core/irrt: reformat
|
2024-07-26 12:29:16 +08:00 |
lyken
|
1f19a8b54b
|
core/irrt: comment build.rs & move irrt to its own dir
To prepare for future IRRT implementations, and to also make cargo
only have to watch a single directory.
|
2024-07-22 17:32:32 +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
|
51c2175c80
|
core/codegen/stmt: Convert assertion values to i1
|
2024-07-19 14:42:14 +08:00 |
lyken
|
6c10e3d056
|
core: cargo clippy
|
2024-07-12 21:18:53 +08:00 |
lyken
|
2dbc1ec659
|
cargo fmt
|
2024-07-12 21:16:38 +08:00 |
abdul124
|
513d30152b
|
core: support raise exception short form
|
2024-07-12 18:58:34 +08:00 |
abdul124
|
2e01b77fc8
|
core: refactor np_max/np_min functions
|
2024-07-12 18:18:54 +08:00 |
abdul124
|
cea7cade51
|
core: add np_argmax/np_argmin functions
|
2024-07-12 18:18:28 +08:00 |
abdul124
|
eeb474f9e6
|
core: reduce code duplication in codegen/extern_fns (#453)
Used macros to reduce code duplication in `codegen/extern_fns`
Reviewed-on: M-Labs/nac3#453
Co-authored-by: abdul124 <ar@m-labs.hk>
Co-committed-by: abdul124 <ar@m-labs.hk>
|
2024-07-09 16:31:08 +08:00 |
abdul124
|
88b72af2d1
|
core/llvm_intrinsic: improve macro name and comments
|
2024-07-09 16:30:32 +08:00 |
abdul124
|
b73f6c4d68
|
core: reduce code duplication in codegen/llvm_intrinsic
|
2024-07-09 16:30:32 +08:00 |
David Mak
|
a91602915a
|
core: Fix missing fields in range type
|
2024-07-09 13:53:50 +08:00 |
David Mak
|
1c56005a01
|
core: Reformat and modernize irrt.cpp
- Use anon namespace instead of static
- Use using declaration instead of typedef
- Align pointers to the type instead of the identifier
|
2024-07-09 13:53:50 +08:00 |
David Mak
|
bc40a32524
|
core: Add report_type_error to enable more code reuse
|
2024-07-09 13:44:47 +08:00 |
David Mak
|
c820daf5f8
|
core: Apply cargo format
|
2024-07-09 13:32:10 +08:00 |
David Mak
|
2cfb7a7e10
|
core: Refactor range function into constructor
|
2024-07-09 04:44:40 +08:00 |
lyken
|
76defac462
|
meta: use clang -x c++ instead of clang++
|
2024-07-07 20:03:34 +08:00 |
lyken
|
650f354b74
|
core: use C++ for irrt source
|
2024-07-07 14:36:10 +08:00 |
abdul124
|
f062ef5f59
|
core/llvm_intrinsic: replace roundeven with rint
|
2024-07-07 14:24:18 +08:00 |
lyken
|
f52086b706
|
core: improve binop and cmpop error messages
|
2024-07-05 16:27:24 +08:00 |
lyken
|
0a732691c9
|
core: refactor typecheck/magic_methods.rs operators & add op symbol name
|
2024-07-05 16:27:20 +08:00 |
lyken
|
cbff356d50
|
core: workaround inkwell on `llvm.stackrestore`
|
2024-07-05 13:56:12 +08:00 |
lyken
|
24ac3820b2
|
core: check int32 obj_id directly in fold_numpy_function_call_shape_argument
|
2024-07-05 10:36:47 +08:00 |
David Mak
|
c4052b6342
|
core: Implement multi-operand __eq__ and __ne__ for lists
|
2024-07-04 16:01:15 +08:00 |
David Mak
|
66c205275f
|
core: Implement list::__add__
|
2024-07-04 16:01:11 +08:00 |
David Mak
|
c85e412206
|
core: Implement list::__mul__
|
2024-07-04 15:53:50 +08:00 |
David Mak
|
075536d7bd
|
core: Add BreakContinueHooks for gen_for_callback
|
2024-07-04 15:32:18 +08:00 |
David Mak
|
13beeaa2bf
|
core: Implement handling for zero-length lists
|
2024-07-04 15:32:18 +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 |
lyken
|
d6565feed3
|
core: ndarray_from_ndlist_impl cast size_of to usize
|
2024-07-04 12:24:52 +08:00 |
abdul124
|
83154ef8e1
|
core/llvm_intrinsics: remove llvm.roundeven call from call_float_roundeven
|
2024-07-03 14:17:47 +08:00 |
lyken
|
0744b938b8
|
core: fix __nac3_ndarray_calc_size crash due to incorrect typing
|
2024-07-03 13:03:14 +08:00 |
lyken
|
56fa2b6803
|
core: fix crash on iterating over non-iterables
a
|
2024-06-28 15:45:53 +08:00 |
lyken
|
d06c13f936
|
core: fix crash on invalid subscripting
|
2024-06-27 16:58:48 +08:00 |