Christoffer Lerno
7c8e3dd4fd
Fix max module name to 31 chars and the entire module path to 63 characters.
2025-08-18 12:02:00 +02:00
Zack Puhl
ad02fad167
Add Freestanding OS Types ( #2399 )
...
* Add Freestanding OS Types to `env::`
2025-08-16 19:47:03 +02:00
Sander van den Bosch
261184b5c1
Add HashSet and String methods ( #2386 )
...
* Add `String.contains_char` using `String.index_of_char` and `HashSet.values` together with `HashSet.tvalues`
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-08-16 16:57:31 +02:00
Manu Linares
d07da2804e
Update sema_decls.c
...
Fix compilation error
```
[ 48%] Building C object CMakeFiles/c3c.dir/src/compiler/sema_passes.c.o
/home/mb/.cache/yay/c3c-git/src/c3c/src/compiler/sema_decls.c: In function ‘sema_analyse_operator_method’:
/home/mb/.cache/yay/c3c-git/src/c3c/src/compiler/sema_decls.c:2312:25: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
2312 | is_wildcard = method->func_decl.is_wildcard_overload = true;
| ^~~~~~~~~~~
```
2025-08-16 16:47:59 +02:00
Zack Puhl
702b63ddb7
Add array::zip and Related Macros ( #2370 )
...
* zip / zip_into
* Deprecate `add_array` in favour of `push_all` on lists.
* Add support for generic lists for zip.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-08-16 13:30:24 +02:00
konimarti
e35dbd29fb
string: use correct allocator in replace ( #2405 )
...
`replace` accepts an Allocator but uses `mem` instead.
2025-08-16 03:41:59 +02:00
Christoffer Lerno
b52ab886d2
Compiler segfault on global slice initialization with null[:0] #2404 .
2025-08-15 20:10:28 +02:00
Christoffer Lerno
4b95d6be4c
New method resolution.
2025-08-15 19:48:08 +02:00
Christoffer Lerno
34b0b6f8f9
Fix for bug when @format encountered * in some cases.
2025-08-15 08:26:43 +02:00
Christoffer Lerno
4fea202e6d
Added libloaderapi to std::os::win32
2025-08-14 22:11:20 +02:00
Zack Puhl
8cfdb76869
Add benchmarkrun and *.wasm to .gitignore ( #2400 )
...
* Add `benchmarkrun` and `*.wasm` to .gitignore
* add .s assembly files too
2025-08-14 20:49:18 +02:00
Christoffer Lerno
858f8d2405
Updating license docs further.
2025-08-14 20:42:07 +02:00
Christoffer Lerno
67aa18c1aa
Clarifying license.
2025-08-14 20:40:30 +02:00
Christoffer Lerno
31b15c775e
Slicing a constant array with designated initialization would not update the indexes.
2025-08-14 20:27:23 +02:00
Zack Puhl
bf7e7e2397
Fix Benchmark Progress Printing ( #2401 )
2025-08-14 20:24:37 +02:00
Zack Puhl
eb8fb8871f
Fix $$str_hash to use a5hash like String.hash() ( #2403 )
...
* Fix `$$str_hash` to use `a5hash` like `String.hash()`
2025-08-14 20:24:01 +02:00
Christoffer Lerno
85dc9c45ab
- Deprecate @compact use for comparison. Old behaviour is enabled using --use-old-compact-eq.
...
- Switch available for types implementing `@operator(==)`.
- `Type.is_eq` is now true for types with `==` overload.
- Functions being tested for overload are now always checked before test.
- Compile time indexing at compile time in a $typeof was no considered compile time.
2025-08-14 15:53:35 +02:00
Book-reader
076ef187cb
improve & fix libc termios bindings ( #2372 )
...
* improve & fix libc termios bindings
2025-08-13 17:24:41 +02:00
Zack Puhl
c8d39251a9
Add compile-time @min and @max ( #2378 )
...
* Add compile-time `@min` and `@max`
2025-08-13 17:23:24 +02:00
Christoffer Lerno
f5e6b697b8
Make @try maydiscard.
2025-08-13 13:31:29 +02:00
Christoffer Lerno
e8e88c1920
Merge branch 'dev'
2025-08-13 13:30:47 +02:00
Christoffer Lerno
82a58e1c66
Update libc memcpy.
2025-08-13 13:29:56 +02:00
Velikiy Kirill
8e8d0436ad
Add epoll bindings to std::os::linux + misc ( #2350 )
...
* Add epoll to std::os::linux + misc
* Fix import in linux.c3
* epoll: Add unit tests
* epoll: Fix imports in unit tests
* epoll: Add libc import
2025-08-13 02:41:09 +02:00
Christoffer Lerno
db99de9717
Improve codegen for stack allocated large non-zero arrays.
2025-08-12 17:01:39 +02:00
tonis2
fd9fbe26a1
JSON parser trailing issue fix
2025-08-12 16:19:41 +02:00
Christoffer Lerno
582453cb45
Assert triggered when trying to slice a struct.
2025-08-12 00:01:55 +02:00
Zack Puhl
b73a44ec7d
Add/Fix OpenBSD native_cpus ( #2387 )
...
* Add OpenBSD `native_cpus`
* update release notes
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-08-11 23:10:09 +02:00
Christoffer Lerno
be98a01ed8
types::has_equals fails with assert for bitstructs #2377
2025-08-11 20:53:11 +02:00
Christoffer Lerno
625a6d987d
Refactoring
2025-08-11 20:53:11 +02:00
vssukharev
2597f6217e
Several fixes for Nix build ( #2389 )
...
* Fixed a bug for build via nix, when c3c-checks and c3c-debug didn't have a git hash
* Got rid of python3 requirement for checks in nix as it's no longer needed
* Now c3c properly displays it's build date in nix build
* Add more platforms for checks in nix build
* Add installation and compilation on Nix to README
2025-08-11 19:21:41 +02:00
sipekdan
0470f3be8e
Fix typo in bf16 suffix parsing logic
2025-08-11 19:20:19 +02:00
Christoffer Lerno
1d25197bfd
Bitstructs no longer overloadable with bitops. #2374
2025-08-06 14:51:37 +02:00
Zack Puhl
aae873c044
Add bitsizeof to Builtins ( #2376 )
...
* Add `bitsizeof` to Builtins
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-08-06 13:55:39 +02:00
Zack Puhl
6471728ee5
Add @clz CT macro ( #2367 )
...
* Add `@clz` CT macro
2025-08-06 13:42:52 +02:00
Christoffer Lerno
29bae1fbd6
Updated like the PR #2375
2025-08-06 11:28:36 +02:00
Christoffer Lerno
9c770f360e
Formatter did not properly handle "null" for any, and null for empty faults. #2375
2025-08-06 11:23:56 +02:00
Christoffer Lerno
3b6d68ef21
Compiler segfault when using bitwise not on number literal cast to bitstruct #2373 .
2025-08-06 00:55:56 +02:00
Christoffer Lerno
24c03f9800
Fixed bug generating $c += 1 when $c was derived from a pointer but behind a cast.
2025-08-06 00:44:22 +02:00
Christoffer Lerno
ed61b51489
Adding MultiLogger
2025-08-05 18:49:41 +02:00
Christoffer Lerno
0205ee8688
Added the std::core::log for logging.
2025-08-05 18:30:46 +02:00
Christoffer Lerno
abd3585c44
Parsing difference between "0x00." and "0X00." literals #2371
2025-08-05 13:09:53 +02:00
Christoffer Lerno
aa910a1c44
Compiler assert when using generic parameters list without any parameters. #2369
2025-08-05 12:50:36 +02:00
Christoffer Lerno
00b88a8027
Compiler assertion when defining a function with return type untyped_list #2368 . In general, improve error message when ct types are return types.
2025-08-05 04:11:54 +02:00
Christoffer Lerno
229fdd6193
Detect recursive creation of generics #2366 .
2025-08-05 02:55:32 +02:00
Christoffer Lerno
5292e08cd6
Remove lambda code that should never happen.
2025-08-04 22:13:37 +02:00
Christoffer Lerno
90990ed2f3
Support partial const enums despite use-old-enums enabled.
2025-08-04 17:06:17 +02:00
Christoffer Lerno
c99284103d
Fix issue with naked functions #2365
2025-08-04 15:51:49 +02:00
sudokit
b463358add
Added dl_iterate_phdr
2025-08-04 14:56:51 +02:00
LowByteFox
0e10b71cbf
Stdlib: SingleSizeObjectPool implementation ( #2360 )
...
* implement working single size object pool
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-08-04 14:54:26 +02:00
Christoffer Lerno
cb2d8133e0
Fixed: regression in comments for @deprecated and @pure.
2025-08-04 13:25:30 +02:00