Commit Graph

1784 Commits

Author SHA1 Message Date
Christoffer Lerno
c52629d60f Main arguments are now slices if desired. 2021-12-17 01:28:57 +01:00
Christoffer Lerno
680b077eb1 Flexible array member added, zero sized structs removed. 2021-12-14 19:00:33 +01:00
Christoffer Lerno
5ddbf50e83 Add unwrapping to variable for variant in switch. 2021-12-12 15:15:38 +01:00
Christoffer Lerno
379a66a14b Add switch(variant) 2021-12-09 22:52:48 +01:00
Christoffer Lerno
4a6f587c9f Incorrectly would do constant indexing into global when index was not constant. 2021-12-09 10:26:46 +01:00
Christoffer Lerno
e54679c01e Remove string literals. 2021-12-09 02:15:05 +01:00
Christoffer Lerno
4bc47a195b Introduce array pointer decay. 2021-12-09 00:49:50 +01:00
Christoffer Lerno
b003b05d5d Support variant.ptr and subarray.ptr 2021-12-08 16:14:29 +01:00
Christoffer Lerno
bbda3a679f Fixed issue where &foo[1] was not considered a constant when foo is a global. 2021-12-06 23:13:48 +01:00
Christoffer Lerno
4153cbe16d Change semantics of widening. 2021-12-05 23:41:45 +01:00
Christoffer Lerno
06124ddb9f Support variant type. Add fault alias to anyerr. Fix missing .len on string literals. 2021-12-05 22:34:21 +01:00
Christoffer Lerno
a9c2e59f60 Fix incorrect check in macro arguments. 2021-12-04 01:08:16 +01:00
Christoffer Lerno
910b2179f9 Updates to base64 parsing. 2021-12-04 00:25:55 +01:00
Christoffer Lerno
5a467f11ca Fix bug in parsing of binary, oct and hex 2021-12-03 11:41:44 +01:00
Christoffer Lerno
aa7da00323 Support for ranged case. 2021-11-30 15:35:56 +01:00
Christoffer Lerno
3242bcabc0 Do-while uses for codegen and somewhat smaller llvm codegen 2021-11-28 01:35:09 +01:00
Christoffer Lerno
164a1ef59d Initial foreach implementation based on index 2021-11-27 00:57:27 +01:00
Christoffer Lerno
17a03bc104 Added rudimentary operator overload. 2021-11-27 00:57:27 +01:00
Christoffer Lerno
1ba03f75c2 Fix debug parameter definition. Array foreach GEP. 2021-11-22 21:03:00 +01:00
Christoffer Lerno
7595f2e17b Fix of incorrect visibility. Use of LLVMInstructionRemoveFromParent. 2021-11-22 14:14:07 +01:00
Christoffer Lerno
3c9761c946 Explicit insert 2021-11-22 00:04:01 +01:00
Christoffer Lerno
a1b69a3f50 Casting between vector and array. Check f16 overflow. 2021-11-20 03:44:50 +01:00
Christoffer Lerno
f1f268df4a Fix of test. 2021-11-19 15:39:02 +01:00
Christoffer Lerno
6febd8a143 Optimized assign of failable. 2021-11-19 13:29:43 +01:00
Christoffer Lerno
8cc8c321a2 Optimized rethrow expr. Fix to "Foo! x = {}" which would break. Remove unnecessary zeroing failables. Variables that are undefined do not have failable status zeroed. 2021-11-19 13:06:43 +01:00
Christoffer Lerno
0af448ee71 Fix case of very long literal int type values. Fix to bigint compile time truncation. Check decl enum implicit overflow. 2021-11-19 09:11:58 +01:00
Christoffer Lerno
a4a6ea16ce Use element initialization for <= 16 bytes structs and arrays. 2021-11-18 23:23:55 +01:00
Christoffer Lerno
4d4bbbdebc Parses attribute defines. Removal of incremental array parsing. Labels in macros should now work correctly. Volatile and attribute are no longer keywords. Checked a few todos. On test failure, return -1 2021-11-18 20:36:45 +01:00
Christoffer Lerno
bfde58b9a5 Optimized macro codegen on simpler code. 2021-11-18 09:32:10 +01:00
Christoffer Lerno
7b04e7cf85 Added experimental "scoping" and fixed (simple) debug symbols 2021-11-17 23:56:09 +01:00
Christoffer Lerno
b7fa3549a3 Fixed method extern declaration for LLVM. 2021-11-17 11:46:50 +01:00
Christoffer Lerno
974cd0acc5 Rollback global. 2021-11-17 10:37:23 +01:00
Christoffer Lerno
b52b42d4da Complete transition to fn. Introduce global/threadlocal 2021-11-16 17:46:44 +01:00
Christoffer Lerno
fb56d380cc Builtins work. Math library exposes some builtins. Volatile store / load. 2021-11-13 12:31:45 +01:00
Christoffer Lerno
7bd76c973c Placeholders for builtins. Updated character literal parsing, supporting 1-16 characters. More test cases. 2021-11-12 10:13:15 +01:00
Christoffer Lerno
42465039e9 Updated character parsing. 2021-11-10 21:58:17 +01:00
Christoffer Lerno
137b474f44 Update tester to read utf-8 2021-11-08 22:22:01 +01:00
Christoffer Lerno
4662133893 Updates to bitstruct 2021-11-08 22:22:01 +01:00
Christoffer Lerno
15f902579b Removed virtual 2021-11-08 22:22:01 +01:00
Christoffer Lerno
4e47f0b624 Fixes to bitstruct and work on correct behaviour when embedded in structs. 2021-11-08 22:22:01 +01:00
Christoffer Lerno
4f09b0c351 Bitstruct implementation. 2021-11-05 11:59:30 +01:00
Christoffer Lerno
29e7af843a Remove old try-catch. Top down promotion for binary etc. Prevent non-simple widening. Introducing wildcard failable. Move LLVM GEP usage. Regcall test and fix. Optimized slice assign. 2021-10-26 18:40:41 +02:00
Christoffer Lerno
9942be54dc More optimized memclear. Added helper function on array gep. 2021-10-21 23:37:14 +02:00
Christoffer Lerno
b87e14cba8 Enum const inlining. 2021-10-21 15:13:11 +02:00
Christoffer Lerno
4ca7ba048b Updated to use ?, ?? and !! instead of !!, else and "else $unreachable" 2021-10-20 23:27:13 +02:00
Christoffer Lerno
1b38e24a9f Make it an error to do x < 0 when x is an unsigned integer. 2021-10-20 18:53:43 +02:00
Christoffer Lerno
86723540f3 $switch over values. 2021-10-20 17:49:07 +02:00
Christoffer Lerno
aa239c6a87 Allow "fn" instead of "func". Rewrote $switch over types. 2021-10-20 16:30:45 +02:00
Christoffer Lerno
76e4eea4a8 Fix missing support for array[] as return types. Fix bug with &&-folding. Added tests. 2021-10-20 11:57:41 +02:00
Christoffer Lerno
43a4967987 Fix macro return value handling. #252 2021-10-20 00:59:44 +02:00