Christoffer Lerno
2a895ec7be
First 0.7 update, removing all deprecated features.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
cbacd64987
Update tests to (Foo) { ... } syntax.
2025-02-18 18:53:30 +01:00
Christoffer Lerno
168c11e006
{| |} expression blocks deprecated.
2025-02-18 12:50:34 +01:00
Christoffer Lerno
86680279fa
Improve inference on ?? #1943 .
2025-02-10 16:20:33 +01:00
Christoffer Lerno
50c1aac9bb
Usage of @noreturn macro is type-checked as if it returns #1913 .
2025-01-31 16:19:12 +01:00
Christoffer Lerno
6848753a10
Warn on if-catch with just a default case #1904 .
2025-01-29 15:29:09 +01:00
Christoffer Lerno
e40bab2d30
Allow (int[*]) { 1, 2 } cast style initialization. Experimental change from [*] to [?]. Fix issue where compile time declarations in expression list would not be handled properly.
2025-01-25 22:10:12 +01:00
Christoffer Lerno
eda997545a
Fix issue in optimized if lowering.
2025-01-24 17:14:34 +01:00
Christoffer Lerno
214e806a33
Deprecate `fn void! main() type main functions.
2025-01-08 23:17:50 +01:00
Christoffer Lerno
f801372074
Optimize temp variables in LLVM.
2025-01-06 04:25:47 +01:00
Christoffer Lerno
322c70433b
Refactoring, stop using int to bool as cast. Merge make any.
2024-12-31 16:32:37 +01:00
Christoffer Lerno
746046c8c0
Fix bug where a > 0 ? f() : g() could cause a compiler crash if both returned void!.
2024-11-10 01:18:56 +01:00
Christoffer Lerno
08d1b29301
Add contracts on @catch / @ok. Taking the $typeof of a wildcard optional returns void!
2024-11-05 10:50:38 +01:00
Christoffer Lerno
c013006671
Improve infer conversions on constants, e.g. ZString a = foo ? "a" : "b"; #1561
2024-10-17 01:20:52 +02:00
Christoffer Lerno
31cd839063
Switch to <* *> docs. Fix issue with dynamically loaded C3 libs with other C3 code.
2024-10-14 02:14:34 +02:00
Christoffer Lerno
01b087238a
Const initializer refactoring. Improve error on "Foo![]" #1477
2024-09-24 18:04:39 +02:00
Christoffer Lerno
bca44d1c14
Bug with casting anyfault to error.
2024-09-15 00:55:22 +02:00
Christoffer Lerno
d39f1a6af0
Fix to test.
2024-09-02 22:53:54 +02:00
Christoffer Lerno
2506c2579b
Prevent loading / storing large structs with LLVM.
2024-09-02 01:16:48 +02:00
Christoffer Lerno
274e5280cb
Rename muldiv and update tests for LLVM 20
2024-08-09 23:56:26 +02:00
Christoffer Lerno
60945ffe58
Fix of tests.
2024-08-05 19:52:34 +02:00
Christoffer Lerno
746016996c
Variable in if-try / if-catch cannot be a reused variable name.
2024-08-05 18:43:04 +02:00
Christoffer Lerno
7dcd1618d8
Fixes to header gen.
2024-06-28 11:28:05 +02:00
Christoffer Lerno
fd2491446a
Update mangling.
2024-06-24 21:55:49 +02:00
Christoffer Lerno
e293c435af
0.6.0: init_new/init_temp removed. LinkedList API rewritten. List "pop" and "remove" function now return Optionals. RingBuffer API rewritten. Allocator interface changed. Deprecated Allocator, DString and mem functions removed. "identity" functions are now constants for Matrix and Complex numbers. @default implementations for interfaces removed. any* => any, same for interfaces. Emit local/private globals as "private" in LLVM, following C "static". Updated enum syntax. Add support [rgba] properties in vectors. Improved checks of aliased "void". Subarray -> slice. Fix of llvm codegen enum check. Improved alignment handling. Add --output-dir #1155 . Removed List/Object append. GenericList renamed AnyList. Remove unused "unwrap". Fixes to cond. Optimize output in dead branches. Better checking of operator methods. Disallow any from implementing dynamic methods. Check for operator mismatch. Remove unnecessary bitfield. Remove numbering in --list* commands Old style enum declaration for params/type, but now the type is optional. Add note on #1086 . Allow making distinct types out of "void", "typeid", "anyfault" and faults. Remove system linker build options. "Try" expressions must be simple expressions. Add optimized build to Mac tests. Register int. assert(false) only allowed in unused branches or in tests. Compile time failed asserts is a compile time error. Remove current_block_is_target. Bug when assigning an optional from an optional. Remove unused emit_zstring. Simplify phi code. Remove unnecessary unreachable blocks and remove unnecessary current_block NULL assignments. Proper handling of '.' and Win32 '//server' paths. Add "no discard" to expression blocks with a return value. Detect "unsigned >= 0" as errors. Fix issue with distinct void as a member #1147 . Improve callstack debug information #1184 . Fix issue with absolute output-dir paths. Lambdas were not type checked thoroughly #1185 . Fix compilation warning #1187 . Request jump table using @jump for switches. Path normalization - fix possible null terminator out of bounds. Improved error messages on inlined macros.
...
Upgrade of mingw in CI. Fix problems using reflection on interface types #1203 . Improved debug information on defer. $foreach doesn't create an implicit syntactic scope.
Error if `@if` depends on `@if`. Updated Linux stacktrace. Fix of default argument stacktrace. Allow linking libraries directly by file path. Improve inlining warning messages. Added `index_of_char_from`. Compiler crash using enum nameof from different module #1205 . Removed unused fields in find_msvc. Use vswhere to find msvc. Update tests for LLVM 19
2024-06-12 10:14:26 +02:00
Christoffer Lerno
ed9f15becf
Foreach uses non-wrapping add/dec.
2024-05-08 23:05:12 +02:00
Christoffer Lerno
748c737e8f
0.5.4: Hash variables accept designated initializers. @safemacro overrides the need for @ in macro names. Fixes to macro context evaluation. Updated allocator api. Removed install_win_reqs.bat. Deterministic @init for MacOS. Fixed temp memory issue with formatter. Support LLVM 19. Add support to compare bitstructs using == and !=. Support Windows .def files. Removed invalid grammar from grammar.y. Support compile time folding of &|^~ for bitstructs. output project setting now respected. Fix issue where constants were not properly constant folded. Add temp_push/pop. Aliased declarations caused errors when used in initializers. Fix export output. Fix of const ternary #1118 . Fix of $$MODULE in nested macros #1117 . Fix debug info on globals. out now correctly detects subscript[] use #1116 . Lateral implicit imports removed. Default to '.' if no libdir is specified. Improved error messages for --lib. Fix raylib snake example. Overzealous local escape check corrected #1127 . Improved yacc grammar #1128 . --linker argument #1067 . Fixes to the matrix operations #1130 . Added GenericList.
2024-02-15 21:39:33 +01:00
Christoffer Lerno
deb4cc7c4b
0.5.3: Single-module not respected. Fix issue with compiler defined types. Fix optimization levels for projects. Use GEP i8 on offsets. Optimize foreach on len 1 arrays. Move panic blocks last. Fix generic module wildcard imports. Deprecate init_temp / init_new. Fix issue with macro vaarg and untyped lists. Fix extern const globals.
2024-01-14 15:34:54 +01:00
Christoffer Lerno
ffb0021d04
Use backtrace on windows. Updated backtrace API
2023-11-17 00:36:42 +01:00
Christoffer Lerno
5e8816e6df
Fixes to native backtrace.
2023-11-13 17:20:46 +01:00
Christoffer Lerno
f39aa1a41e
Add location tracking for memory allocations.
2023-11-09 22:03:25 +01:00
Christoffer Lerno
1e38ccdd2b
Fix missing free on GrowableBitSet. init_new/init_temp for GrowableBitSet, LinkedList, List, HashMap, DString, ByteBuffer. Interface to_string renamed to_new_string. Change in allocator usage, malloc is now heap. Added new_array, new_zero_array, new, new_clear, clone. Concat => concat_new. string::printf => string::new_format, string::tprintf => string::tformat. "to_*" are now "to_new_*" and "to_temp_*". "from_*" is "new_from*"
2023-11-09 01:59:49 +01:00
Christoffer Lerno
69470b8738
Improved errors on optional return. Fixes to @nodiscard erroring. Addresses #1062
2023-11-03 23:50:15 +01:00
Christoffer Lerno
1aa038c92f
Interface based streams. Fix for initializing with a force unwrap inside. Allow $define to take a list. Allow $define to return error on argument type mismatch in call. Fixed broken bit operations on boolean vectors.
2023-10-31 01:06:59 +01:00
Christoffer Lerno
89d4c2cab7
Allocator uses protocols. Fix bug where it was not possible to pass a ref variable as a ref variable. Correct codegen for !anyptr.
2023-10-14 12:39:46 +02:00
Christoffer Lerno
a9c28cce6d
Default protocols. Closes #1039
2023-10-10 23:30:33 +02:00
Christoffer Lerno
99cfaa1583
Refactor protocols.
2023-10-06 22:31:41 +02:00
Christoffer Lerno
49c4595457
Dynamic protocols.
2023-10-05 15:20:41 +02:00
Christoffer Lerno
aa6101d8ea
Correctly deduce the return type for macros with implicit return. See #1018 .
2023-09-26 17:37:27 +02:00
Christoffer Lerno
ee42992c37
Make local constants behave as global: see #974
2023-09-26 00:18:59 +02:00
Christoffer Lerno
9eef34049d
Remove vestiges of top down widening.
2023-09-19 09:45:56 +02:00
Christoffer Lerno
d67e846712
Remove cast from void! to anyfault. Rename @catchof to @catch
2023-09-09 22:49:32 +02:00
Christoffer Lerno
4c081f59ff
Refactoring, adding printf / printfn to all streams.
2023-09-03 10:14:04 +02:00
Christoffer Lerno
9a6d83f526
Updated stream API.
2023-09-03 01:14:15 +02:00
Christoffer Lerno
a23112fae6
Added parentof.
2023-08-29 11:51:09 +02:00
Christoffer Lerno
f912e53038
Fix where designated initializers had optional arguments. See #923
2023-08-13 20:57:50 +02:00
Christoffer Lerno
e22afe5424
Allow "if (try foo())"."
2023-08-13 18:15:20 +02:00
Christoffer Lerno
3e765a3f3e
Hash maps now copy keys if keys are copyable.
2023-08-10 21:14:24 +02:00
Christoffer Lerno
ada3ea08fc
Some initial parse output. Enforce handling of optionals. Fix issue where constants were folded despite the fact that they shouldn't be. Fix bug related to return foo() where foo() returns void!. ( #893 )
2023-07-27 22:58:41 +02:00
Christoffer Lerno
45d1b1d671
Fix where bitstructs in subarrays triggered the wrong lowering. Fixes #877
2023-07-23 20:50:53 +02:00