Christoffer Lerno
d760378b02
- Added @format attribute for compile time printf validation #2057 .
...
- Bug when printing a boolean value as an integer using printf.
2025-03-24 13:32:44 +01:00
Christoffer Lerno
82f1b543ed
&self not runtime null-checked in macro #1827 . Regression in temp allocators.
2025-03-23 22:50:09 +01:00
walther chen
b48588ca8f
improve error message for uninitialized temp allocator pool on new
...
threads
2025-03-23 22:15:42 +01:00
Christoffer Lerno
a03d821602
- Use @pool_init() to set up a temp pool on a thread. Only the main thread has implicit temp pool setup.
...
- `tmem` is now a variable.
2025-03-21 17:08:58 +01:00
Christoffer Lerno
207bcfea02
os::exit and os::fastexit added.
2025-03-20 13:36:59 +01:00
Christoffer Lerno
de74e97ab1
Fixes to temp allocator.
2025-03-18 19:58:16 +01:00
Christoffer Lerno
7e100472e7
- AnyList now also defaults to the temp allocator.
...
- `os::getcwd` and `os::get_home_dir` requires an explicit allocator.
- `file::load_new` and `file::load_path_new` removed.
2025-03-18 18:34:52 +01:00
Christoffer Lerno
72608ce01d
- Temp allocator now supports more than 2 in-flight stacks.
...
- Printing stacktrace uses its own temp allocator.
- `@pool` no longer takes an argument.
- `Allocator` interface removes `mark` and `reset`.
- DynamicArenaAllocator has changed init function.
- Added `BackedArenaAllocator` which is allocated to a fixed size, then allocates on the backing allocator and supports mark/reset.
2025-03-18 15:16:22 +01:00
Christoffer Lerno
425676a98d
Bug due to missing cast when doing $i[$x] = $z.
...
Added `math::iota`.
2025-03-16 10:58:13 +01:00
Christoffer Lerno
5c77c9a754
- Change distinct -> typedef.
...
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00
Christoffer Lerno
8b49e6c14d
Rename def to alias.
2025-03-13 11:22:27 +01:00
Christoffer Lerno
b8ae2b06d6
Rename @return! to @return?
2025-03-12 21:40:30 +01:00
Christoffer Lerno
25bccf4883
New faults and syntax ( #2034 )
...
- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
2025-03-10 00:11:35 +01:00
Boris Barbulovski
fefce25081
C3 Android logcat interface. ( #2030 )
...
* C3 Android logcat interface.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-09 15:52:24 +01:00
Boris Barbulovski
f21cc02320
Initial Android support. ( #2024 )
...
* Initial Android support.
* Add Android x86_64
* - Typo api_verion
- Typo in DEFAULT_TARGETS
- Removed unnecessary snprintf
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-08 23:38:52 +01:00
BWindey
1461414128
[TEST] Add unit tests for libc ( #1974 )
...
Some tests for libc + fixes
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-08 22:25:21 +01:00
m0tholith
dc8b35e62f
Added is_initalized function to list, linkedlist, and anylist types ( #2027 )
...
* Added `is_initalized` function to list, linkedlist, and anylist types
2025-03-08 21:49:17 +01:00
Christoffer Lerno
a088a5057a
Remove if (catch foo) { case ... } syntax.
2025-03-07 22:48:28 +01:00
Christoffer Lerno
facaa75083
Remove use of if-catch-case
2025-03-07 13:57:05 +01:00
Christoffer Lerno
5482107ca8
Some formatting and updated test. Updated releasenotes.
2025-03-07 00:14:41 +01:00
Stephen Molloy
1fba9a7993
String.to_float("+") fails ( #2021 )
...
* When stripping +/- from the start of a string in String.to_real: only do this if the string length is greater than 1.
* Added a test for the String.to_float("+") bug
2025-03-07 00:02:13 +01:00
Christoffer Lerno
c0b80eccad
Change @return! syntax to require ":" after faults. Update all contracts to consistently use ":" before the description.
2025-03-05 17:11:45 +01:00
Christoffer Lerno
28b1e4d182
Fix issue when doing boolean atomic operations.
2025-03-04 16:58:27 +01:00
Christoffer Lerno
9c65098a91
Fix missing "$switch" update.
2025-03-04 16:39:20 +01:00
Christoffer Lerno
2439405e70
- $foreach "()" replaced by trailing ":" $foreach ($x, $y : $foo) -> $foreach $x, $y : $foo:
...
- `$for` "()" replaced by trailing ":" `$for (var $x = 0; $x < FOO; $x++)` -> `$for var $x = 0; $x < FOO; $x++:`
- `$switch` "()" replaced by trailing ":" `$switch ($Type)` -> `$switch $Type:`
- Empty `$switch` requires trailing ":" `$switch` -> `$switch:`
2025-03-04 16:13:47 +01:00
Jonas
46b52ec9ce
Fix Atomic.max ( #2011 )
...
* Fix atomic max and comments in std::atomic
* Updates to `Atomic` to handle distinct types and booleans.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-04 15:39:03 +01:00
Zack Puhl
177df6321a
add test file for wide string constants
...
add full UTF-8 to wide-str language capabilities
move wstr language constant expressions to builtins and adjust test cases
2025-03-04 13:46:59 +01:00
Erik Bäckman
83bc24f58c
Fix libc::stat on FreeBSD (x86_64)
2025-03-04 10:20:13 +01:00
Christoffer Lerno
0a905d8458
Change all hash functions to have a common hash function.
2025-03-03 20:07:02 +01:00
Christoffer Lerno
261bfb97c6
Rename length_sq to sq_magnitude
2025-03-03 18:47:55 +01:00
Christoffer Lerno
cc94199131
Remove Vec2 and other aliases from std::math.
2025-03-03 18:13:39 +01:00
Christoffer Lerno
0925010c07
Removal of any-switches
2025-03-03 15:02:25 +01:00
Christoffer Lerno
13f824e349
Add ONHEAP for List and HashMap
2025-03-03 12:20:18 +01:00
Christoffer Lerno
c40198b016
- new_* functions in general moved to version without new_ prefix.
...
- `string::new_from_*` changed to `string::from_*`.
- `String.to_utf16_copy` and related changed to `String.to_utf16`.
- `String.to_utf16_tcopy` and related changed to `String.to_temp_utf16`
- `mem::temp_new` changed to `mem::tnew`.
- `mem::temp_alloc` and related changed to `mem::talloc`.
- `mem::temp_new_array` changed to `mem::temp_array`.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
222bfb158b
Remove deprecated functions.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
2b90500c22
Remove container sanitizer unless using the LIBC allocator.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
2a895ec7be
First 0.7 update, removing all deprecated features.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
55c88408be
Remove some deprecated use.
2025-03-01 23:58:28 +01:00
Christoffer Lerno
1b0ac13d76
Deprecation of operator(@construct)
2025-02-28 10:39:08 +01:00
Christoffer Lerno
33b05bcfeb
More deprecations in lib6, and updates to lib7
2025-02-27 11:10:41 +01:00
Aleksandr Vedeneev
0c33b78a2f
Test runner args #1967 ( #1988 )
...
* harmonized testrun arguments with c3c --test-* naming
added --test-quiet option
added --test-noleak to disable tracking allocator mem leak detection
added --test-nocapture - tests can print out everything as they run
* Move changes to lib7
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-02-26 00:49:21 +01:00
Christoffer Lerno
c13c0d04b1
Run MSVC with "no-terminal"
2025-02-25 16:02:51 +01:00
Jonas Quinten
ed62268997
std::math::bigint: Fixed init_with_array with empty array
2025-02-24 11:12:55 +01:00
Jonas Quinten
38110b0269
fix
2025-02-24 11:12:55 +01:00
Jonas Quinten
e34d56327a
std::math::bigint: Fixed init_with_u128 and init_with_array
2025-02-24 11:12:55 +01:00
Christoffer Lerno
3da9f73338
- Output into /.build/obj/<platform> by default.
...
- Output llvm/asm into llvm/<platform> and asm/<platform> by default.
- Don't delete .o files not produced by the compiler.
- Correctly handle in/out when interacting with inout.
2025-02-22 22:34:26 +01:00
Christoffer Lerno
855be92881
Regression with .gitkeep in project init. List.init incorrectly didn't have the first argument the allocator. Added .init to priority queue. Created mem thread allocator alias. Correctly handle ident aliases. Allow ident on builtin aliases.
2025-02-21 21:34:48 +01:00
Christoffer Lerno
e674deb486
Fix generics.
2025-02-21 16:12:35 +01:00
Christoffer Lerno
3ef094a3d3
Add some conveniences to Clock and thread. Allow atomic load on booleans.
2025-02-21 15:56:32 +01:00
Alex Veden
5046608d1f
added io::stdout().flush() - to force printing test name before possible deadlock
...
mem::scoped() and long jump resilience fixed #1963
fixed --test-nosort argument + extra test for teardown_fn memory leak
Some renaming. Simplify robust test allocator handling. Pop temp allocators in test runner.
`Thread` no longer allocates memory on posix.
Update unprintable struct output.
Correctly give an error if a character literal contains a line break.
2025-02-20 01:15:48 +01:00