Christoffer Lerno
9530fe8fcd
Fix regression for parsing types and switch to the "new" generic syntax that's being tested.
2025-01-26 22:51:27 +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
c3f5806aa3
Const strings and bytes were not properly converted to compile time bools.
...
Contracts @require/@ensure are no longer treated as conditionals, but must be explicitly bool.
2025-01-18 23:24:55 +01:00
Christoffer Lerno
4cb984e56d
Prevent temp arena scribbling from causing an asan warning. #1825
2025-01-13 16:58:55 +01:00
Christoffer Lerno
9a9ff7f32c
Fix bug in OnStackAllocator when freeing overallocated data. # #1720
2024-12-25 23:57:47 +01:00
Christoffer Lerno
17942925f5
Fix bug in temp allocator when temp memory is exhausted and allocation needs overaligned mem. #1715
2024-12-25 17:56:37 +01:00
Christoffer Lerno
22f7faf60e
SimpleHeapAllocator bug when splitting blocks allowed memory overrun.
2024-11-21 13:36:24 +01: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
557adb6ed9
Update the init function of the arena allocator.
2024-10-09 12:45:50 +02:00
Christoffer Lerno
a665978b64
Fixing some whitespace issues.
2024-10-08 19:38:31 +02:00
Christoffer Lerno
41156cc45d
Temp allocator overwrites data when doing reset on extra allocated pages. #1462
2024-09-19 20:50:14 +02:00
Christoffer Lerno
3bada4560e
Correctly print interfaces.
2024-09-18 14:53:55 +02:00
Christoffer Lerno
5540519e52
Cleanup.
2024-09-18 10:20:57 +02:00
Christoffer Lerno
ed5d338a39
Added new style named arguments.
2024-09-05 22:13:22 +02:00
Christoffer Lerno
2600c3116c
Do not add the libc allocator if it isn't available.
2024-09-02 01:44:35 +02:00
Christoffer Lerno
6cb6113c57
- Memory leak in Object when not using temp allocators.
...
- Tracking allocator would double the allocations in the report.
2024-08-31 03:35:39 +02:00
Christoffer Lerno
388578c209
Too restrictive compile time checks for @const. Fixes to wasm nolibc in the standard library.
2024-08-26 13:33:15 +02:00
Christian Buttner
59ed118e66
Address/memory/thread sanitizer.
2024-08-23 16:06:22 +02:00
Christoffer Lerno
d32861193b
DynamicArenaAllocator would not correctly free.
2024-08-20 22:42:01 +02:00
Christoffer Lerno
79a1639f8a
Fix aligned alloc for Win32 targets.
2024-08-19 15:25:00 +02:00
Christoffer Lerno
2706495668
Add temp allocator scribble. Make bufferstream safer.
2024-08-11 01:17:03 +02:00
Christoffer Lerno
56b771a7ad
Support destroying temp allocators, and destroy temp allocators on exit.
2024-08-07 16:24:26 +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
7ea3d230bb
0.5.5 features ( #1151 )
...
0.5.5 Disallow multiple `_` in a row in digits, e.g. `1__000`. #1138 . Fixed toposort example. Struct/union members now correctly rejects members without storage size #1147 . `math::pow` will now correctly promote integer arguments. `math::pow` will now correctly promote integer arguments. Added `new_aligned` and `alloc_aligned` functions to prevent accidental under-alignment when allocating simd. Pointer difference would fail where alignment != size (structs etc) #1150 . Add test that overalignment actually works for lists. Fixed array calculation for npot2 vectors. Use native aligned alloc on Windows and POSIX. Deprecates "offset". Simplification of the Allocator interface.
2024-02-22 17:13:51 +01: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
87fdb5956e
Improved backtrace on platforms without glibc. Added $$frameaddress and $$returnaddress properly.
2023-11-18 20:13:11 +01:00
Christoffer Lerno
ffb0021d04
Use backtrace on windows. Updated backtrace API
2023-11-17 00:36:42 +01:00
Christoffer Lerno
e31f2a03ba
Add location tracking for memory allocations.
2023-11-09 11:20:29 +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
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
e4c1328ef2
Better checks for missing @dynamic. Addresses #1055 .
2023-10-28 04:12:43 +02:00
Christoffer Lerno
9af37fe427
$and, $or, $is_const, $assignable, .is_eq, .is_ordered, $defined($vatype(2)) works looking if we can create a type, $defined(foo[0]) $defined(foo()). Remove $checks and @checked. Improvide casting checks to always work without destructive changes.
2023-10-24 22:06:04 +02: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
b7a896805d
Fix bug in growable bitset. Always insert 0xAA in malloc on testing.
2023-10-09 14:23:41 +02:00
Christoffer Lerno
108b2244d8
Fix bug in aligned_realloc, fixes issue when a type is not resolved before the cast. #897
2023-07-28 22:21:23 +02:00
Christoffer Lerno
499c82b089
Updated indentation to C3 standard.
2023-07-26 14:01:24 +02:00
Christoffer Lerno
9543fbbf1c
Exhaustive switch on enums. This addresses #838
2023-07-09 01:18:01 +02:00
Christoffer Lerno
4f7b42cdc4
New generic syntax and ad hoc invocation.
2023-07-06 23:43:36 +02:00
Christoffer Lerno
848a5212ef
Fixes #811 . Update some stdlib methods. Header printout correctly picks a name. #804
2023-07-03 13:17:43 +02:00
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
b88916214f
Fix of allocator gen.
2023-06-26 21:34:36 +02:00
Christoffer Lerno
0ec64c3be8
Remove broken free check on temp allocator.
2023-06-25 22:07:44 +02:00
Christoffer Lerno
68f6cb1286
Updated organization file functions, env naming.
2023-06-24 10:29:17 +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
4d0f73a8f5
Consistent naming in allocators. Fix where cast from char array -> bitstruct would not work.
2023-05-10 10:30:37 +02:00
Christoffer Lerno
172d561f07
Change syntax of $if, $assert, $include, $echo. Introduces $error
2023-05-06 12:18:00 +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
93fa135d28
Deprecation of define Type = ...
2023-03-20 22:56:06 +01:00