Christoffer Lerno
1b6ec34c61
Refactor alignment code. Change deprecated function in test.
2024-09-12 08:30:01 +02:00
Christoffer Lerno
d4fb5b747b
Update QOI type names.
2024-09-07 16:10:15 +02:00
Hema2
7581651011
Add QOI to the standard library ( #1409 )
...
Add QOI to the standard library
2024-09-07 15:55:26 +02:00
Christoffer Lerno
ad0e97ab7b
Deprecated inline generic types, deprecated tuple / triple types.
2024-09-05 23:42:20 +02:00
Christoffer Lerno
ed5d338a39
Added new style named arguments.
2024-09-05 22:13:22 +02:00
Christoffer Lerno
a248511d7b
Added ElasticArray
2024-08-19 23:20:14 +02:00
Christoffer Lerno
6de17b9ae9
Fix use of deprecated function. Fix bug when compile time subtracting a distinct type. Fix test/benchmark debug info use.
2024-08-19 09:36:45 +02:00
Christoffer Lerno
edfea639cf
- Introduce $vaarg[...] syntax and deprecate the old $vaarg(...).
...
- Similar change to `$vasplat`: `$vasplat` and `$vasplat[1..]`.
2024-08-16 09:28:28 +02:00
Christoffer Lerno
3ccb4b9ec3
$exec may now provide a stdin parameter. Deprecated path.append, path.tappend, getcwd, tgetcwd, path.absolute, ls. Deprecated env::get_config_dir, replaced by env::new_get_config_dir. Added path.has_extension, path.new_append, path.temp_append, new_cwd, temp_cwd, path.new_absolute, new_ls, temp_ls. Added dstring.replace Updated win escapes for exec.
2024-08-15 00:31:47 +02:00
Christoffer Lerno
2706495668
Add temp allocator scribble. Make bufferstream safer.
2024-08-11 01:17:03 +02:00
Christoffer Lerno
224c3f4123
Printable values passed to the Formatter as pointers, will print as if passed by value. Pointers are rendered with "0x" prefix when passed to '%s'.
2024-08-11 00:27:06 +02:00
Christoffer Lerno
811cb2b95c
Add string methods to json, and fix issue in dstring when the formatter uses temp. Remove unnecessary use of temp allocator in to_format for json.
2024-08-10 19:13:58 +02:00
Christoffer Lerno
274e5280cb
Rename muldiv and update tests for LLVM 20
2024-08-09 23:56:26 +02:00
Samuel Goad
f85c4cd79f
Update string_iterator.c3 to include extra convenience methods ( #1327 )
...
Update string_iterator.c3 to include extra convenience methods
Added peek: returns the next character without incrementing current
Added has_next: checks if the iterator has another element
Added get: gets the current element (the same one that was returned with the previous call to next).
2024-08-09 23:10:46 +02:00
Lexi
696d39b922
Move safe_mul_div macro and make it generic on integer types ( #1334 )
...
Move safe_mul_div macro and make it generic on integer types
2024-08-09 22:54:26 +02:00
Christoffer Lerno
b83d388523
Incorrect justify formatting of integers.
2024-08-01 01:20:42 +02:00
Christoffer Lerno
e1565ccdc5
Regression: Invalid is_random implementation due to changes in 0.6.
2024-07-26 20:49:17 +02:00
Christoffer Lerno
b25c573ae3
Indexing into a constant array / struct now works at compile time. Constants defined by indexing into another constant could fail codegen. Stdlib nolibc code bugs fixed.
2024-07-20 01:20:03 +02:00
Christian Buttner
b18661a8b0
Make stdlib mem::allocator more complete. ( #1238 )
...
Make stdlib mem::allocator more complete. Fill in some gaps and docstrings. List.to_new_array. Handle overalignment smoothly in list.
2024-07-15 16:35:40 +02:00
Christoffer Lerno
bc0d52142a
Added pull request #1189 : Fix os::native_is_{file,dir} bug. Add tests.
2024-07-15 03:02:54 +02:00
Christoffer Lerno
24041ed80d
Macro $case statements now pick the first match and does not evaluate the rest. Added countingsort tests #1234 .
2024-07-15 02:01:26 +02:00
Alex Anderson
900c1152d3
add insertion sort ( #1225 )
2024-07-08 18:53:47 +02:00
Christoffer Lerno
3be1bf4384
Added test and updated releasenotes for formatter changes.
2024-07-02 23:28:23 +02:00
Christoffer Lerno
b0b885d506
Prevent Mach-O from removing @init and @dynamic in a more reliable way #1200 .
2024-06-15 15:58:12 +02:00
Christoffer Lerno
e293c435af
0.6.0: init_new/init_temp removed. LinkedList API rewritten. List "pop" and "remove" function now return Optionals. RingBuffer API rewritten. Allocator interface changed. Deprecated Allocator, DString and mem functions removed. "identity" functions are now constants for Matrix and Complex numbers. @default implementations for interfaces removed. any* => any, same for interfaces. Emit local/private globals as "private" in LLVM, following C "static". Updated enum syntax. Add support [rgba] properties in vectors. Improved checks of aliased "void". Subarray -> slice. Fix of llvm codegen enum check. Improved alignment handling. Add --output-dir #1155 . Removed List/Object append. GenericList renamed AnyList. Remove unused "unwrap". Fixes to cond. Optimize output in dead branches. Better checking of operator methods. Disallow any from implementing dynamic methods. Check for operator mismatch. Remove unnecessary bitfield. Remove numbering in --list* commands Old style enum declaration for params/type, but now the type is optional. Add note on #1086 . Allow making distinct types out of "void", "typeid", "anyfault" and faults. Remove system linker build options. "Try" expressions must be simple expressions. Add optimized build to Mac tests. Register int. assert(false) only allowed in unused branches or in tests. Compile time failed asserts is a compile time error. Remove current_block_is_target. Bug when assigning an optional from an optional. Remove unused emit_zstring. Simplify phi code. Remove unnecessary unreachable blocks and remove unnecessary current_block NULL assignments. Proper handling of '.' and Win32 '//server' paths. Add "no discard" to expression blocks with a return value. Detect "unsigned >= 0" as errors. Fix issue with distinct void as a member #1147 . Improve callstack debug information #1184 . Fix issue with absolute output-dir paths. Lambdas were not type checked thoroughly #1185 . Fix compilation warning #1187 . Request jump table using @jump for switches. Path normalization - fix possible null terminator out of bounds. Improved error messages on inlined macros.
...
Upgrade of mingw in CI. Fix problems using reflection on interface types #1203 . Improved debug information on defer. $foreach doesn't create an implicit syntactic scope.
Error if `@if` depends on `@if`. Updated Linux stacktrace. Fix of default argument stacktrace. Allow linking libraries directly by file path. Improve inlining warning messages. Added `index_of_char_from`. Compiler crash using enum nameof from different module #1205 . Removed unused fields in find_msvc. Use vswhere to find msvc. Update tests for LLVM 19
2024-06-12 10:14:26 +02:00
Christoffer Lerno
7ea3d230bb
0.5.5 features ( #1151 )
...
0.5.5 Disallow multiple `_` in a row in digits, e.g. `1__000`. #1138 . Fixed toposort example. Struct/union members now correctly rejects members without storage size #1147 . `math::pow` will now correctly promote integer arguments. `math::pow` will now correctly promote integer arguments. Added `new_aligned` and `alloc_aligned` functions to prevent accidental under-alignment when allocating simd. Pointer difference would fail where alignment != size (structs etc) #1150 . Add test that overalignment actually works for lists. Fixed array calculation for npot2 vectors. Use native aligned alloc on Windows and POSIX. Deprecates "offset". Simplification of the Allocator interface.
2024-02-22 17:13:51 +01:00
Christoffer Lerno
748c737e8f
0.5.4: Hash variables accept designated initializers. @safemacro overrides the need for @ in macro names. Fixes to macro context evaluation. Updated allocator api. Removed install_win_reqs.bat. Deterministic @init for MacOS. Fixed temp memory issue with formatter. Support LLVM 19. Add support to compare bitstructs using == and !=. Support Windows .def files. Removed invalid grammar from grammar.y. Support compile time folding of &|^~ for bitstructs. output project setting now respected. Fix issue where constants were not properly constant folded. Add temp_push/pop. Aliased declarations caused errors when used in initializers. Fix export output. Fix of const ternary #1118 . Fix of $$MODULE in nested macros #1117 . Fix debug info on globals. out now correctly detects subscript[] use #1116 . Lateral implicit imports removed. Default to '.' if no libdir is specified. Improved error messages for --lib. Fix raylib snake example. Overzealous local escape check corrected #1127 . Improved yacc grammar #1128 . --linker argument #1067 . Fixes to the matrix operations #1130 . Added GenericList.
2024-02-15 21:39:33 +01:00
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
e91f6e268e
0.5.2: Allow trailing comma in calls and parameter declarations #1092 . Fixes issue where single character filenames like 'a.c3' would be rejected. Improve error messages for incorrect user defined foreach. Fix bug with generics in generics. Fix to error with modified vector parameters. Crash with lhs vector inference. Fixes to priority queue.
2023-12-23 23:15:51 +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
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
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
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
a1bce81ed0
Fix growable bitset ( #1032 )
2023-10-06 01:27:32 +02:00
Christoffer Lerno
dad21bfc6f
See if we can get better errors.
2023-10-05 20:35:40 +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
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
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
Dmitry Atamanov
d6e9985a26
Add log(x, base) function to std::math module.
2023-09-15 09:22:34 +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
d67e846712
Remove cast from void! to anyfault. Rename @catchof to @catch
2023-09-09 22:49:32 +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
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
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
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