Commit Graph

1322 Commits

Author SHA1 Message Date
Zack Puhl
5efc721b0c Add SHA512 Module to stdlib (#2227)
* add sha512 module to stdlib with passing unit tests

* fix release notes PR ref num for this

* deduplicate const SHA512 hash info
2025-06-20 19:08:45 +02:00
Christoffer Lerno
20c13c0bb4 - Incorrect handling of constant null fault causing compiler crash #2232. 2025-06-20 15:29:52 +02:00
Christoffer Lerno
cd3e924d1e Fix test for LLVM 20 2025-06-20 02:01:32 +02:00
Christoffer Lerno
8d698b5e40 Lambda C-style vaargs were not properly rejected, leading to crash #2229. 2025-06-20 00:52:03 +02:00
Christoffer Lerno
2f45beecbe @pool now has an optional reserve parameter, some minor changes to the temp_allocator API 2025-06-19 01:13:43 +02:00
Christoffer Lerno
1b4b9bca94 Linking fails on operator method imported as @public #2224. 2025-06-18 23:34:39 +02:00
Christoffer Lerno
0df538d0e2 Test LLVM 20 compatibility 2025-06-18 22:41:35 +02:00
Christoffer Lerno
aa425a0886 Fixes to x += { 1, 1 } for enum and pointer vectors #2222. 2025-06-18 22:27:30 +02:00
Christoffer Lerno
842788e59d x += 1 and x -= 1 works propertly on pointer vectors #2222. 2025-06-18 17:02:56 +02:00
Christoffer Lerno
2b97d7d59c x++ and x-- works on pointer vectors #2222. 2025-06-18 13:17:21 +02:00
Christoffer Lerno
01ef53a090 Bug when offsetting pointers of large structs using ++ and --. 2025-06-18 10:13:48 +02:00
Christoffer Lerno
a55f56a88f Linker errors when shadowing @local with public function #2198 2025-06-18 02:07:07 +02:00
Christoffer Lerno
eb75d8f82a Method ambiguity when importing parent module publicly in private submodule. #2208 2025-06-18 00:18:56 +02:00
Christoffer Lerno
f07bd3cbc6 $defined(#expr) broken with binary. #2219 2025-06-17 18:00:16 +02:00
Christoffer Lerno
93640699be Support distrinct types as the base type of bitstructs. #2218 2025-06-17 16:49:46 +02:00
Christoffer Lerno
99e29bff8d Bug in AST copying would make operator overloading like += compile incorrectly #2217 2025-06-17 16:02:43 +02:00
Christoffer Lerno
e7ce79e731 Fix error for named arguments-order with compile-time arguments #2212 2025-06-16 23:56:03 +02:00
Christoffer Lerno
779f548a00 Allow generics over distinct types #2216. 2025-06-16 23:16:35 +02:00
Christoffer Lerno
f0bd93d1f0 Additional #2210 fixes. 2025-06-16 22:56:34 +02:00
Christoffer Lerno
3ce15bd7af Incorrect codegen if a macro ends with unreachable and is assigned to something. #2210 2025-06-15 22:35:44 +02:00
Christoffer Lerno
07eee04e94 In some cases, the compiler would dereference a compile time null. #2215 2025-06-15 21:58:39 +02:00
Christoffer Lerno
1f7b62b248 Fix to is_array_or_slice_of_char #2214.
`is_array_or_slice_of_char` and `is_arrayptr_or_slice_of_char` are replaced by constant `@` variants.
2025-06-15 21:27:47 +02:00
Christoffer Lerno
2afa544d7d Correctly format '%c' when given a width. #2199 2025-06-15 02:27:36 +02:00
Christoffer Lerno
dda2d2ecbe Show code that caused unreachable code #2207
`$echo` would suppress warning about unreachable code. #2205
2025-06-15 00:37:28 +02:00
Christoffer Lerno
e0237096d6 - Support untyped second argument for operator overloading.
- Distinct versions of builtin types ignore @operator overloads #2204.
- @operator macro using untyped parameter causes compiler segfault #2200.
- Add comparison with `==` for ZString types.
2025-06-13 17:12:39 +02:00
Christoffer Lerno
82491a6f85 - Fixes to @format checking #2199. 2025-06-12 02:26:39 +02:00
Christoffer Lerno
1aacb1fa60 Fixed regression compiler crash when using && for untyped parameters #2197. 2025-06-10 16:26:08 +02:00
Christoffer Lerno
40554192b1 - Make accepting arguments for main a bit more liberal, accepting main(int argc, ZString* argv)
- Make `$echo` and `@sprintf` correctly stringify compile time initializers and slices.
- Fixes methodsof to pick up all sorts of extension methods. #2192
- Fix regression accidentally allowing `$assert $foo, $bar`
2025-06-08 00:23:04 +02:00
Christoffer Lerno
f66cadccd2 Add printf format to $assert and $error #2183. 2025-06-06 23:50:55 +02:00
Christoffer Lerno
be511b26cd Additional fixes on $define 2025-06-06 20:11:58 +02:00
Christoffer Lerno
4cfa5441d2 Additional fixes on $define 2025-06-06 15:38:46 +02:00
Christoffer Lerno
5e45c34f21 - Deprecate String.is_zstr and String.quick_zstr #2188. 2025-06-06 15:30:46 +02:00
Christoffer Lerno
b893697a87 Various fixes for $defined 2025-06-06 14:41:20 +02:00
Christoffer Lerno
f2daf2e11e @sprintf macro (based on the $$sprintf builtin) allows compile time format strings #1874. 2025-06-06 03:18:28 +02:00
Christoffer Lerno
9baeca3a8e $eval now also works with @foo, #foo, $Foo and $foo parameters #2114. 2025-06-06 01:23:23 +02:00
Christoffer Lerno
d6d0e08906 Allow inference across && #2172. 2025-06-05 14:20:40 +02:00
Christoffer Lerno
c9d9127da6 Deprecate foo.#bar. 2025-06-05 12:51:35 +02:00
Christoffer Lerno
7f85534414 - Implicitly convert from constant typeid to Type in $Type assignment, and $assignable.
- Make $Type parameters accept constant typeid values.
2025-06-05 00:37:16 +02:00
Christoffer Lerno
ba1332dc2a Splatting const slices would not be const. #2185 2025-06-04 16:09:15 +02:00
Christoffer Lerno
72cc8e430a -0xFF will now be a signed integer.
- `-2147483648`, MIN literals work correctly.
2025-06-04 15:20:49 +02:00
Christoffer Lerno
9645bd3289 - $typefrom now also accepts a constant string, and so works like $evaltype.
- `$evaltype` is deprecated in favour of `$typefrom`.
2025-06-03 14:51:56 +02:00
Christoffer Lerno
d697b910ba Removed the naive check for compile time modification, which fixes #1997 but regresses in detection. 2025-06-01 23:50:13 +02:00
Christoffer Lerno
c3d2b2824c Bug using #foo arguments with $defined #2173 2025-05-31 17:35:29 +02:00
Christoffer Lerno
da25a411f9 Generic faults is disallowed. 2025-05-30 19:12:26 +02:00
Christoffer Lerno
f2703508f2 Fixed test. 2025-05-29 21:14:50 +02:00
Christoffer Lerno
00f1206f3c Compiler didn't check foreach over flexible array member, and folding a flexible array member was allowed #2164. 2025-05-28 22:21:06 +02:00
Christoffer Lerno
83d6b35afe Add d as floating point suffix for double types. 2025-05-28 12:02:24 +02:00
Christoffer Lerno
be3f9007c9 Check pointer/slice/etc on [out] and & params. #2156. 2025-05-27 23:03:43 +02:00
Christoffer Lerno
966e8107f8 Add $$matrix_mul and $$matrix_transpose builtins. 2025-05-27 00:50:21 +02:00
Christoffer Lerno
972c84b65b for with incorrect var declaration caused crash #2154. 2025-05-26 15:56:51 +02:00