Jeroen van Rijn
678fa897f5
signbit -> sign_bit in tests/core/math
2025-04-15 16:20:49 +02:00
mtarik34b
1d2adbb3c6
Remove reference to git issue
2025-04-15 05:26:36 +02:00
mtarik34b
313d7d84bc
Ensure NaN != any_float_value evaluates to true for constant NaN values
2025-04-15 05:00:36 +02:00
Jeroen van Rijn
0fc141db5d
core:mem/tlsf: Add early-out in OOM logic
...
This implementation doesn't allow for out-of-band allocations to be passed through, as it's not designed to
track those. Nor is it able to signal those allocations then need to be freed on the backing allocator,
as opposed to regular allocations handled for you when you `destroy` the TLSF instance.
So if we're asked for more than we're configured to grow by, we can fail with an OOM error early, without adding a new pool.
2025-04-14 20:40:05 +02:00
Jeroen van Rijn
beee27dec0
Allow core:mem/tlsf to automatically add new pools.
...
New features:
- If TLSF can't service an allocation made on it, and it's initialized with `new_pool_size` > 0, it will ask the backing allocator for additional memory.
- `estimate_pool_size` can tell you what size your initial (and `new_pool_size`) ought to be if you want to make `count` allocations of `size` and `alignment`, or in its other form, how much backing memory is needed for `count` allocations of `type` and its corresponding size and alignment.
2025-04-14 19:49:55 +02:00
Jeroen van Rijn
7088284ff4
Refactor core:mem/tlsf, add free_all support.
...
TODO: Allow the TLSF allocator to add additional pools when it would ordinarily OOM
by calling its backing allocator.
2025-04-14 17:13:27 +02:00
Jeroen van Rijn
0a97e01827
Add tests for type_elem_type on SIMD vectors
2025-04-11 23:31:02 +02:00
Barinzaya
bbaec119e5
Added tests for math.nextafter.
2025-04-07 16:27:41 -04:00
Jeroen van Rijn
a5e513567b
Optimize regex match iterator.
...
Reuse virtual machine and capture groups between matches.
2025-04-07 14:58:41 +02:00
Jeroen van Rijn
9a2b6c01aa
Return loop index in regex iterator.
2025-04-06 21:45:37 +02:00
Jeroen van Rijn
66077add33
{.Glboal} implicit in regex allocator.
2025-04-06 21:13:02 +02:00
Jeroen van Rijn
918d57fe01
Keep -vet happy.
2025-04-06 14:24:17 +02:00
Jeroen van Rijn
cdc56dc691
Add iterator for core:text/regex.
...
Usage:
```odin
haystack := `xxfoobarxfoobarxx`
pattern := `f(o)ob(ar)`
it := regex.create_iterator(haystack, pattern, {.Global}) or_return
defer regex.destroy(it)
for capture in regex.match(&it) {
fmt.println(capture)
}
```
2025-04-06 14:19:14 +02:00
Jeroen van Rijn
8d283cefa0
Merge pull request #5007 from laytan/net-errors-overhaul
...
net: rework errors to be cross-platform
2025-04-05 17:53:10 +02:00
Laytan Laats
ff7d55a8e1
net: rework errors to be cross-platform
2025-04-05 17:35:19 +02:00
Jeroen van Rijn
843467bb8f
Fix #5004
...
Fixes constant NaN to constant NaN comparisons.
2025-04-05 14:47:30 +02:00
gingerBill
4a595f9dac
Merge pull request #4954 from Feoramund/os2-path
...
Add new path API for `os2`
2025-03-24 11:19:21 +00:00
Yawning Angel
f3f5fbd373
test/benchmarks/crypto: Improve benchmarks
...
- Use text/table for results
- Add more benchmarks
2025-03-23 19:14:33 +09:00
Yawning Angel
b220df60b8
core:crypto/deoxysii: Initial import
2025-03-23 19:14:33 +09:00
Yawning Angel
c2786a6dd5
core/crypto/aegis: Initial import
2025-03-23 19:14:33 +09:00
Yawning Angel
9fdcc4e39a
core/crypto/x448: Initial import
2025-03-23 19:14:33 +09:00
Feoramund
3525e71739
Add tests for new os2 path API
2025-03-21 19:14:15 -04:00
Feoramund
4e7f54c565
Decouple usage of filepath from os2
2025-03-21 19:14:15 -04:00
gingerBill
539e9bd2e3
Merge pull request #4836 from laytan/fix-wrong-out-of-memory
...
fix wrong out of memory in edge cases, just try allocate from block for one source of truth
2025-03-20 17:20:26 +00:00
gingerBill
bb429696f8
Merge pull request #4877 from laytan/os2-additions
...
os/os2: recursive directory walker, expose errors in read_directory, file clone
2025-02-28 14:37:47 +00:00
Feoramund
6054b921db
Add tests for new safe to_cstring
2025-02-27 18:54:38 -05:00
Laytan Laats
0e4140a602
os/os2: recursive directory walker, expose errors in read_directory, file clone
...
Adds a directory walker, a method of exposing and retrieving errors from
the existing read directory iterator, allows reusing of the existing
read directory iterator, and adds a file clone procedure
2025-02-24 20:40:44 +01:00
Laytan Laats
55302280d8
fix addrinfo struct def
...
Fixes #4816
2025-02-12 19:24:27 +01:00
Laytan Laats
ae0f69fbe2
cleanup test arenas
2025-02-12 19:13:16 +01:00
Laytan Laats
7df5be2131
fix wrong out of memory in edge cases, just try allocate from block for one source of truth
2025-02-12 19:09:21 +01:00
gingerBill
4ea96bd1c9
Merge pull request #4779 from jkenda/master
...
encoding/json: marshal enumerated arrays to objects with key-value pairs
2025-02-08 08:01:36 +00:00
Laytan Laats
5defddffd0
reorganize tests and handle endian
2025-02-06 21:44:34 +01:00
Laytan Laats
9241d7c698
add tests for abs() on floats
2025-02-06 21:20:15 +01:00
jkenda
51b80c5a20
encoding/json: marshal enumerated arrays to objects with key-value pairs
2025-02-01 10:32:07 +01:00
Laytan Laats
b673642412
os/os2: add get_executable_path and get_executable_directory
2025-01-21 18:54:45 +01:00
avanspector
9868c8292b
Merge branch 'master' of https://github.com/avanspector/Odin
2025-01-10 06:42:42 +01:00
avanspector
a704000c34
Haiku: add posix tests
2025-01-10 06:42:19 +01:00
gingerBill
2a29322c91
Merge pull request #4605 from karl-zylinski/tracking-allocator-bad-free-default-to-crash
...
Make tracking allocator default to crashing on a bad free instead of adding to bad_free_array
2025-01-08 16:24:20 +00:00
gingerBill
a3b4280cf7
Merge pull request #4633 from spahnke/fix-matrix-adjugate
...
Fix matrix adjugate
2025-01-06 09:36:18 +00:00
gingerBill
5df699abf2
Add #+feature dynamic-literals to test
2025-01-05 14:03:08 +00:00
gingerBill
3d984d75cc
Add #+feature dynamic-literals to tests
2025-01-05 14:00:23 +00:00
gingerBill
a300a860ec
Add #+feature dynamic-literals to tests
2025-01-05 13:46:58 +00:00
fleandro
1550eced04
also add a test for non power of 2 N for good measure
2025-01-03 16:58:03 +00:00
fleandro
c93e096d8f
fix N=1 and cleanup tests
2025-01-03 16:50:05 +00:00
fleandro
555bca2cb4
fix test leaks
2025-01-03 15:46:02 +00:00
fleandro
e3de02eaa8
runtime: map_cell_index_static produced wrong results when the number of elements per cell was a power of 2
2025-01-03 15:33:34 +00:00
Sebastian Pahnke
b21fc19233
Add regression tests for inverse_transpose
2024-12-28 10:29:44 +01:00
Sebastian Pahnke
ec5ee19c01
Add regression tests for matrix inverse
2024-12-28 10:29:44 +01:00
Sebastian Pahnke
02a9d8560f
Test symmetry
2024-12-28 10:29:44 +01:00
Sebastian Pahnke
0d955e55db
Add tests for determinants because their calculation depends on the adjugate
2024-12-28 10:29:43 +01:00