Commit Graph

473 Commits

Author SHA1 Message Date
Christoffer Lerno
f74e294dc2 Push stack codegen to function for cleaner binaries. Some refactoring in allocators. 2023-06-30 01:01:58 +02:00
Christoffer Lerno
f651a59294 Fix on rethrow + macros. 2023-06-27 13:19:28 +02:00
Christoffer Lerno
275e3c6a09 Update with CPU type. 2023-05-30 16:42:15 +02:00
Christoffer Lerno
d4259368a2 Remove call convention. 2023-05-26 14:22:50 +02:00
Christoffer Lerno
b794c893d6 Dynamic dispatch. 2023-05-25 22:28:45 +02:00
Christoffer Lerno
ddd0497922 Better lowering of distinct types. Noreturn function call expr recognized as a "jump" for escape analysis. Preferring "def" in libs. To upper / to lower for ascii. Initial dynlib support. 2023-05-21 21:41:01 +02:00
Christoffer Lerno
bff7b492a2 Further bitstruct cast fixes. Updated code. 2023-05-10 13:03:15 +02:00
Christoffer Lerno
dc30c8edc2 Fix complaints of broken compilers. 2023-05-08 00:18:39 +02:00
Christoffer Lerno
ee5ad170e0 Simplify detection of initialized variable. 2023-05-08 00:13:12 +02:00
Christoffer Lerno
d1c2fbd79f Fix for MSVC 2023-04-21 17:47:32 +02:00
Christoffer Lerno
2a79e0f1cf Introduce def as a trial. Fixup of timeit. 2023-04-21 17:42:38 +02:00
Christoffer Lerno
809321e20c Updated grammar. Removal of elif. Removal of ':' ';' in some ct statements. Empty faults is now an error. Remove "define" for types. Remove "private". Better errors on incorrect bitstruct syntax. Introduction of wildcard type rather than optional wildcard. Removal of scaled vector type. mkdir and rmdir. Disallow define @Foo() = { @inline }. Add handling for @optreturn and change it to @return!. Restrict interface style functions. Updated x64 ABI. stdlib updates to string. Removed deprecated functions. Update how variadics are implemented. Extended error messages. x86 ABI fixes. Shift check fixes. '!' and '?' are flipped. No trailing ',' allowed in functions. Fix to string parsing. Allow l suffix. Simplifying flatpath. any replaces variant, anyfault replaces anyerr. Allow getting the underlying type of anyfault. De-duplicate string constants. Fix of readme. Extended list. Fix of "(MyEnum)x + 1". Clock and DateTime types. Fixes to array concat. 2023-04-21 10:56:39 +02:00
Christoffer Lerno
24147a85f7 Allow unary plus. 2023-03-19 22:46:28 +01:00
Christoffer Lerno
e2b9a35dfe Add tentative ".ordinal" on faults. Allow anyerr and fault to be initialized with null. 2023-03-15 14:32:00 +01:00
Christoffer Lerno
9b81623680 Make string literals default to char[] 2023-03-08 11:24:11 +01:00
Christoffer Lerno
6ac99ed83c Improve debug info. 2023-03-05 20:50:04 +01:00
Christoffer Lerno
1035de3b36 Remove all locations when enums are implicitly lowered to integers. Remove the menagerie of flattening functions. Incidentally this also fixes a bunch of not-yet tested errors with distinct types. 2023-03-04 22:14:29 +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
9db845903e Cleanup and allow complex array length inference, e.g. "int[*][2][*] a = ..." 2023-02-28 17:37:17 +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
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
34eac23e23 Fix when comparing const values > 64 bits. 2023-02-20 08:03:36 +01:00
Christoffer Lerno
6e8c69cd52 Add & ^ | to bitstructs. 2023-02-18 16:21:30 +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
c26655a05a Remove usize/isize completely. 2023-02-16 00:48:37 +01:00
Christoffer Lerno
3cfef690d3 Support (void)foo for any type. 2023-02-13 13:52:48 +01:00
Christoffer Lerno
74d868d113 Fix of bug in !floatval codegen. Added float parsing. 2023-02-10 22:17:55 +01:00
Christoffer Lerno
6cef75b608 Removes win x86 target. Add win aarch64. Fixes to jump buffer sizes. Fix returning bool[2] in the SysV ABI. Array comparison now works. Prevent flexible array comparisons. Prevent zero size unions. 2023-02-06 18:09:31 +01:00
Christoffer Lerno
4ea81fe636 More riscv tests. Fix missing zero/signext attributes on calls. Fixes and simplification to riscv ABI. 2023-01-31 14:09:32 +01:00
Christoffer Lerno
0afd55425a More ABI cleanup and fixes to RISC-V ABI + tests for riscv32. 2023-01-30 23:46:06 +01:00
Christoffer Lerno
539d733ceb Remove LLVM 14 support. Simplify ABI lowering. 2023-01-30 12:39:04 +01:00
Christoffer Lerno
124a18a486 Fix bug with enum associated values. 2023-01-29 19:15:13 +01:00
Christoffer Lerno
b508a43f8f Add lambdas. 2023-01-24 10:15:23 +01:00
Christoffer Lerno
1e18e576c7 Fix int[] -> void* casts. 2023-01-21 20:17:48 +01:00
Christoffer Lerno
5151586450 Updated complex / matrix. Added quaternion math, vectors. Possible to add and mult scalar with vector. Fix where negating a float vector would be lowered incorrectly. Fix where $typeof(x) { ... } would not be valid compound literal. Fix where var would not be recognized as starting a declaration (e.g. in if (var x = ...) 2023-01-21 00:59:33 +01:00
Christoffer Lerno
92507ee388 More work on TB 2023-01-19 20:32:19 +01:00
Christoffer Lerno
1ab304dc64 Fix of overalignment on deref. 2023-01-19 12:29:17 +01:00
Christoffer Lerno
e284d49dd9 Initial add of tilde backend. 2023-01-19 00:08:31 +01:00
Christoffer Lerno
f622b3bd4c Cleanup of naming change to optional. Fix of builtin optional handling. 2022-12-27 23:55:23 +01:00
Christoffer Lerno
f46697bc54 Updated casts (#684)
Cast code rework. Remove llvm_set_bool and friends.
2022-12-27 14:16:47 +01:00
Christoffer Lerno
e8a8ac8bc1 Fix bit or / xor / and on bool vectors. 2022-12-20 03:24:24 +01:00
Christoffer Lerno
c339261d1e Added vector dot functions. Comparison now yields bool vector. Cast between vector types. 2022-12-17 01:51:03 +01:00
Christoffer Lerno
b5afa98507 Updated vector comparison behaviour and semantics. 2022-12-14 23:02:01 +01:00
Christoffer Lerno
a9ed514fe5 Fix bug in defer from macros. Ensure debug location on panic functions. Add getcwd. 2022-12-13 07:50:41 +01:00