Christoffer Lerno
63f619e5b6
Add tracking allocator to test runner. #1809
2025-02-09 03:10:35 +01:00
Christoffer Lerno
b941f93416
Deprecate old void! @benchmark and @test functions.
2025-01-09 20:33:53 +01:00
Tomas Kallup
ca88afbf5b
Fix hashmap put all for create + test case
...
Closes : #1695
2024-12-19 16:15:18 +01:00
Walther Chen
f39e339726
Fix error when HashMap.remove on uninitialized HashMap ( #1629 )
...
* HashMap: test removal on uninitialized
* HashMap.remove_entry_for_key: return false on unintialized
* test: switch to temp_init
* release note
2024-11-18 14:20:32 +01:00
Walther Chen
fd1898b70a
copy out keys also in HashMap.copy_keys ( #1569 )
...
* copy out keys also in HashMap.copy_keys
* test for copying keys out
2024-10-26 01:57:00 +02:00
Denis Palashevskii
217151be8d
fix int formatting in std::collections::object
2024-10-05 14:03:27 +02:00
Christoffer Lerno
ad0e97ab7b
Deprecated inline generic types, deprecated tuple / triple types.
2024-09-05 23:42:20 +02:00
Christoffer Lerno
a248511d7b
Added ElasticArray
2024-08-19 23:20:14 +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
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
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
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
Christoffer Lerno
a1ecf2211f
as_str() replaced by str_view()
2023-09-24 23:50:16 +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
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
Pierre Curto
cd950a0359
lib/std/collections: fix comments, List.remove_if() and List.retain_if() methods
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-31 23:20:50 +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
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
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
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
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
3e765a3f3e
Hash maps now copy keys if keys are copyable.
2023-08-10 21:14:24 +02:00
Christoffer Lerno
c4f8d5f25e
Update range.
2023-07-19 21:56:52 +02:00
Dmitry Atamanov
7fbedae604
Add has function to Range and ExclusiveRange.
2023-07-19 21:45:14 +02:00
Pierre Curto
491c5ceec5
support for List in quicksort; add HashMap.@each ( #861 )
...
* compiler: fix typo in error message about failed name resolution
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/sort: add List support to quicksort
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/collections: add HashMap.@each
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-18 12:18:12 +02:00
Pierre Curto
35bffdadc2
improve the sort and collections libs ( #853 )
...
* lib/std/sort: unify binarysearch and binarysearch_with; add comments to quicksort
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/collections: mark List.{len, is_empty, get} with @inline
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/collections: add PriorityQueueMax; add tests for PriorityQueue and PriorityQueueMax
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-15 19:08:54 +02:00
Pierre Curto
7dc1eab185
std/lib/collections: make List support the []= operator ( #831 )
...
* std/lib/collections: make List support the []= operator
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* std/lib/io: rename receiver to self
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-07 13:51:44 +02:00
Christoffer Lerno
4f7b42cdc4
New generic syntax and ad hoc invocation.
2023-07-06 23:43:36 +02:00
Christoffer Lerno
fc054dad81
Added some to_string.
2023-06-26 16:21:07 +02:00
Christoffer Lerno
83f8bbb91b
Update range to have exclusive and inclusive range.
2023-06-26 10:18:09 +02:00
Christoffer Lerno
8c73a450a1
Reduce memory consumtion. Add "range"
2023-06-25 21:39:53 +02:00
Christoffer Lerno
3e54d13b62
Prefer def
2023-06-02 20:08:45 +02:00
Christoffer Lerno
ddd0497922
Better lowering of distinct types. Noreturn function call expr recognized as a "jump" for escape analysis. Preferring "def" in libs. To upper / to lower for ascii. Initial dynlib support.
2023-05-21 21:41:01 +02:00
Christoffer Lerno
e8642d6797
Fixes to access grammar. "delete" => "remove"
2023-04-24 09:10:35 +02:00
Christoffer Lerno
8059dc1539
delete_if, retain_if, rindex_of, compact, compact_count added to List.
2023-04-21 14:45:25 +02:00
Christoffer Lerno
809321e20c
Updated grammar. Removal of elif. Removal of ':' ';' in some ct statements. Empty faults is now an error. Remove "define" for types. Remove "private". Better errors on incorrect bitstruct syntax. Introduction of wildcard type rather than optional wildcard. Removal of scaled vector type. mkdir and rmdir. Disallow define @Foo() = { @inline }. Add handling for @optreturn and change it to @return!. Restrict interface style functions. Updated x64 ABI. stdlib updates to string. Removed deprecated functions. Update how variadics are implemented. Extended error messages. x86 ABI fixes. Shift check fixes. '!' and '?' are flipped. No trailing ',' allowed in functions. Fix to string parsing. Allow l suffix. Simplifying flatpath. any replaces variant, anyfault replaces anyerr. Allow getting the underlying type of anyfault. De-duplicate string constants. Fix of readme. Extended list. Fix of "(MyEnum)x + 1". Clock and DateTime types. Fixes to array concat.
2023-04-21 10:56:39 +02:00
Christoffer Lerno
8b0df0ee11
try? / catch?
2023-03-17 22:49:48 +01:00
Christoffer Lerno
300f4d38ab
Addition of object type. Fixes to const union initialization.
2023-03-06 23:58:13 +01:00
Dmitry Atamanov
549e1b6029
Added std::collections::enummap.
2023-03-04 22:41:22 +01:00
Christoffer Lerno
df77b692d6
Support "typedef"
2023-02-14 16:49:27 +01:00
Christoffer Lerno
86e085e0c0
Move collection types. Improve linked list interface. Update map.destroy => map.free
2023-02-05 20:55:47 +01:00