Christoffer Lerno
69553fd80e
Bitstruct designated initializer sometimes failed. This addresses. #954
2023-08-27 18:10:22 +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
eedb2c3c52
std/collections: add RingBuffer.popc()
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-26 13:24: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
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
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
ed70f39da8
Update the json API
2023-08-19 00:53:28 +02:00
Christoffer Lerno
d5aebb434c
Eliding length for ":"-ranges is no longer allowed.
2023-08-18 22:25:51 +02:00
Christoffer Lerno
17f69d8da8
Update slice assign so that it looks at the arguments and does slice copying or splat assign as needed.
2023-08-18 18:46:38 +02:00
Christoffer Lerno
c07dc700df
Fix of #936 . Also some general cleanup.
2023-08-18 15:55:43 +02:00
Pierre Curto
7a39933c97
add NanoDuration.to_format() ( #935 )
...
* lib/std/time: avoid switch in DateTime.compare_to()
* lib/std/time: add NanoDuration.to_format()
* std/lib: fix #934
2023-08-17 10:30:20 +02:00
Christoffer Lerno
9b0da89a03
Added compare_to as a standard macro.
2023-08-17 10:13:00 +02:00
Christoffer Lerno
0448038c68
Added test.
2023-08-16 15:58:33 +02:00
Christoffer Lerno
e694d60f23
Updates and fixes to Mutex ( #933 )
...
Updating Mutex to have specific types: TimedMutex, RecursiveMutex, TimedRecursiveMutex. Fixes to the win32 implementation.
2023-08-16 15:45:49 +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
Pierre Curto
6c3d6a4b05
std/lib: fix module path for RingBuffer
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-15 15:58:28 +02:00
Christoffer Lerno
f39dd82adc
Fix issue where imports could be made more than once. Addresses #929
2023-08-15 10:47:40 +02:00
Pierre Curto
65bea1cb2d
add ThreadPool ( #926 )
...
* lib/std/collections: fix tab indentation
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/threads: add ThreadPool
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* ats/lib/threads: add num_cpu()
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-14 15:33:51 +02:00
Christoffer Lerno
f912e53038
Fix where designated initializers had optional arguments. See #923
2023-08-13 20:57:50 +02:00
Christoffer Lerno
e22afe5424
Allow "if (try foo())"."
2023-08-13 18:15:20 +02:00
Pierre Curto
c060569599
add tests for Mutex ( #925 )
...
* std/lib: add tests for Mutex
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/collections: add missing import
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* std/collections: add RingBuffer
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-13 17:39:09 +02:00
Christoffer Lerno
d83f591184
Check for mutex initialization. Fix missing check on optional for certain macro situations.
2023-08-12 11:55:49 +02:00
Christoffer Lerno
b6f302d1c6
Fix issues with thread, add some simple test.
2023-08-12 02:16:46 +02:00
Christoffer Lerno
f0d4c4d2ce
Ensure type is checked before analysis of compound literals. #919
2023-08-11 18:15:39 +02:00
Christoffer Lerno
3e765a3f3e
Hash maps now copy keys if keys are copyable.
2023-08-10 21:14:24 +02:00
Christoffer Lerno
356b6bb1b7
Fixed test.
2023-08-10 19:09:00 +02:00
Christoffer Lerno
951a9f2b43
Fix of ++ and -- on bitstructs.
2023-08-10 18:01:50 +02:00
Christoffer Lerno
6d870fbef0
Fix for arithmetic promotion of aliases. Some work towards $exec scripting.
2023-08-10 17:14:29 +02:00
Eduardo José Gómez Hernández
c44a0528df
Tests:std/lib/io/file: Added unit tests for read_any and write_any
2023-08-08 10:12:36 +02:00
Christoffer Lerno
a864822a89
Do not assert when encountering resolved non-identifier access child expressions. Addresses #913
2023-08-04 15:50:21 +02:00
Christoffer Lerno
a1a0958415
Prevent parameters to end with comma.
2023-08-03 14:37:23 +02:00
Christoffer Lerno
def97eea9d
Fixes member visibility for anonymous bitstruct. Bitstruct member attributes works. Anonymous bitstruct assignment fixed.
2023-08-03 01:00:30 +02:00
Christoffer Lerno
fc0973f378
Fix issue casting an untyped list. Addresses #908 .
2023-08-02 23:03:50 +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
Christoffer Lerno
09bb7d3525
Fix issue with type_info not being completely poisoned when encountering an error. Fixes #905
2023-08-01 12:26:49 +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
72f5bac346
When a member is checked, still add it to the environment. Addresses #903 .
2023-07-31 12:35:41 +02:00
Christoffer Lerno
9315443866
Fix issue where lambdas were copied incorrectly from generics. This addresses #900 .
2023-07-30 21:12:02 +02:00
Pierre Curto
6808a38c9f
add std::io::stream::ByteBuffer; fix std::io::Path::walk ( #895 )
...
* lib/std/io/stream: add some inlines
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/io/stream add ByteBuffer
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/io/path: fix free of paths in walk
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/bits: remove unnecessary receiver type
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-29 21:21:45 +02:00
Christoffer Lerno
ada3ea08fc
Some initial parse output. Enforce handling of optionals. Fix issue where constants were folded despite the fact that they shouldn't be. Fix bug related to return foo() where foo() returns void!. ( #893 )
2023-07-27 22:58:41 +02:00
Christoffer Lerno
c18526f10a
Fix of nested union/struct initialization. Fixes #886 .
2023-07-26 21:12:04 +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
d0c00b859b
Fixes incorrect type resolution of && and || with optionals. Fixes #879
2023-07-25 15:16:47 +02:00
Christoffer Lerno
fad0adfcd0
Fix testcase.
2023-07-25 11:25:20 +02:00
Christoffer Lerno
9e477056ed
Fixes to $defined implementation.
2023-07-23 23:55:38 +02:00
Christoffer Lerno
de9bb1d0cc
Fix test.
2023-07-23 21:51:38 +02:00
Christoffer Lerno
45d1b1d671
Fix where bitstructs in subarrays triggered the wrong lowering. Fixes #877
2023-07-23 20:50:53 +02:00
Christoffer Lerno
afb902d792
Fixes #874
2023-07-23 16:24:02 +02:00