Christoffer Lerno
e96dce92cd
Issue when scalar expanding a boolean from a conditional to a bool vector #1954 .
2025-02-13 21:36:28 +01:00
Christoffer Lerno
79a4b6855b
- Detect unaligned loads #1951 .
...
- Fix issue where aligned bitstructs did not store/load with the given alignment.
2025-02-10 22:07:15 +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
a056efce04
Additional cleanup.
2025-01-30 19:32:20 +01:00
Christoffer Lerno
50385be614
Some minor cleanup and updates.
2025-01-30 01:58:51 +01:00
Christoffer Lerno
d2885faa79
Further cleanup.
2025-01-20 04:09:47 +01:00
Christoffer Lerno
bb2a2526e4
Refactoring access + some macro renaming.
2025-01-20 02:44:39 +01:00
Christoffer Lerno
f9b86226a8
Refactoring identifier and catch unwrap into two different nodes.
2025-01-19 13:23:21 +01:00
Christoffer Lerno
1f29110271
Handle bytes and strings the same way in terms of zero termination.
2025-01-10 19:58:00 +01:00
Christoffer Lerno
214e806a33
Deprecate `fn void! main() type main functions.
2025-01-08 23:17:50 +01:00
Christoffer Lerno
dad97fc2d9
Improved #foo resolution inside of the compiler.
...
Deprecation of several `&` macros.
2025-01-08 12:55:20 +01:00
Christoffer Lerno
737559d3f8
Fix typo, minor changes.
2025-01-06 12:36:59 +01:00
Christoffer Lerno
ea2dce0ab4
Make "?:" lower in the frontend.
2025-01-06 03:01:13 +01:00
Christoffer Lerno
314c6f94f0
Remove the last "cast" operations.
2025-01-06 01:51:03 +01:00
Christoffer Lerno
8fd119e546
Refactor vector->array scalar->vector and slice->array casts to expressions.
2025-01-06 00:22:26 +01:00
Christoffer Lerno
8612476103
Refactor float<->float ptr->int and int->enum casts to expressions.
2025-01-05 23:16:48 +01:00
Christoffer Lerno
c6c7baa3b4
Refactor casts, removing SLBOOL and PTRBOOL.
2025-01-05 15:45:39 +01:00
Christoffer Lerno
218f293cd4
Introducing int_to_ptr expr.
2025-01-05 15:26:20 +01:00
Christoffer Lerno
4d641d193c
Refactoring removing cast types.
2025-01-05 15:09:30 +01:00
Christoffer Lerno
67ff78f1ca
Fix not freeing a zero length String
2025-01-05 14:30:00 +01:00
Christoffer Lerno
07c59e6a6c
Fix +a = 1 erronously being accepted. Refactorings.
2025-01-05 02:24:11 +01:00
Christoffer Lerno
86a674b87e
Remove unused cast.
2025-01-04 23:25:55 +01:00
Christoffer Lerno
9957ab259c
Fix vector float -> bool conversion.
2025-01-04 23:16:34 +01:00
Christoffer Lerno
4c3944f626
Refactor vec comparisons.
2025-01-04 23:06:21 +01:00
Christoffer Lerno
6f9b466d7c
Optimize recast.
2025-01-04 21:58:04 +01:00
Christoffer Lerno
469188044d
Assert on certain slice to slice casts. #1768 .
2025-01-04 13:31:47 +01:00
Christoffer Lerno
38063e5602
Refactor casts.
2025-01-04 13:04:08 +01:00
Christoffer Lerno
56d25cdeeb
Remove array->vector casts
2025-01-03 01:35:51 +01:00
Christoffer Lerno
14d8e93004
Return type inference bugs with macros #1757
2025-01-02 17:34:37 +01:00
Christoffer Lerno
faf1c5cb64
Introduce EXPR_RVALUE for some additional refactoring.
2025-01-01 12:19:00 +01:00
Christoffer Lerno
a913f21c45
Fix issue with compiling a constant struct containing a string array in a local context.
2024-12-31 16:45:10 +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
df74cbf06f
Fix bug where !! and ! was not recognized to jump out of the current scope. Remove more casts.
2024-12-30 01:43:02 +01:00
Christoffer Lerno
5af224ab16
Remove 3 casts and replace them with a single new normal expression node.
2024-12-30 00:55:40 +01:00
Christoffer Lerno
f5cea221a6
Miscompile when indexing an array with small unsigned types.
2024-12-28 17:39:25 +01:00
Christoffer Lerno
e453e6f9ca
- Add enum.from_ordinal and fault.from_ordinal
...
- Deprecate cast-style conversion from integer to enum.
- Make deprecation an error in test mode.
2024-12-23 15:27:59 +01:00
Christoffer Lerno
0ded93ab9b
Do not produce expression locations for windows.
2024-12-04 12:21:12 +01:00
Christoffer Lerno
347a1a48d4
Indexing an Optional slice would crash in codegen #1636 .
2024-11-21 11:30:53 +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
b882265e52
Start work on 0.6.5
2024-11-10 01:18:56 +01:00
Waqar Ahmed
213831289a
Fix compile with gcc 14.2.1 ( #1594 )
...
* Fix compile with gcc 14.2.1 Fixes -Werror=maybe-uninitialized warnings
* Updated to use INVALID_PTR rather than NULL.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2024-11-04 00:20:14 +01:00
Christoffer Lerno
cc6a24cf80
Null-check function pointer invocation #1573 .
2024-10-26 18:41:47 +02:00
Christoffer Lerno
d344cc6020
(uptr)&((Foo*)null).a incorrectly inserts a null check. #1544 .
...
Fix regression handling typedefs from generic modules.
2024-10-22 12:15:39 +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
9f6a4eb300
Empty expression block would crash compiler with debug on #1554 .
2024-10-13 02:19:26 +02:00
Christoffer Lerno
cba25710fe
Refactor and unify linker visibility and fix issues with weak stdlib.
2024-10-11 21:45:44 +02:00
Christoffer Lerno
02e9bfaf31
Separate const slice. Fix #1489 . Fix const slice appending. Remove unintended print of char[] as String. Support const conversion of array -> slice.
2024-10-03 15:04:33 +02:00
Christoffer Lerno
029d5e9068
Const initializer further cleanup.
2024-09-23 00:29:43 +02:00
Christoffer Lerno
cdae3ec936
Some refactoring of the bitstruct representation. Correctly represent inner types. #1471
2024-09-21 13:43:52 +02:00
Christoffer Lerno
d727696830
Segfault using ternary with no assignment #1468 .
2024-09-21 00:57:36 +02:00