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
Christoffer Lerno
46c7e9aefa
Cleanup QOI
2025-02-08 00:32:48 +01:00
Jooris Hadeler
ea4c864d4b
Add Socket.peek to allow peeking at the receiving queue. ( #1933 )
...
* Add `Socket.peek` to allow peeking at the receiving queue.
This uses the `MSG_PEEK` flag to peek at the beginning of the
receiving queue without removing data from said queue.
2025-02-07 21:00:54 +01:00
rexim
e6ec09f2c5
Remove the need for the socket helper function, and use the new inline enum functionality.
2025-02-07 20:55:40 +01:00
rexim
122179980c
Introduce Socket.shutdown()
2025-02-07 20:52:36 +01:00
Christoffer Lerno
bc63c16c93
Add @select to perform the equivalent of a ? x : y at compile time.
2025-02-06 22:21:26 +01:00
Aleksandr Vedeneev
3a502feb1d
test::eq/ne/gt syntax ( #1928 )
...
* test::eq/ne/gt syntax
* renamed @almost to test::eq_approx
2025-02-05 22:50:25 +01:00
Radek Micek
4a99ebef51
clock_gettime returns CInt, not void
2025-02-02 22:21:31 +01:00
Adversing
f3afec61bb
Added fmodf function #1875
2025-01-31 22:20:45 +01:00
Christoffer Lerno
9092defd46
defer is broken when placed before a $foreach #1912
2025-01-31 14:39:51 +01:00
Christoffer Lerno
3c50376175
New test runner
2025-01-30 01:09:48 +01:00
Christoffer Lerno
ac3b2f0fea
- Fix bug where in dead code, only the first statement would be turned into a nop.
...
- Remove unused $inline argument to mem::copy.
2025-01-29 13:07:19 +01:00
Christoffer Lerno
70d0ad1fcc
Missing error when placing a single statement for-body on a new row #1892 .
2025-01-28 17:13:37 +01:00
Christoffer Lerno
02c3d5419b
Add with_padding convenience functions.
2025-01-28 00:18:08 +01:00
Rene Hangstrup Møller
d8ca0f69f6
fix allocator::new_aligned #1898
2025-01-27 20:38:11 +01:00
Christoffer Lerno
9530fe8fcd
Fix regression for parsing types and switch to the "new" generic syntax that's being tested.
2025-01-26 22:51:27 +01:00
Christoffer Lerno
e40bab2d30
Allow (int[*]) { 1, 2 } cast style initialization. Experimental change from [*] to [?]. Fix issue where compile time declarations in expression list would not be handled properly.
2025-01-25 22:10:12 +01:00
Christoffer Lerno
16aadae9bd
Remove allocator argument
2025-01-21 22:25:42 +01:00
Snikimonkd
a0192a0116
[FEAT] add golang like channel ( #1843 )
...
* [feat] add golang like channels
* Updated new_init/init. Some fixes for init.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-01-20 23:51:00 +01:00
Bram Windey
bbef5656a5
Fix 'strtul' to 'strtoul'
2025-01-20 21:45:15 +01:00
Christoffer Lerno
c3f5806aa3
Const strings and bytes were not properly converted to compile time bools.
...
Contracts @require/@ensure are no longer treated as conditionals, but must be explicitly bool.
2025-01-18 23:24:55 +01:00
Christoffer Lerno
304b604652
Added weakly linked __powidf2
2025-01-17 17:42:39 +01:00
Christoffer Lerno
d4bd68c188
Fix bug in SHA1 for longer blocks #1854 .
2025-01-17 01:10:40 +01:00
Christoffer Lerno
721aaa28aa
Added '%h' and '%H' for printing out binary data in hexadecimal using the formatter.
2025-01-16 01:06:57 +01:00
Taylor W
660654f9e0
math_tests: pow test ( #1842 )
...
* math::nolibc: replaced code with word macros
* math_tests: pow test
Added test for pow and added more test points for the exp and log tests.
2025-01-15 13:35:18 +01:00
Christoffer Lerno
2f7d18bfb8
Quicksort and insertsort incorrectly allowing arrays and vectors by value. #1845 .
2025-01-15 13:31:29 +01:00
Christoffer Lerno
5ba9acad5d
Fix bug where &i[0] = null was not detected to be an error. #1833
2025-01-14 01:43:59 +01:00
Christoffer Lerno
4cb984e56d
Prevent temp arena scribbling from causing an asan warning. #1825
2025-01-13 16:58:55 +01:00
Taylor W
259112e178
math: macros to set floating-point numbers with uint ( #1826 )
...
* math: Setting the bits of floating-point numbers
Added macros which set all 32 bits of a float, the lower 32 bits of
a double, and the upper 32 bits of a double. Some changes were made to
older code to use these macros.
* Replaced code with bitsetting macros in __tan.c3 and tan.c3
* math: tests for word macros and release notes
Tests were written for the word macros, which include getting and
setting a float with a uint and getting and setting the high or low word
of a double with a uint.
Release notes were updated to include the word setter macros.
2025-01-13 13:37:49 +01:00
Christian Buttner
27970085e5
Fix formatter output length calculation.
2025-01-12 22:54:43 +01:00
konimarti
0e44e63fa8
net/url: implement url encoding (RFC 3986) ( #1795 )
...
* net/url: implement url encoding (RFC 3986)
Implement url percent-encoding and -decoding functions according to RFC
3986. Add unit tests.
Link: https://datatracker.ietf.org/doc/html/rfc3986
* net/url: ensure correct encoding of URL components
Add encoding and decoding methods to the Url struct components according
to RFC 3986.
An Url can be parsed from a String with `new_parse()` or `temp_parse()`.
The parsed fields are decoded. The only field that is not decoded is
`raw_query`. To access the decoded query values, use
`Url.query_values()`.
`Url.to_string()` will re-assemble the fields into a valid Url string
with proper percent-encoded values.
If the Url struct fields are filled in manually, use the actual
(un-encoded) values. To create a raw query string, initialize an
`UrlQueryValues` map, use `UrlQueryValues.add()` to add the query
parameters and, finally, call `UrlQueryValues.to_string()`.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-01-12 22:52:25 +01:00