Christoffer Lerno
b941f93416
Deprecate old void! @benchmark and @test functions.
2025-01-09 20:33:53 +01:00
Christoffer Lerno
07c59e6a6c
Fix +a = 1 erronously being accepted. Refactorings.
2025-01-05 02:24:11 +01:00
Christoffer Lerno
9957ab259c
Fix vector float -> bool conversion.
2025-01-04 23:16:34 +01:00
Christoffer Lerno
705856d51a
- Disallow casting a void* to any or an interface, unless it is null.
...
- Defer resolution of declarations when looked up in `def` aliased #1559 .
2024-10-16 12:50:47 +02:00
Christoffer Lerno
f66f324e0e
Suppor slicing of bytes.
2024-09-21 22:56:27 +02:00
Christoffer Lerno
885acdac24
Support compile time slicing of untyped lists.
2024-09-21 20:20:56 +02:00
Christoffer Lerno
ac479c7e40
llvm issue with try when bool is combined #1467
2024-09-20 20:15:44 +02:00
Christoffer Lerno
cda6ffea1e
Slicing constant strings at compile time works.
2024-09-20 19:34:00 +02:00
Christoffer Lerno
7649738618
Improve lvalue handling in the compiler. #1357
2024-09-07 03:19:35 +02:00
Christoffer Lerno
de13023981
Converting a slice to a vector/array would copy too little data.
2024-09-06 15:36:43 +02:00
Christoffer Lerno
26acce246d
Fixed int128 div/mod. Fix WASM memory init priority.
2024-08-27 04:31:14 +02:00
Christoffer Lerno
fb4a231703
Add $member.get(value) to replace value.$eval($member.nameof)
2024-08-20 14:24:12 +02:00
Christoffer Lerno
f3e5268083
% analysis was incorrect for int vectors.
2024-08-09 15:23:40 +02:00
Dodzey
9daa173ab7
Add methodsof to type info ( #1303 )
...
Add `methodsof` to type info for struct, union and bitstruct
2024-08-05 21:58:13 +02:00
Christoffer Lerno
210508fe4f
Updated test.
2024-07-03 15:59:46 +02:00
Christoffer Lerno
9a19eeacb3
Added further tests to #1219
2024-07-03 15:14:50 +02:00
Christoffer Lerno
91ad3ee0a2
Fix regression for math::log
2024-07-01 16:52:39 +02:00
Christoffer Lerno
492f83f5e2
Bit negating const zero flags would give an incorrect result. #1213
2024-06-28 16:43:57 +02:00
Christoffer Lerno
05592183b1
Fixed distinct comparison behaviour.
2024-06-27 15:06:23 +02:00
Christoffer Lerno
3bddde20ab
Fixes to distinct inline conversions.
2024-06-26 21:48:10 +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
4ba033fc84
Fix of int.min incorrect behaviour #1154 .
2024-02-26 18:13:40 +01: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
1d61ace302
Do not link with debug libc on win32 when using cross compile libs. Add delete methods to dstring. Fixes to macOS aarch64 codegen. Use glibc backtrace when available. Add load_* methods to file. The cast (int[8])int_slice[:8] now works.
2023-12-08 18:59:57 +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
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
d01d8d3663
"protocol" => "interface"
2023-10-20 14:12:08 +02:00
Christoffer Lerno
312a39ee24
Handle protocol inheritance. Allow overlapping protocol methods. Remove the need for &self in protocol declarations. Fix cast rules for protocol. Fix cast rules for bitstruct #1034 .
2023-10-08 02:10:28 +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
2eddda9061
Add gather/scatter for vectors.
2023-09-14 10:19:15 +02:00
Christoffer Lerno
b2ac4b4253
Allow use of pointers in vectors.
2023-09-13 13:45:33 +02:00
Christoffer Lerno
dfe097931c
Add masked_load / masked_store
2023-09-09 01:05:51 +02:00
Christoffer Lerno
4ef74a1205
Add $$select. "--fp-math" options. Fixed issue with accidentally silent error on failed vector conversions.
2023-09-08 09:20:27 +02:00
Christoffer Lerno
82ba02a904
Allow indexing of constant strings. Fixed reverse indexing of constant initializers.
2023-08-30 16:36:29 +02:00
Christoffer Lerno
dd0dc1a936
Allow anyfault and any aliasing. Fix any comparison.
2023-08-30 13:56:16 +02:00
Christoffer Lerno
eac19814e1
Make typeid switches always use subtype matching. Update seeder mixing.
2023-08-29 22:48:26 +02:00
Christoffer Lerno
16e71c14b9
New resolution of $define only check on the last element. Fix issue with pointer and array element types not considered live.
2023-08-22 18:16:26 +02:00
Christoffer Lerno
17f69d8da8
Update slice assign so that it looks at the arguments and does slice copying or splat assign as needed.
2023-08-18 18:46:38 +02:00
Christoffer Lerno
0448038c68
Added test.
2023-08-16 15:58:33 +02:00
Christoffer Lerno
951a9f2b43
Fix of ++ and -- on bitstructs.
2023-08-10 18:01:50 +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
7075f834dd
Remove null-casts for anyerr.
2023-03-15 16:28:48 +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
3449d2ea88
Remove all array pointer decay.
2023-03-02 19:47:24 +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
62fbf4da47
Add simple bitstruct.
2023-02-18 16:59:52 +01:00
Christoffer Lerno
6e8c69cd52
Add & ^ | to bitstructs.
2023-02-18 16:21:30 +01:00