• Joined on 2021-03-29
ychenfo pushed to min_max_abs at M-Labs/nac3 2022-03-08 23:23:42 +08:00
d575b74939 nac3standalone: add test for abs
5006028e2d nac3core: abs builtin function
Compare 2 commits »
ychenfo pushed to min_max_abs at M-Labs/nac3 2022-03-08 23:23:11 +08:00
5455f9c201 nac3standalone: add test for abs
2a8347ffbc nac3core: abs builtin function
Compare 3 commits »
ychenfo created branch min_max_abs in M-Labs/nac3 2022-03-08 22:25:48 +08:00
ychenfo pushed to min_max_abs at M-Labs/nac3 2022-03-08 22:25:48 +08:00
1cc276cb43 nac3standalone: add test for max function
8241a29908 nac3core: max builtin function
e9a17cf8f8 nac3standalone: add test for min function
adb5c69e67 nac3core: min builtin function
Compare 4 commits »
ychenfo commented on pull request M-Labs/nac3#215 2022-03-08 19:24:59 +08:00
Parser modification to handle UAdd in front of int constant

force-pushed to rebase on the latest master branch

ychenfo pushed to uadd_int_parser_fix at M-Labs/nac3 2022-03-08 19:24:00 +08:00
e641fa6ebc nac3parser: modify to handle UAdd in front of int constant
d848c2284e nac3parser: fix broken tests
f7e62ab5b7 nac3ast/parser/core: use i128 for u64 constants
9f6c7b3359 nac3core: type conversion to/from uint
142e99a0f1 nac3core: fix broken tests
Compare 6 commits »
ychenfo commented on pull request M-Labs/nac3#213 2022-03-08 18:24:10 +08:00
Unsigned Integer Support

updated to keep the special treatment of i128::MAX

ychenfo pushed to uint at M-Labs/nac3 2022-03-08 18:23:33 +08:00
d848c2284e nac3parser: fix broken tests
f7e62ab5b7 nac3ast/parser/core: use i128 for u64 constants
Compare 2 commits »
ychenfo commented on pull request M-Labs/nac3#213 2022-03-08 13:44:44 +08:00
Unsigned Integer Support

Done

ychenfo pushed to uint at M-Labs/nac3 2022-03-08 13:43:35 +08:00
3ddfd85bf0 nac3parser: fix broken tests
d93bf93521 nac3ast/parser/core: use i128 for u64 constants
9f6c7b3359 nac3core: type conversion to/from uint
142e99a0f1 nac3core: fix broken tests
79c469301a basic unsigned integer support
Compare 5 commits »
ychenfo commented on pull request M-Labs/nac3#213 2022-03-08 13:17:36 +08:00
Unsigned Integer Support

Oh ok I will merge the two blocks above into this loop

ychenfo created pull request M-Labs/nac3#215 2022-03-08 03:12:21 +08:00
Parser modification to handle UAdd in front of int constant
ychenfo created branch uadd_int_parser_fix in M-Labs/nac3 2022-03-08 03:03:11 +08:00
ychenfo pushed to uadd_int_parser_fix at M-Labs/nac3 2022-03-08 03:03:11 +08:00
17aa9f1ce8 nac3parser: modify to handle UAdd in front of int constant
ychenfo pushed to uint at M-Labs/nac3 2022-03-08 02:38:48 +08:00
50bc5ee361 nac3parser: fix broken tests
8692a5ed45 nac3ast/parser/core: use i128 for u64 constants
Compare 2 commits »
ychenfo commented on pull request M-Labs/nac3#213 2022-03-08 00:27:08 +08:00
Unsigned Integer Support

Thanks for the suggestions! I will revert the changes and use i128::MAX instead.

ychenfo commented on pull request M-Labs/nac3#213 2022-03-07 05:02:55 +08:00
Unsigned Integer Support

as long as we are careful to handle a deeper ast representing integer constants in type check and codegen when we are traversing the ast.

Update: deeper ast for constant should be fine without…

ychenfo commented on pull request M-Labs/nac3#213 2022-03-07 04:42:08 +08:00
Unsigned Integer Support

force-pushed to rebase on the latest master branch

ychenfo pushed to uint at M-Labs/nac3 2022-03-07 04:41:34 +08:00
e7df755435 parser modification to allow u64 constants
ff78b0935d nac3core: type conversion to/from uint
fa1a7d38fd nac3core: fix broken tests
5c44bdb611 basic unsigned integer support
8602852241 nac3core: use signed extension to convert i32 to i64
Compare 5 commits »
ychenfo commented on pull request M-Labs/nac3#213 2022-03-07 04:41:15 +08:00
Unsigned Integer Support

What about making the parser represent:

  • positive numbers that fit in u64 as Int(Some(u64)).
  • positive numbers that do not fit in u64 as Int(None).
  • negative numbers…