Commit Graph

933 Commits

Author SHA1 Message Date
Christoffer Lerno
f9923de7f9 Remove implicit cast from enum to int. Allow enums to use distinct types as the backing type. enum += 1 returns enum type. 2023-03-04 01:03:57 +01:00
Christoffer Lerno
488472ecbb Improve enum add/sub. 2023-03-03 17:43:13 +01:00
Christoffer Lerno
ea3b32f68b Further casting cleanup. 2023-03-03 14:43:32 +01:00
Christoffer Lerno
a2911292d8 Simplify narrowing semantics. 2023-03-02 22:04:15 +01:00
Christoffer Lerno
3449d2ea88 Remove all array pointer decay. 2023-03-02 19:47:24 +01:00
Christoffer Lerno
3372f36e9d Fix subarray casts to distinct types and constants. 2023-03-02 13:14:11 +01:00
Christoffer Lerno
07e4aab48b Fix of bool -> float vector cast. Correctly widen C style varargs for distinct types and optionals. 2023-03-02 11:35:05 +01:00
Christoffer Lerno
0dcad6f5cf Improve and simplify casts. 2023-03-01 22:43:50 +01:00
Christoffer Lerno
0314f9534f Improve enum checks on enum conversions. 2023-03-01 13:56:36 +01:00
Christoffer Lerno
f8208f946b Remove "generic" code paths. 2023-03-01 12:01:43 +01:00
Christoffer Lerno
b9dbefbe1b Fix bug when initializing nested struct / unions. Fix of mult of 2x2 matrix. Cleanup of cast. 2023-02-28 20:43:43 +01:00
Christoffer Lerno
6188a8b5df Fix bad code in assert 2023-02-28 17:50:01 +01:00
Christoffer Lerno
9db845903e Cleanup and allow complex array length inference, e.g. "int[*][2][*] a = ..." 2023-02-28 17:37:17 +01:00
Christoffer Lerno
cc19168c7b Some general cleanup. 2023-02-28 01:15:30 +01:00
Christoffer Lerno
1c83a484da Print warnings on deprecated. 2023-02-27 18:59:25 +01:00
Christoffer Lerno
bd8bff85d6 Add tracking allocator. Fix substruct issue. 2023-02-27 17:05:27 +01:00
Christoffer Lerno
dd4edfb747 Updated malloc/calloc/realloc/free deprecation of old helper functions. Add checks to prevent incorrect alignment on types when using malloc. Better errors from $assert. Added @deprecated. Fixed issue using named arguments after varargs. 2023-02-27 15:03:27 +01:00
Christoffer Lerno
8ad8af861e Fix to nested $if analysis. 2023-02-27 01:10:46 +01:00
Christoffer Lerno
feaf8b3b2c Update HashMap functionality. Fix check when appending to VarString. Fix issue with decls accidentally invalidated during $checked eval. Fold optional when casting slice to pointer. 2023-02-27 00:10:01 +01:00
Christoffer Lerno
10272dbf38 Delay C abi lowering until requested on-demand to prevent circular dependencies. 2023-02-24 22:01:55 +01:00
Christoffer Lerno
2a6339a25e Updated native variants of file handling. Fixed $if folding chain. 2023-02-23 18:00:34 +01:00
Christoffer Lerno
b175b9318a Fix conversion if (int x = foo()). Initial stream api. Extended enumset. 2023-02-22 17:06:06 +01:00
Christoffer Lerno
8f5676b488 Add defer catch/try. Fix missing defer invoked on return a > 0 ? Foo.ABC! : 1 2023-02-21 20:10:03 +01:00
Christoffer Lerno
afa41f0c10 Updated name mangling. 2023-02-20 17:48:47 +01:00
Christoffer Lerno
b6ff6bae8e Update version. 2023-02-20 16:02:50 +01:00
Christoffer Lerno
e3416a1c40 Allow @test with modules. Change name mangling for non exports. 2023-02-20 16:02:30 +01:00
Christoffer Lerno
34eac23e23 Fix when comparing const values > 64 bits. 2023-02-20 08:03:36 +01:00
Christoffer Lerno
19963e4e19 Fix attributes for nested bitstructs. Add some functions to std::net 2023-02-19 23:35:02 +01:00
Christoffer Lerno
62fbf4da47 Add simple bitstruct. 2023-02-18 16:59:52 +01:00
Christoffer Lerno
6e8c69cd52 Add & ^ | to bitstructs. 2023-02-18 16:21:30 +01:00
Christoffer Lerno
ea163636d3 Add defaults to compare_exchange, small fix in printf. Disallow obviously wrong code that returns the pointer to a variable on the stack. 2023-02-18 12:21:15 +01:00
Christoffer Lerno
3da9008fdc $$DATE is fixed. 2023-02-18 00:03:46 +01:00
Christoffer Lerno
9061699adf Fix of $vasplat when used multiple times. 2023-02-17 20:31:17 +01:00
Christoffer Lerno
d6a1cecb9d Fix of LLVM codegen for optionals. 2023-02-17 13:45:16 +01:00
Christoffer Lerno
baa2e474b5 Added $$atomic_store and $$atomic_load. 2023-02-17 13:22:12 +01:00
Christoffer Lerno
a0a5c940f1 Add --strip-unused. 2023-02-16 22:11:42 +01:00
Christoffer Lerno
0aa776d61b Allow @export on modules, to implicitly @export all in the module section. Add expect on error comparisons, expecting them to be false by default. Support @extern on modules. 2023-02-16 13:05:09 +01:00
Christoffer Lerno
c26655a05a Remove usize/isize completely. 2023-02-16 00:48:37 +01:00
Christoffer Lerno
818396b6f3 Updated module visibility import visibility. Fixes to @local 2023-02-15 09:47:51 +01:00
Christoffer Lerno
adc424ba1d Fixed missing check on &var.myFunction 2023-02-14 23:44:05 +01:00
Christoffer Lerno
b85d521dc1 Fixed missing check on &var.myFunction 2023-02-14 21:56:56 +01:00
Christoffer Lerno
8b099293a3 Fix no-entry. Make printf more strict and also fix distinct printing. 2023-02-14 20:39:15 +01:00
Christoffer Lerno
8d306ce64d Fix no-entry. 2023-02-14 20:13:22 +01:00
Christoffer Lerno
df77b692d6 Support "typedef" 2023-02-14 16:49:27 +01:00
Christoffer Lerno
b7e19b75d0 Improve error reporting for define and function definition. 2023-02-14 15:49:36 +01:00
Christoffer Lerno
61e26d8188 Fixes to $include 2023-02-14 12:27:17 +01:00
Christoffer Lerno
03cd56e46b Add @local and fix visibility issues for generic methods. 2023-02-14 12:17:56 +01:00
Christoffer Lerno
8184fba34b Delay type evaluation further. Current analysis shows that this code should be safe, but there may be some issues lurking. 2023-02-14 09:27:03 +01:00
Christoffer Lerno
3cfef690d3 Support (void)foo for any type. 2023-02-13 13:52:48 +01:00
Christoffer Lerno
5e457be605 Implement more @export / @private improvements. Make @private default… (#729) 2023-02-13 08:31:40 +01:00