Commit Graph

412 Commits

Author SHA1 Message Date
Pierre Curto
757a5b58e8 std::core::dstring: fix DString.zstr() (#1024)
rename DString.zstr to DString.zstr_view
2023-10-03 00:32:56 +02:00
Christoffer Lerno
c5404c6573 get_env for Win32, @pierrec's get_config_dir and get_home_dir 2023-09-25 16:29:49 +02:00
Christoffer Lerno
a1ecf2211f as_str() replaced by str_view() 2023-09-24 23:50:16 +02:00
Christoffer Lerno
ad776c76a7 Add benchfn and testfn allowing easy overwrite of test and benchmark runners. #990 2023-09-23 00:30:09 +02:00
Pierre Curto
e5b990691e std::lib::io: make printn_gen discardable
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-09-22 15:16:44 +02:00
Pierre Curto
d6edd80f3b lib::std::encoding: add varint::{read,write}
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-09-22 15:16:44 +02:00
Christoffer Lerno
e706a8acd0 Fix Linux constant in posix.c3. Address issue #1009. Sanitizes the module name in generated project. 2023-09-22 15:15:47 +02:00
Christoffer Lerno
8dad8f2b1c Use regular backtrace for Mac on signals as well. 2023-09-22 01:12:48 +02:00
Christoffer Lerno
c4228e08c5 MacOS uses regular stacktrace for errors. 2023-09-21 16:39:13 +02:00
Christoffer Lerno
9eef34049d Remove vestiges of top down widening. 2023-09-19 09:45:56 +02:00
OdnetninI (Eduardo José Gómez Hernández)
05c2737f46 Fix timeout at tcp::connect 2023-09-18 23:47:01 +02:00
Christoffer Lerno
cbdc746c9d Fix alignment in new fetch builtins. 2023-09-17 21:07:00 +02:00
OdnetninI (Eduardo José Gómez Hernández)
8d11794f83 Fix atomic_fetch_sub builtin + Updated atomic library (#997)
Fix atomic_fetch_sub builtin + Updated atomic library
2023-09-17 13:22:12 +02:00
Dmitry Atamanov
d6e9985a26 Add log(x, base) function to std::math module. 2023-09-15 09:22:34 +02:00
Christoffer Lerno
2eddda9061 Add gather/scatter for vectors. 2023-09-14 10:19:15 +02:00
Christoffer Lerno
1d04b70efe Fixed issues inferring length with subarrays. Removed old, non-working example. Infer length in the case of subarray literals. 2023-09-12 22:24:20 +02:00
Pierre Curto
d61482dffc fix Object.free (#982)
* lib/std/collections: add HashMap.@each_entry()
* lib/std/json: fix Object.free() when object is a map
* lib/std/collections: fix allocator use in Object.{set,set_at,append}
* lib/std: add char.from_hex
* lib/std/collections: print arrays and objects compactly
* lib/std/io: fix Formatter.vprintf result
* lib/std/io/stream: rename module for ByteBuffer
* lib/std/io/stream: make Scanner a Stream reader
* lib/std/io: make std{in,err,out} return File* if no libc
2023-09-12 13:49:52 +02:00
Christoffer Lerno
37bb16cca1 Updated cast code. 2023-09-12 12:48:52 +02:00
Christoffer Lerno
d67e846712 Remove cast from void! to anyfault. Rename @catchof to @catch 2023-09-09 22:49:32 +02:00
Christoffer Lerno
dfe097931c Add masked_load / masked_store 2023-09-09 01:05:51 +02:00
Christoffer Lerno
4ef74a1205 Add $$select. "--fp-math" options. Fixed issue with accidentally silent error on failed vector conversions. 2023-09-08 09:20:27 +02:00
Pierre Curto
b894e5be69 lib/std/encoding: remove use of pushback_byte in json
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-09-08 09:05:38 +02:00
Pierre Curto
51f76c69c4 lib/std/collections: add Bitset
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-09-06 23:09:37 +02:00
Christoffer Lerno
b87e27d8a3 Update tests and CI (#979)
Update CI. Explicit native mutex "initialized" bool.
2023-09-06 22:43:07 +02:00
Christoffer Lerno
50e99b571f Add frame pointer on "enable stacktrace". Set no-trapping-math. Update fmuladd. 2023-09-06 14:38:21 +02:00
Christoffer Lerno
e3412da033 Removed broken code. Update formatter for precision. Fix of panic. 2023-09-05 22:53:56 +02:00
Pierre Curto
f8fa9a057e lib/std/io: support . string format speficier (#970)
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-09-05 14:39:51 +02:00
Christoffer Lerno
74649ef672 Fix of from_float. 2023-09-05 13:52:14 +02:00
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
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
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
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
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
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
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