forked from M-Labs/nac3
1
0
Fork 0
Commit Graph

149 Commits

Author SHA1 Message Date
ychenfo d39a55a038 nac3artiq: rpc support host object as parameter 2022-05-16 04:26:37 +08:00
ychenfo 2cb725b7ac nac3artiq: correct global name for const object 2022-05-16 02:50:42 +08:00
ychenfo ae6434696c nac3artiq: rename the filename of modinit
rename from __nac3_synthesized_modinit__ to <nac3_synthesized_modinit> to be more idomatic python
2022-05-11 03:52:16 +08:00
Sebastien Bourdeauducq 3f327113b2 update dependencies, use upstream inkwell 2022-04-27 15:41:46 +08:00
Sebastien Bourdeauducq 27d509d70e nac3artiq: get_const_obj should no longer make a pointer. Closes #272 2022-04-27 15:28:58 +08:00
Sebastien Bourdeauducq 85f21060e4 update to LLVM 14 2022-04-18 18:47:20 +08:00
ychenfo f14b32be67 nac3artiq: type check host int bound instead of panic when codegen 2022-04-16 03:01:37 +08:00
Sebastien Bourdeauducq 6972689469 nac3artiq: cleanup demo 2022-04-12 10:34:14 +08:00
Sebastien Bourdeauducq 3fb22c9182 nac3artiq: treat host numpy.float64 as float. Closes #90 2022-04-12 10:33:28 +08:00
ychenfo 722e3df086 nac3core, artiq: optimize kernel invariant for tuple index 2022-04-11 14:58:40 +08:00
ychenfo ad9ad22cb8 nac3core: optimize unwrap KernelInvariant 2022-04-11 14:58:35 +08:00
ychenfo 6c485bc9dc nac3artiq: skip attribute writeback for option
option types do not have any fields to be written back to the host so it is ok to skip. If we do not skip, there will be error when getting the value of it since it can be `none`, whose type is not concrete
2022-04-10 01:28:30 +08:00
ychenfo 089bba96a3 nac3artiq: get_obj_value take an additional argument for expected type 2022-04-10 01:28:30 +08:00
ychenfo 0e0871bc38 nac3core, artiq: to_basic_value_enum takes an argument indicating the expected type 2022-04-10 01:28:22 +08:00
ychenfo e52d7fc97a nac3artiq: resolve unsigned int host variable as defautl param 2022-03-30 04:05:47 +08:00
ychenfo 6ab73a223c nac3core/artiq: support default param of option type 2022-03-30 04:05:47 +08:00
Sebastien Bourdeauducq 201ca3f63d Revert "nac3artiq: use lld.exe on Windows"
This reverts commit 19182759cd.
2022-03-27 19:09:11 +08:00
Sebastien Bourdeauducq 19182759cd nac3artiq: use lld.exe on Windows 2022-03-27 18:41:38 +08:00
Sebastien Bourdeauducq 0600ee8efa nac3artiq: use correct lld invokation on Windows 2022-03-27 18:25:14 +08:00
ychenfo 0d2b844a2e nac3artiq: avoid getting tuple as pointer value 2022-03-27 10:31:20 +08:00
ychenfo 10d623e36f nac3core/artiq: fix tuple representation 2022-03-27 07:47:14 +08:00
ychenfo 000b128551 nac3artiq: cast none to correct ptr type (#241) 2022-03-26 23:32:50 +08:00
pca006132 bf067e2481 nac3artiq: implement attribute writeback
We will only writeback attributes that are supported by the current RPC
implementation: primitives, tuple and lists of lists... of primitives.
2022-03-26 20:13:58 +08:00
ychenfo ba8ed6c663 nac3artiq: handle recursive types properly 2022-03-26 18:54:21 +08:00
ychenfo 80631fc92b Option type support (#224)
Co-authored-by: ychenfo <yc@m-labs.hk>
Co-committed-by: ychenfo <yc@m-labs.hk>
2022-03-26 15:09:15 +08:00
pca006132 1084ba2158 nac3core: fixed typevar with finite range
1. Function type variables should not include class type variables,
   because they are not bound to the function.
2. Defer type variable constraint evaluation until we get all fields
   definition.
2022-03-24 21:31:51 +08:00
pca006132 41d62f7325 nac3core/toplevel: fixed typevar substitution bug 2022-03-23 00:25:10 +08:00
ychenfo 263bc82434 nac3artiq: remove debug print 2022-03-21 04:23:40 +08:00
pca006132 35ac5cb6f6 nac3core: fixed typevar bug 2022-03-18 01:07:44 +08:00
pca006132 fb8553311c nac3artiq: remove accidentally added print 2022-03-17 15:13:00 +08:00
pca006132 04e7a7eb4b nac3artiq: support more exceptions 2022-03-17 15:03:22 +08:00
pca006132 642e3b2bad nac3core: moved all builtin errors to nac3artiq code
This remove the need for hard-coding those definition IDs.
2022-03-17 00:04:49 +08:00
pca006132 e126fef012 nac3artiq: support more builtin errors 2022-03-16 23:42:08 +08:00
pca006132 94aac16cc5 nac3artiq: fixed RPC codegen for lists 2022-03-10 16:48:28 +08:00
ychenfo 79c469301a basic unsigned integer support 2022-03-08 13:34:02 +08:00
pca006132 a5e1da0b92 nac3artiq/demo/embedding_map: avoid key 0
Object key 0 is reserved for builtin exceptions.
2022-03-05 00:27:23 +08:00
pca006132 294943e303 nac3core: get exception ID from symbol resolver
We need to store the exception class somewhere in order to create them
back in the host. Fixes #200
2022-03-05 00:26:35 +08:00
ychenfo 84b4bd920b nac3artiq: remove cached pyid_to_type if error 2022-03-04 16:23:25 +08:00
pca006132 d1e172501d nac3artiq: remove debug messages 2022-02-28 23:10:05 +08:00
pca006132 323d77a455 nac3artiq: improve error message for out of range error 2022-02-28 23:09:14 +08:00
pca006132 d41c923cfd nac3artiq: handle recursive types properly 2022-02-28 23:08:42 +08:00
Sebastien Bourdeauducq a9c73a4915 fix some error strings 2022-02-28 11:10:33 +08:00
Sebastien Bourdeauducq 804d5db27e nac3artiq: make CompileError importable from Python 2022-02-26 17:29:13 +08:00
Sebastien Bourdeauducq cbc77dddb0 nac3artiq: raise specific exception on error 2022-02-26 17:17:06 +08:00
pca006132 d3cb5d6e52 Fixed type error messages 2022-02-22 17:22:15 +08:00
Sebastien Bourdeauducq bb7c0a2d79 nac3artiq: remove errors from demo 2022-02-22 16:00:37 +08:00
pca006132 f97f93d92c applied rustfmt and clippy auto fix 2022-02-21 18:27:46 +08:00
pca006132 d9cb506f6a nac3core: refactored for better error messages 2022-02-21 18:24:19 +08:00
pca006132 352831b2ca nac3core: removed legacy location definition 2022-02-13 22:39:24 +08:00
pca006132 bf52e294ee nac3artiq: RPC support 2022-02-12 22:50:32 +08:00