Christoffer Lerno
ffb7935e12
Updating time duration functions.
2023-09-05 10:57:50 +02:00
Christoffer Lerno
53598b8c40
Make ZString print natively with %s.
2023-09-04 22:30:35 +02:00
Christoffer Lerno
fe0ae4a9aa
Error when splat is used with raw varargs.
2023-09-04 22:24:46 +02:00
Christoffer Lerno
d1bb9c55ee
Add blocking connection with timeout, and initial poll functionality.
2023-09-03 19:03:00 +02:00
Christoffer Lerno
29cc9ad8b1
Order IoError declarations.
2023-09-03 10:32:26 +02:00
Christoffer Lerno
4c081f59ff
Refactoring, adding printf / printfn to all streams.
2023-09-03 10:14:04 +02:00
Christoffer Lerno
9a6d83f526
Updated stream API.
2023-09-03 01:14:15 +02:00
Christoffer Lerno
a6cff5c2a5
Removal of old Network, added nonblocking set and async connect.
2023-09-02 17:39:51 +02:00
Pierre Curto
e56313a204
use slice assign and add List.*using_test functions ( #967 )
...
* std/collections: use slice assignment
* std/collections: add List.remove_using_test and List.retain_using_test
2023-09-01 12:16:15 +02:00
Christoffer Lerno
70b9e811bd
Update of enummap.
2023-09-01 11:19:20 +02:00
Christoffer Lerno
46582af0ae
Add contracts to memcpy. Fix bug when compile time local declarations are used as expressions. This caused a check to be invalid in the @pool code.
2023-09-01 11:13:43 +02:00
Christoffer Lerno
0387816cb9
Gracefully handle unlocalized errors. Fix collisions with tests and using $test variable.
2023-09-01 10:03:09 +02:00
Christoffer Lerno
b6756b5b35
Overlapping slice assign is now safe.
2023-09-01 09:40:07 +02:00
Christoffer Lerno
34e1f89ded
Changed atomic calls to be macros.
2023-09-01 08:32:38 +02:00
Christoffer Lerno
0142e5fd33
Removed the need for lambda in remove_if, removed potential implementation specific behaviour.
2023-08-31 23:39:00 +02:00
Pierre Curto
cd950a0359
lib/std/collections: fix comments, List.remove_if() and List.retain_if() methods
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-31 23:20:50 +02:00
Christoffer Lerno
770115abd1
Fix default library linking order.
2023-08-31 20:20:51 +02:00
Christoffer Lerno
faf7782b1e
Fix problems with slice assign over distinct types.
2023-08-31 13:41:21 +02:00
Christoffer Lerno
82ba02a904
Allow indexing of constant strings. Fixed reverse indexing of constant initializers.
2023-08-30 16:36:29 +02:00
Christoffer Lerno
dd0dc1a936
Allow anyfault and any aliasing. Fix any comparison.
2023-08-30 13:56:16 +02:00
Christoffer Lerno
eac19814e1
Make typeid switches always use subtype matching. Update seeder mixing.
2023-08-29 22:48:26 +02:00
OdnetninI (Eduardo José Gómez Hernández)
7aca8a02cb
Architecture generic Atomics (C11 + extras) ( #958 )
...
* Initial implementation for c11 atomics
* Fix cmpxchg usage
* Support for floating point atomics
* Added atomic min and max
* Updated copyright notice
* Removed Floats from and or xor. Added mul, div, bitshift
* Changed get_atomic_compatible_type to lower_to_atomic_compatible_type
* Require non-null pointers
* Fix spacing
* Added Atomic type
* Added macro to reduce code
* Small reorder and cleanup
* Added cmpxchg constrains
* Apply all the restrictions for atomic loads/stores and cmpxchg
2023-08-29 14:25:43 +02:00
Dmitry Atamanov
efb492eace
Add simple benchmark runner.
2023-08-29 12:28:06 +02:00
Christoffer Lerno
79f964dce9
Fix of atomic checks. Renamed MONOTONIC -> RELAXED.
2023-08-29 12:27:40 +02:00
Christoffer Lerno
a23112fae6
Added parentof.
2023-08-29 11:51:09 +02:00
Pierre Curto
092296984a
std/math/random: add missing SimpleRandom.init() method
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-28 10:03:30 +02:00
Christoffer Lerno
565f511cc7
Updated error handling on test/benchmark attribute.
2023-08-28 08:17:57 +02:00
Dmitry Atamanov
b8c92c69b0
Implement builtin benchmarks.
2023-08-28 08:13:21 +02:00
Christoffer Lerno
6ebb3caa20
Fix issue where type wasn't canonical. Addresses #957
2023-08-27 19:04:34 +02:00
Dmitry Atamanov
cc2c737357
Fix calling llvm::writeArchive for LLVM > 17.
2023-08-27 18:11:24 +02:00
Christoffer Lerno
69553fd80e
Bitstruct designated initializer sometimes failed. This addresses. #954
2023-08-27 18:10:22 +02:00
Christoffer Lerno
190e1b19f1
Fix of next_short
2023-08-26 16:17:30 +02:00
Pierre Curto
c09b6154f4
std/lib/collections: add Object.get_len(); add some tests for encoding/json
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-26 13:24:23 +02:00
Pierre Curto
120d5a672c
std/collections: Object.get* return an error if requested type if invalid
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-26 13:24:23 +02:00
Pierre Curto
307212a19c
std/encoding: use char.is_digit() where applicable
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-26 13:24:23 +02:00
Pierre Curto
eedb2c3c52
std/collections: add RingBuffer.popc()
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-26 13:24:23 +02:00
Christoffer Lerno
b1f52cf8a9
Updated random interface further.
2023-08-26 13:22:02 +02:00
Christoffer Lerno
bea9ac010c
Updated random interface.
2023-08-26 12:58:57 +02:00
Christoffer Lerno
6ebd437a5f
Fix bug when converting from typedef to distinct. Ordered struct fields. Update debug type when returning an optional.
2023-08-25 14:11:23 +02:00
Pierre Curto
c0b109fbc1
#934 followup
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-24 18:10:18 +02:00
Dmitry Atamanov
b77f254ab1
Tune @expect, @likely, @unlikely and @prefetch macros.
2023-08-24 16:09:56 +02:00
Dmitry Atamanov
f5fea69ef9
Move get_var, set_var and clear_var to os::env module.
2023-08-24 13:31:48 +02:00
Pierre Curto
c63b3d4209
Small updates to std::lib ( #949 )
...
* lib/std/io: add Stream.supports_{read,Write}_byte and Stream.write_all
* std/io/: use char.digit()
2023-08-24 11:59:00 +02:00
Christoffer Lerno
056ffa5876
Fix bug dropping bounds checks for arrays. This addresses #943 .
2023-08-23 14:21:11 +02:00
Christoffer Lerno
0120498ec8
Fix seeder, update with dynamic interface for random. Insert unreachable after panic in asserts. Macro ensure static check.
2023-08-23 13:52:27 +02:00
Christoffer Lerno
0b67f1a8e4
Fix windows .dyn_search.
2023-08-22 21:34:10 +02:00
Christoffer Lerno
16e71c14b9
New resolution of $define only check on the last element. Fix issue with pointer and array element types not considered live.
2023-08-22 18:16:26 +02:00
Christoffer Lerno
27445e6c1d
Semi-fix of $embed on empty. Inline caches for dynamic dispatch.
2023-08-22 15:24:21 +02:00
Dmitry Atamanov
fcb4bc0781
Reimplement QuickSort (non-recursive modification).
2023-08-22 14:48:12 +02:00
Christoffer Lerno
6c60b0d2a6
Update errno listings. Update ai flags in std::net. Fix incorrect socket error results on Win32. Change behaviour Socket set_option. TcpSocket/TcpServerSocket/UdpSocket. Rename "TimeDuration" to "Duration". Allow @if on enum values.
2023-08-19 22:41:54 +02:00