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
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
2eddda9061
Add gather/scatter for vectors.
2023-09-14 10:19:15 +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
Christoffer Lerno
e3412da033
Removed broken code. Update formatter for precision. Fix of panic.
2023-09-05 22:53:56 +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
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
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
Dmitry Atamanov
b8c92c69b0
Implement builtin benchmarks.
2023-08-28 08:13:21 +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
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
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
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
Christoffer Lerno
9b0da89a03
Added compare_to as a standard macro.
2023-08-17 10:13:00 +02:00
Christoffer Lerno
b05ba8d110
Updated the test runner code slightly.
2023-08-16 17:31:16 +02:00
Pierre Curto
5bd21c10b6
improve tests ( #932 )
...
* test: fix warnings generated by Python's interpreter
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/core/runtime: sort tests to run; improve tests output
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-16 12:28:07 +02:00
Christoffer Lerno
3e765a3f3e
Hash maps now copy keys if keys are copyable.
2023-08-10 21:14:24 +02:00
Pierre Curto
9b1c75d061
std/lib: simplify String.{,r}index_of and improve speed for the index… ( #907 )
...
* std/lib: simplify String.{,r}index_of and improve speed for the index_of one
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/collections: add EnumMap.get_ref
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-02 11:43:58 +02:00
Pierre Curto
701d6a0746
std/lib/io: add Scanner ( #904 )
...
* std/lib/io: add Scanner
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/core: use existing methods in String.convert_ascii_to_{lower, upper}
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-01 10:47:21 +02:00
Christoffer Lerno
8a335fc64c
Updated stack trace. This addresses #898 .
2023-07-31 10:57:56 +02:00
Christoffer Lerno
b759abc954
Fix to DString reserve.
2023-07-29 22:42:55 +02:00
Christoffer Lerno
108b2244d8
Fix bug in aligned_realloc, fixes issue when a type is not resolved before the cast. #897
2023-07-28 22:21:23 +02:00
Christoffer Lerno
499c82b089
Updated indentation to C3 standard.
2023-07-26 14:01:24 +02:00
Pierre Curto
242006d05d
add is_absolute and absolute methods to path::Path ( #882 )
...
* lib/std/io/os: remove unnecessary dup in native_ls
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/core: add String.index_of_char and String.rindex_of_char
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/io: add Path.is_absolute
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/io: add Path.absolute
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std: fix Path.normalize on files starting with `.`; add Path.walk
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-25 23:23:56 +02:00
Christoffer Lerno
b74b62e242
Fixes to broken docs parsing. Fixes #880 .
2023-07-25 17:55:46 +02:00
Christoffer Lerno
5aae9f3204
Correctly apply fixup to switch macros. Addresses new issue in #862 . Updates @pool.
2023-07-19 11:38:18 +02:00
Christoffer Lerno
5c2e82fc8b
More use of temp allocator.
2023-07-19 02:46:43 +02:00
Christoffer Lerno
4dcfb7a675
Fix of #862 where enums declarations where not regenerated. Updated @pool implementation.
2023-07-18 23:23:53 +02:00
Christoffer Lerno
2e6c8721bc
Fix of is_comparable.
2023-07-17 21:22:16 +02:00
Christoffer Lerno
34306cbf5d
Fixes missing checks to body arguments. Do not create debug declaration for value-only parameter. Bug in alignment for atomics. Macro ref parameters are pointers.
2023-07-15 15:11:44 +02:00
Christoffer Lerno
ab32e0dc9d
Fix for tests & callstack.
2023-07-13 21:48:48 +02:00
Christoffer Lerno
c7d90baad1
Error message on bus error or segmentation fault. Some additional SIG… ( #848 )
...
* Error message on bus error or segmentation fault. Some additional SIG info. Full debug info by default. Trapping is now debugtrap rather than trap for LLVM. Row now initialized when entering function for stacktrace.
2023-07-13 15:25:06 +02:00
Pierre Curto
2437573a8f
lib/std/io: add Stream.read_all ( #843 )
...
* lib/std/io: add Stream.read_all
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/core: use shortened receiver notation
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-10 20:13:31 +02:00
Christoffer Lerno
e2676a5c7f
Change zero terminated wide strings to use WString over Char16
2023-07-09 20:10:17 +02:00
Christoffer Lerno
9543fbbf1c
Exhaustive switch on enums. This addresses #838
2023-07-09 01:18:01 +02:00
Pierre Curto
d709c18f5f
std/lib/core: rename DString.str to DString.as_str ( #834 )
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-08 00:10:04 +02:00
Christoffer Lerno
4f7b42cdc4
New generic syntax and ad hoc invocation.
2023-07-06 23:43:36 +02:00
Christoffer Lerno
848a5212ef
Fixes #811 . Update some stdlib methods. Header printout correctly picks a name. #804
2023-07-03 13:17:43 +02:00
Christoffer Lerno
f74e294dc2
Push stack codegen to function for cleaner binaries. Some refactoring in allocators.
2023-06-30 01:01:58 +02:00