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
Christoffer Lerno
7f5757d66b
Add .dot to integer vectors.
2024-07-19 11:34:05 +02:00
Christoffer Lerno
91ad3ee0a2
Fix regression for math::log
2024-07-01 16:52:39 +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
cpiernikowski
18b4fce1ca
Change return type of next_bool(random) from void to bool
2024-03-28 09:44:47 +01: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
d5281b10dd
Cleanup use of macro inspection to use @typekind and @typeid macros.
2023-11-18 23:35:18 +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
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
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
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
Dmitry Atamanov
d6e9985a26
Add log(x, base) function to std::math module.
2023-09-15 09:22:34 +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
Christoffer Lerno
eac19814e1
Make typeid switches always use subtype matching. Update seeder mixing.
2023-08-29 22:48:26 +02:00
Pierre Curto
092296984a
std/math/random: add missing SimpleRandom.init() method
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-08-28 10:03:30 +02:00
Christoffer Lerno
190e1b19f1
Fix of next_short
2023-08-26 16:17:30 +02:00
Christoffer Lerno
b1f52cf8a9
Updated random interface further.
2023-08-26 13:22:02 +02:00
Christoffer Lerno
bea9ac010c
Updated random interface.
2023-08-26 12:58:57 +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
9b0da89a03
Added compare_to as a standard macro.
2023-08-17 10:13:00 +02:00
Christoffer Lerno
499c82b089
Updated indentation to C3 standard.
2023-07-26 14:01:24 +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
Dmitry Atamanov
49ea950f78
Add is_even and is_odd to math module
2023-07-19 11:38:49 +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
IgneousRed
943d010dfc
New Rngs ( #841 )
...
* New Rngs
* Mistake
* fix Mcg using wrong constant
2023-07-09 15:00:19 +02:00
Christoffer Lerno
4f7b42cdc4
New generic syntax and ad hoc invocation.
2023-07-06 23:43:36 +02:00
Christoffer Lerno
848a5212ef
Fixes #811 . Update some stdlib methods. Header printout correctly picks a name. #804
2023-07-03 13:17:43 +02:00
Tonis
eaf45436f8
Edit Matrix4 perspective fn
2023-07-02 20:02:59 +02:00
Christoffer Lerno
4c1edfb941
Dev ( #777 )
...
* The new @if directive.
2023-06-10 23:16:28 +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
Tonis
a877d4458c
Improve Matrix identity functions and add Quaternion to matrix function ( #765 )
...
* Edit matrix identity fn and add quaternion to matrix fn
* Change matrix identity macros to constants
---------
Co-authored-by: Tonis <tanton@paysure.solutions >
2023-05-16 11:50:01 +02:00
Christoffer Lerno
13f808b552
Added acos/asin(h) and atanh
2023-05-08 10:50:05 +02:00
Christoffer Lerno
172d561f07
Change syntax of $if, $assert, $include, $echo. Introduces $error
2023-05-06 12:18:00 +02:00
Christoffer Lerno
3dd6675e1b
Fixed const vector codegen. Missing math comparisons.
2023-05-06 02:29:26 +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
9c145996b0
$elif deprecated.
2023-03-20 16:54:45 +01:00
Christoffer Lerno
5ee0d52ff1
Deprecate :; in $if etc.
2023-03-20 01:03:54 +01:00
Christoffer Lerno
954521228e
Make casts explicit when casting to pointer offset. Better localization of error when narrowing fails. New printf formatting based on musl plus %a output.
2023-03-19 21:15:44 +01:00
Christoffer Lerno
9fa634b78b
is_finite / is_nan / is_inf, frexp native.
2023-03-18 21:17:18 +01:00
Christoffer Lerno
48a35b3277
Signbit, tests of frexp.
2023-03-18 19:13:17 +01:00
Christoffer Lerno
a041c53cdd
Add frexp.
2023-03-18 16:54:39 +01:00
Tonis
ff4c35fae1
Added Matrix identity macros and few matrix unit tests ( #742 )
...
* Add matrix identity macros
* Add matrix some matrix unit tests
---------
Co-authored-by: Tonis <tanton@paysure.solutions >
2023-03-05 20:39:55 +01:00
Christoffer Lerno
b9dbefbe1b
Fix bug when initializing nested struct / unions. Fix of mult of 2x2 matrix. Cleanup of cast.
2023-02-28 20:43:43 +01:00