Christoffer Lerno
cdabe8fd9e
- Create optional with ~ instead of ?. return io::EOF?; becomes return io::EOF~.
...
- Deprecated use of `?` to create optional.
2026-01-20 16:10:28 +01:00
Christoffer Lerno
6454856fdb
String str = "" is now guaranteed to be null terminated. #2083
2025-04-16 23:19:28 +02:00
Christoffer Lerno
5c77c9a754
- Change distinct -> typedef.
...
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00
Christoffer Lerno
25bccf4883
New faults and syntax ( #2034 )
...
- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
2025-03-10 00:11:35 +01:00
Christoffer Lerno
cbacd64987
Update tests to (Foo) { ... } syntax.
2025-02-18 18:53:30 +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
c013006671
Improve infer conversions on constants, e.g. ZString a = foo ? "a" : "b"; #1561
2024-10-17 01:20:52 +02:00
Christoffer Lerno
d39f1a6af0
Fix to test.
2024-09-02 22:53:54 +02:00
Christoffer Lerno
ed9f15becf
Foreach uses non-wrapping add/dec.
2024-05-08 23:05:12 +02: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
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
49c4595457
Dynamic protocols.
2023-10-05 15:20:41 +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
3e765a3f3e
Hash maps now copy keys if keys are copyable.
2023-08-10 21:14:24 +02:00
Christoffer Lerno
45d1b1d671
Fix where bitstructs in subarrays triggered the wrong lowering. Fixes #877
2023-07-23 20:50:53 +02:00
Christoffer Lerno
5a2fe4c9d9
Fix to macro codegen.
2023-07-19 01:34:50 +02:00
Christoffer Lerno
34306cbf5d
Fixes missing checks to body arguments. Do not create debug declaration for value-only parameter. Bug in alignment for atomics. Macro ref parameters are pointers.
2023-07-15 15:11:44 +02:00
Christoffer Lerno
3b0370c8bb
Fix of tests.
2023-07-10 20:21:12 +02:00
Christoffer Lerno
f651a59294
Fix on rethrow + macros.
2023-06-27 13:19:28 +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
8b0df0ee11
try? / catch?
2023-03-17 22:49:48 +01:00
Christoffer Lerno
9b81623680
Make string literals default to char[]
2023-03-08 11:24:11 +01:00
Christoffer Lerno
9eee250b10
Add DString init.
2023-03-06 09:12:52 +01:00
Christoffer Lerno
0dcad6f5cf
Improve and simplify casts.
2023-03-01 22:43:50 +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
afa41f0c10
Updated name mangling.
2023-02-20 17:48:47 +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
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
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
539d733ceb
Remove LLVM 14 support. Simplify ABI lowering.
2023-01-30 12:39:04 +01:00
Christoffer Lerno
dc16f65c8e
Change printfln to printfn. Make LLVM 15 tests default.
2023-01-11 18:00:08 +01:00
Christoffer Lerno
da1a45f718
Remove iptrdiff and uptrdiff. Bump version to 0.3.100
2022-11-17 23:44:54 +01:00
Christoffer Lerno
73619817ba
Update panic function and early work on tests. Optimize ABI lowering.
2022-11-03 19:38:34 +01:00
Christoffer Lerno
b1ed066e55
Fix coerce store / load to properly rely on alloc size like Clang does it. Version bump.
2022-10-15 22:12:52 +02:00
Christoffer Lerno
fc943a98ef
Foreach_r, bump to 0.3.15
2022-08-13 03:04:09 +02:00
Christoffer Lerno
44df6eb75b
Cleanup.
2022-08-12 18:13:24 +02:00
Christoffer Lerno
852c08e5fe
Better handling of foreach lowering.
2022-08-11 21:25:11 +02:00
Christoffer Lerno
92b4eeaa35
Update codegen for failable folding. Fixes chained init, e.g. "int! a = b = TestErr.FOO!"
2022-08-10 21:32:29 +02:00
Christoffer Lerno
6d2ab0c985
Fix ordering of @builtin. malloc <-> alloc, malloc, calloc, realloc, free builtins.
2022-08-04 01:49:36 +02:00
Christoffer Lerno
cc8884d3d1
Allocators separated into aligned and non aligned operations.
2022-08-03 20:53:37 +02:00
Christoffer Lerno
cdff5c3e26
Dev ( #500 )
...
Single code path for kind/inner/len/sizeof on type and typeid. Fix of #493 . Bump to 0.2.24. Remove ´func´ deprecated keyword. Unify builtin access. Enum and fault name reflection.
2022-07-26 00:56:59 +02:00
Christoffer Lerno
002ee006c1
More efficient int[] a = {}; Disallow zero length arrays. Bump to 0.2.19 ( #489 )
...
More efficient int[] a = {}; Disallow zero length arrays. Bump to 0.2.19. Improve error on mistyped types.
2022-07-20 22:25:03 +02:00