Commit Graph

197 Commits (master)

Author SHA1 Message Date
ychenfo 48cb485b89 nac3core: show outer type info in type error messages
Reviewed-on: M-Labs/nac3#274
Co-authored-by: ychenfo <yc@m-labs.hk>
Co-committed-by: ychenfo <yc@m-labs.hk>
2022-04-22 15:31:55 +08:00
ychenfo 711c3d3303 nac3core: support custom operators 2022-04-18 15:31:56 +08:00
wylited e94b25f544 spelling (#264)
Co-authored-by: wylited <ds@m-labs.hk>
Co-committed-by: wylited <ds@m-labs.hk>
2022-04-13 11:32:31 +08:00
Sebastien Bourdeauducq 1e7abf0268 fix tests 2022-04-12 10:06:41 +08:00
Sebastien Bourdeauducq ca07cb66cd format typevars consistently 2022-04-12 09:28:17 +08:00
ychenfo a38cc04444 nac3core: assert statement 2022-03-29 06:56:40 +08:00
ychenfo 26a4834254 fix warnings 2022-03-26 18:52:08 +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
ychenfo be75fa7368 nac3core: fix assign to constant 2022-03-24 07:13:13 +08:00
pca006132 d9be8d3978 nac3core/typecheck/unification_table: fixed snapshot restore bug
Closes 229
2022-03-23 00:25:10 +08:00
pca006132 41d62f7325 nac3core/toplevel: fixed typevar substitution bug 2022-03-23 00:25:10 +08:00
pca006132 35ac5cb6f6 nac3core: fixed typevar bug 2022-03-18 01:07:44 +08:00
ychenfo f7e62ab5b7 nac3ast/parser/core: use i128 for u64 constants 2022-03-08 18:21:14 +08:00
ychenfo 142e99a0f1 nac3core: fix broken tests 2022-03-08 13:34:08 +08:00
ychenfo 79c469301a basic unsigned integer support 2022-03-08 13:34:02 +08:00
ychenfo 42fbe8e383 nac3core: fix err msg of too many args 2022-03-05 03:59:45 +08:00
pca006132 63b0f29728 Fix broken tests 2022-03-05 00:27:51 +08:00
Sebastien Bourdeauducq 59ac5aae8a fix error message string (2) 2022-03-02 08:33:13 +08:00
pca006132 846d1726ef nac3core: fixed keyword arguments handling 2022-02-26 16:34:30 +08:00
pca006132 0686e83f4c nac3core/typecheck: fixed incorrect rollback 2022-02-25 20:01:11 +08:00
pca006132 cc769a7006 nac3core: reset unification table state before printing errors
Fixes nondeterministic error messages due to nondeterministic
unification order. As all unification operations will be restored, the
error messages should not be affected by the unification order before
the failure operation.
2022-02-25 14:47:19 +08:00
Sebastien Bourdeauducq 5cd4fe6507 update tests 2022-02-23 11:50:03 +08:00
Sebastien Bourdeauducq 75fde1bbf7 update tests 2022-02-23 11:39:47 +08:00
pca006132 d3cb5d6e52 Fixed type error messages 2022-02-22 17:22:15 +08:00
pca006132 ede3706ca8 type_inferencer: special case tuple index error message 2022-02-21 18:41:42 +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 b18626b149 Fix compilation and test failures 2022-02-12 22:50:32 +08:00
pca006132 e303248261 nac3core: exception type check and codegen 2022-02-12 22:50:32 +08:00
pca006132 b267a656a8 nac3core: added exception type and fixed primitive representation
- Added `Exception` primitive type and some builtin exception types.
  Note that all exception types share the same layout, and should
  inherit from the base `Exception` type. There are some hacks in the
  toplevel module for handling exception types, we should revisit and
  fix them later.
- Added new primitive types to concrete type module, otherwise there
  would be some weird type errors.
- Changed the representation of strings to CSlice<u8>, instead of
  CString.
2022-02-12 22:13:59 +08:00
Sebastien Bourdeauducq fd4bf12808 fix grammar of some type error messages 2022-01-14 16:56:23 +08:00
ychenfo ae8f82ccb0 nac3core: fix broken tests 2022-01-14 16:28:37 +08:00
ychenfo 4a1a4dc076 nac3core/artiq/standalone: symbol resolver return error msg for type error of host variables 2022-01-14 16:28:34 +08:00
ychenfo eba9fc8a69 nac3core: add missing location for type inference 2022-01-14 03:05:11 +08:00
ychenfo 1ee857de6a nac3core: format, fix clippy warning 2022-01-09 01:12:18 +08:00
Sebastien Bourdeauducq 4a65d82db5 introduce IRRT, implement power
based on code by Yijia
M-Labs/nac3#160
2022-01-09 00:57:50 +08:00
ychenfo 9b3b47ce50 fix broken tests 2021-12-28 01:38:16 +08:00
Sebastien Bourdeauducq 80d3ab1b0f remove bigints 2021-12-26 00:23:54 +08:00
Sebastien Bourdeauducq 0ff995722c Revert "nac3core: add missing expr concrete type check"
This reverts commit cb450372d6.
2021-12-20 18:13:45 +08:00
ychenfo cb450372d6 nac3core: add missing expr concrete type check 2021-12-19 18:01:49 +08:00
ychenfo ff27a1697e nac3core: fix for loop type inference 2021-12-19 18:01:49 +08:00
Sebastien Bourdeauducq 142f82f987 remove debug prints 2021-12-01 22:48:06 +08:00
pca006132 4b17511b4a Merge branch 'master' into KernelInvariant 2021-11-27 21:29:27 +08:00
ychenfo 4587088835 Constant Default Parameter Support (#98)
Add support for constant default parameter

Reviewed-on: M-Labs/nac3#98
Co-authored-by: ychenfo <yc@m-labs.hk>
Co-committed-by: ychenfo <yc@m-labs.hk>
2021-11-23 07:32:09 +08:00
ychenfo 49476d06e1 nac3core: clearer comments 2021-11-22 15:06:16 +08:00
ychenfo c2706fa720 nac3core: fix polymorphic class method partial instantiation 2021-11-21 06:11:55 +08:00
pca006132 ba08deada6 nac3core: refactor codegen 2021-11-20 19:50:25 +08:00
ychenfo 8ab3ee9cce nac3core: AugAssign support (#82) 2021-11-13 12:24:22 +08:00
Sebastien Bourdeauducq 96607432c1 nac3core: use Python 3.9 list/tuple annotations in test
Closes #85
2021-11-11 20:05:08 +08:00