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
Christoffer Lerno
d9e5926d57
Fix error when boolean combined with ??. First checkin of C3 tester (unfinished)
2025-02-19 01:02:58 +01:00
Christoffer Lerno
cbacd64987
Update tests to (Foo) { ... } syntax.
2025-02-18 18:53:30 +01:00
Christoffer Lerno
168c11e006
{| |} expression blocks deprecated.
2025-02-18 12:50:34 +01:00
Christoffer Lerno
e77d1fb646
- Increase precedence of (Foo) { 1, 2 }
...
- Add `--enable-new-generics` to enable `Foo{int}` generic syntax.
2025-02-18 00:26:22 +01:00
Christoffer Lerno
8c58b31bbd
Remove <[]> experimental generic syntax.
2025-02-13 12:53:46 +01:00
Christoffer Lerno
c785572467
Add allocator::wrap.
2025-02-13 03:10:53 +01:00
Velikiy Kirill
f0682422c0
Add more Windows API types and structs ( #1956 )
...
* Add more Windows API types and structs
* Add more Windows API types and structs (merged sock.c3 to wsa.c3)
* Some formatting.
---------
Co-authored-by: Kirill Velikiy <velikoss@vk.com >
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-02-12 23:30:07 +01:00
Christoffer Lerno
1f856cacf5
HashMap is now Printable. Fix access inlining for enums. #1958
2025-02-12 23:11:46 +01:00
Ygor Pontelo
c9ecb09cd7
duration fix ( #1950 )
...
* duration fix
* Update release notes, explicitly send -1.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-02-12 22:13:07 +01:00
Christoffer Lerno
4961d0433f
- Circumvent Aarch64 miscompilations of atomics.
...
- Fixes to ByteBuffer allocation/free.
- Fix issue where compiling both for asm and object file would corrupt the obj file output.
2025-02-12 12:50:30 +01:00
Christoffer Lerno
45eb3acffe
Remove unused parameter in mem::clear.
2025-02-11 00:15:33 +01:00
Christoffer Lerno
d3ad533dd6
Fix issue in List with sanitizers.
2025-02-11 00:13:04 +01:00
Christoffer Lerno
9e54014848
Fix issue in GrowableBitSet with sanitizers.
2025-02-10 23:55:02 +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
c4212c4649
- Test runner will also check for leaks.
...
- `write` of qoi would leak memory.
- Issue when having an empty `Path` or just "."
- `set_env` would leak memory.
2025-02-10 00:39:02 +01:00
Christoffer Lerno
63f619e5b6
Add tracking allocator to test runner. #1809
2025-02-09 03:10:35 +01:00
Christoffer Lerno
e1d546225f
Update stdlib with new syntax for short function decl.
2025-02-08 23:04:59 +01:00
Christoffer Lerno
d3f2180330
bigint::from_int(0) throws assertion #1944 .
2025-02-08 19:15:14 +01:00
Christoffer Lerno
68b5c1e1f1
Fix bigint hex parsing #1945 .
2025-02-08 19:06:06 +01:00
Christoffer Lerno
c8e671d34b
Assert when using optional as init or inc part in a for loop #1942 .
2025-02-08 18:58:44 +01:00