Commit Graph

157 Commits

Author SHA1 Message Date
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
Christoffer Lerno
fc0cad2894 Remove abs from libc. Create abstract random. 2023-02-24 00:00:36 +01:00
Christoffer Lerno
a0a5c940f1 Add --strip-unused. 2023-02-16 22:11:42 +01:00
Christoffer Lerno
df77b692d6 Support "typedef" 2023-02-14 16:49:27 +01:00
Christoffer Lerno
5e457be605 Implement more @export / @private improvements. Make @private default… (#729) 2023-02-13 08:31:40 +01:00
Christoffer Lerno
1548cd06ef Enable local multi-declarations. Fix of builtin argument checking. Migrate to @noinit. 2023-02-11 02:03:02 +01:00
Christoffer Lerno
18de9a146b Fix copysign and make floatparse more strict. 2023-02-11 00:41:44 +01:00
Christoffer Lerno
74d868d113 Fix of bug in !floatval codegen. Added float parsing. 2023-02-10 22:17:55 +01:00
Christoffer Lerno
f313e90e28 Some work on headers. Fix unsigned negation on consts. 2023-02-09 09:15:51 +01:00
Christoffer Lerno
4a102698b2 Add tests to math and add info in readme how to contribute. 2023-02-05 14:30:06 +01:00
Christoffer Lerno
5a65a57e42 Catch macro infinite recursion. Fix of tan function. 2023-02-05 00:21:26 +01:00
Christoffer Lerno
38b44a7265 Fix of tan. 2023-02-04 23:32:17 +01:00
Christoffer Lerno
6b928c7a3d Add saturated math and expect macros. 2023-02-03 00:25:29 +01:00
Christoffer Lerno
6407eb47a4 Remove of @extname in stdlib. 2023-02-02 21:53:37 +01:00
Christoffer Lerno
3b3773663a Adding sincos / libc tan/tanf. 2023-02-02 19:29:29 +01:00
Christoffer Lerno
0f4d20f168 Fix issue with hex floats with f being assumed to be double. Added cos sincos sincosf pow2 pow2f to nolibc. 2023-02-02 13:20:52 +01:00
Kenta
f9b6f1da0e Update trig.c3
Add cosf
2023-02-01 16:42:16 +01:00
Christoffer Lerno
6a3219ad43 Make thread allocator take the thread allocator by default for allocating initial memory. Add some int128 methods. Fix attribute parsing. 2023-02-01 14:06:14 +01:00
Christoffer Lerno
f89bf9ea2f Update clamp. 2023-01-28 03:52:07 +01:00
Christoffer Lerno
1095f098ef Reduce formatter register formatter register type memory usage. 2023-01-28 01:23:15 +01:00