Christoffer Lerno
1e38ccdd2b
Fix missing free on GrowableBitSet. init_new/init_temp for GrowableBitSet, LinkedList, List, HashMap, DString, ByteBuffer. Interface to_string renamed to_new_string. Change in allocator usage, malloc is now heap. Added new_array, new_zero_array, new, new_clear, clone. Concat => concat_new. string::printf => string::new_format, string::tprintf => string::tformat. "to_*" are now "to_new_*" and "to_temp_*". "from_*" is "new_from*"
2023-11-09 01:59:49 +01:00
Christoffer Lerno
eab0b417de
Fix to print.
2023-11-01 14:08:29 +01:00
Christoffer Lerno
120e21b80b
Convencience function for random + entropy function.
2023-10-31 22:21:38 +01:00
Christoffer Lerno
cd7a03c2cf
Interface based streams. Fix for initializing with a force unwrap inside. Allow $define to take a list. Allow $define to return error on argument type mismatch in call. Fixed broken bit operations on boolean vectors.
2023-10-31 01:06:59 +01:00
Christoffer Lerno
1aa038c92f
Interface based streams. Fix for initializing with a force unwrap inside. Allow $define to take a list. Allow $define to return error on argument type mismatch in call. Fixed broken bit operations on boolean vectors.
2023-10-31 01:06:59 +01:00
Christoffer Lerno
e4c1328ef2
Better checks for missing @dynamic. Addresses #1055 .
2023-10-28 04:12:43 +02:00
Christoffer Lerno
e17bb5f321
Void* should never deref and should allow methods to be attached to it.
2023-10-27 00:10:59 +02:00
Christoffer Lerno
a0bc03a9f5
Fix uses of @convertible.
2023-10-26 22:21:16 +02:00
Christoffer Lerno
9af37fe427
$and, $or, $is_const, $assignable, .is_eq, .is_ordered, $defined($vatype(2)) works looking if we can create a type, $defined(foo[0]) $defined(foo()). Remove $checks and @checked. Improvide casting checks to always work without destructive changes.
2023-10-24 22:06:04 +02:00
Christoffer Lerno
d01d8d3663
"protocol" => "interface"
2023-10-20 14:12:08 +02:00
Christoffer Lerno
89d4c2cab7
Allocator uses protocols. Fix bug where it was not possible to pass a ref variable as a ref variable. Correct codegen for !anyptr.
2023-10-14 12:39:46 +02:00
Pierre Curto
5a5b600490
std::collections::list: add List.init_from_array
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-10-11 12:46:28 +02:00
Christoffer Lerno
b7a896805d
Fix bug in growable bitset. Always insert 0xAA in malloc on testing.
2023-10-09 14:23:41 +02:00
Pierre Curto
6b571fe427
List capacity and SubProcess field name change ( #1038 )
...
* std::collections::list: adjust increased capacity
* std::os::process: rename conflicting field in SubProcess
* c3c: adjust spacing for --list-builtins and --list-keywords
2023-10-09 12:52:23 +02:00
Pierre Curto
3aa85cf641
misc ( #1033 )
...
* make conv::char32_to_utf8_unsafe() return the number of bytes it wrote
add tests for DString
fix pointer arithmetic in DString.insert_at
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* add support to printf for %d and enums
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-10-08 02:12:20 +02:00
Christoffer Lerno
312a39ee24
Handle protocol inheritance. Allow overlapping protocol methods. Remove the need for &self in protocol declarations. Fix cast rules for protocol. Fix cast rules for bitstruct #1034 .
2023-10-08 02:10:28 +02:00
Christoffer Lerno
99cfaa1583
Refactor protocols.
2023-10-06 22:31:41 +02:00
Christoffer Lerno
f3e3aa231d
Make Random use protocols.
2023-10-06 22:31:41 +02:00
Christoffer Lerno
a1bce81ed0
Fix growable bitset ( #1032 )
2023-10-06 01:27:32 +02:00
Pierre Curto
9643a7c2b2
add DString.insert_at ( #1026 )
...
* add DString.insert
* make conv::utf32to8 more C3-like
2023-10-05 19:12:47 +02:00
Christoffer Lerno
49c4595457
Dynamic protocols.
2023-10-05 15:20:41 +02:00
Christoffer Lerno
4cc30c0d33
Replace static initializer with @init / @finalizer
2023-10-03 12:45:43 +02:00
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