Christoffer Lerno
deb4cc7c4b
0.5.3: Single-module not respected. Fix issue with compiler defined types. Fix optimization levels for projects. Use GEP i8 on offsets. Optimize foreach on len 1 arrays. Move panic blocks last. Fix generic module wildcard imports. Deprecate init_temp / init_new. Fix issue with macro vaarg and untyped lists. Fix extern const globals.
2024-01-14 15:34:54 +01:00
Christoffer Lerno
1d61ace302
Do not link with debug libc on win32 when using cross compile libs. Add delete methods to dstring. Fixes to macOS aarch64 codegen. Use glibc backtrace when available. Add load_* methods to file. The cast (int[8])int_slice[:8] now works.
2023-12-08 18:59:57 +01:00
Christoffer Lerno
d5281b10dd
Cleanup use of macro inspection to use @typekind and @typeid macros.
2023-11-18 23:35:18 +01:00
Christoffer Lerno
ffb0021d04
Use backtrace on windows. Updated backtrace API
2023-11-17 00:36:42 +01:00
Christoffer Lerno
f39aa1a41e
Add location tracking for memory allocations.
2023-11-09 22:03:25 +01:00
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
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
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
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
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
49c4595457
Dynamic protocols.
2023-10-05 15:20:41 +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
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
9eef34049d
Remove vestiges of top down widening.
2023-09-19 09:45:56 +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
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
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
Pierre Curto
c0b109fbc1
#934 followup
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-24 18:10:18 +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
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
5b5bc7fdbb
Fix void[] -> char[] cast.
2023-08-07 20:58:20 +02:00
Christoffer Lerno
68aadc958f
Added read_any/write_any.
2023-08-07 19:55:10 +02:00
Pierre Curto
e4febe62ef
lib/std/io: make PathWalker return an optional
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-02 23:05:28 +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
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
Pierre Curto
d0fa473d61
lib/std/io: assert in Formatter.out_str on "Invalid enum" if an enum value is out of range ( #892 )
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-27 21:18:31 +02:00
Christoffer Lerno
499c82b089
Updated indentation to C3 standard.
2023-07-26 14:01:24 +02:00
Pierre Curto
59b077223b
use IoError.UNSUPPORTED_OPERATION instead of asserts; improve Path.walk
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-26 13:05:12 +02:00
Christoffer Lerno
3929e2057d
Change unreachable code to error. Remove unreachable where the compiler now can detect reachability.
2023-07-25 23:31:05 +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
Pierre Curto
3e78a70552
lib/std/io: replace IoError.FILE_EOF with IoError.EOF
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-25 11:32:47 +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
Pierre Curto
fd5336c56e
lib/std/io/stream: add LimitReader ( #858 )
...
* lib/std/io/stream: add LimitReader
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std: more method conversions to use new receiver notation
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-17 20:22:29 +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