Christian Buttner
0595270d9a
Fix mem::copy_inline compile.
2025-04-25 16:04:41 +02:00
Christoffer Lerno
8b47673524
Added Enum.lookup and Enum.lookup_field.
2025-04-25 14:44:00 +02:00
Christoffer Lerno
8b29e4780d
The %s would not properly print function pointers.
2025-04-25 11:26:28 +02:00
Christoffer Lerno
8a2907806b
Fixes to tclone and other temp allocations with overaligned data.
2025-04-20 21:30:36 +02:00
Christoffer Lerno
f778e75757
Added missing @clone_aligned and add checks to @tclone
2025-04-20 18:31:52 +02:00
joshringuk@gmail.com
434a0e8e4b
array contains
2025-04-18 18:15:01 +02:00
Christoffer Lerno
946c167bf1
Improve error for default args #2096 . Deprecated old inference with slice copy. Copying must now ensure a slicing operator at the end of the right hand side: foo[1..2] = bar[..] rather than the old foo[1..2] = bar. The old behaviour can be mostly retained with --use-old-slice-copy).
2025-04-18 17:19:04 +02:00
Boris Barbulovski
b5d0739de0
Add env::ANDROID to std.*
2025-04-16 17:47:49 +02:00
Christoffer Lerno
e7c9ec0938
Added comments.
2025-04-16 01:32:01 +02:00
Christoffer Lerno
d6fa9cd50b
Added some comments about the tracking allocator.
2025-04-15 16:03:12 +02:00
Christoffer Lerno
41e173d255
Added some comment about the temp allocator.
2025-04-15 15:53:11 +02:00
Christoffer Lerno
0a9bb2e8e0
Fix to simple a += b overload fallback. Renaming and reordering in the stdlib.
2025-04-15 12:01:58 +02:00
Christoffer Lerno
b64dcde21d
Make aliases able to use @deprecated. Prefer math::I and math::I_F for math::IMAGINARY and math::IMAGINARYF the latter is deprecated. Combination of += and [] overloads now properly handled in most cases.
2025-04-14 20:51:01 +02:00
Christoffer Lerno
eade5fa57a
Fix Windows sincos.
2025-04-14 03:36:03 +02:00
Christoffer Lerno
f85198e3ee
Added += and related as overloads. Updated tests and docs. Slice2 extracted to its own file.
2025-04-14 00:55:46 +02:00
Christoffer Lerno
dca805bd8a
Added tests to sincos. Correctly detect multiple overloads of the same type. Fix regression quaternion overload. Remove "1." style.
2025-04-13 15:46:27 +02:00
Christoffer Lerno
3888fcb182
- Add @operator_r and @operator_s attributes.
2025-04-13 13:43:03 +02:00
Christoffer Lerno
0f2d425297
Operator overloading for + - * / % & | ^ << >> ~ == !=
2025-04-11 18:46:22 +02:00
Christoffer Lerno
28fc03c376
Do not user finalizer with wasm
2025-04-08 00:03:35 +02:00
Christoffer Lerno
1290906d66
Setup temp allocator by default on Wasm
2025-04-07 23:35:38 +02:00
Christoffer Lerno
25d416aca1
Regression with invalid setup of the WASM temp allocator.
2025-04-07 21:58:21 +02:00
Christoffer Lerno
3cb5df5639
0.7 fixes. Improving the yacc grammar.
2025-04-04 18:14:16 +02:00
Christoffer Lerno
e828d9a05a
Fix stdlib naming.
2025-04-03 01:47:52 +02:00
Sander van den Bosch
561a683230
Added .hash() functions for vectors ( #2043 )
...
* Added .hash() functions for vectors
* Update test to a non-zero sized vector
* Changed vector hash functions to hash the underlying bytes in a char slice, the same approch is used for arrays
* Added test for hashed
* Updated formatting to be consistant with C3 code style
* Formatting, use "self"
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-31 16:33:48 +02:00
Christoffer Lerno
586d191585
Fix in stdlib and update readme.
2025-03-30 23:11:29 +02:00
Christoffer Lerno
5c46b0c2a0
Add @each_row for the csv module.
2025-03-26 18:19:19 +01:00
Christoffer Lerno
4538a1f50d
- Correctly errors when a generic module contains a self-generic type.
2025-03-26 18:04:00 +01:00
Christoffer Lerno
ff2809a3ac
Fix of regression in @assert_leak.
2025-03-25 22:11:47 +01:00
Maxime Beaudoin
a8554b4233
String.c3 function parameters ambiguous ( #2061 )
...
* Some tweaks. Fixes regression in `format`
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-25 14:25:23 +01:00
Christoffer Lerno
fa707db078
Do not implicitly convert enums to ordinal in formatting functions.
2025-03-25 12:27:51 +01:00
Christoffer Lerno
439349ceb8
Move dynamic dispatch lowering.
2025-03-25 00:20:01 +01:00
Christoffer Lerno
d760378b02
- Added @format attribute for compile time printf validation #2057 .
...
- Bug when printing a boolean value as an integer using printf.
2025-03-24 13:32:44 +01:00
Christoffer Lerno
82f1b543ed
&self not runtime null-checked in macro #1827 . Regression in temp allocators.
2025-03-23 22:50:09 +01:00
walther chen
b48588ca8f
improve error message for uninitialized temp allocator pool on new
...
threads
2025-03-23 22:15:42 +01:00
Christoffer Lerno
a03d821602
- Use @pool_init() to set up a temp pool on a thread. Only the main thread has implicit temp pool setup.
...
- `tmem` is now a variable.
2025-03-21 17:08:58 +01:00
Christoffer Lerno
207bcfea02
os::exit and os::fastexit added.
2025-03-20 13:36:59 +01:00
Christoffer Lerno
de74e97ab1
Fixes to temp allocator.
2025-03-18 19:58:16 +01:00
Christoffer Lerno
7e100472e7
- AnyList now also defaults to the temp allocator.
...
- `os::getcwd` and `os::get_home_dir` requires an explicit allocator.
- `file::load_new` and `file::load_path_new` removed.
2025-03-18 18:34:52 +01:00
Christoffer Lerno
72608ce01d
- Temp allocator now supports more than 2 in-flight stacks.
...
- Printing stacktrace uses its own temp allocator.
- `@pool` no longer takes an argument.
- `Allocator` interface removes `mark` and `reset`.
- DynamicArenaAllocator has changed init function.
- Added `BackedArenaAllocator` which is allocated to a fixed size, then allocates on the backing allocator and supports mark/reset.
2025-03-18 15:16:22 +01:00
Christoffer Lerno
425676a98d
Bug due to missing cast when doing $i[$x] = $z.
...
Added `math::iota`.
2025-03-16 10:58:13 +01:00
Christoffer Lerno
5c77c9a754
- Change distinct -> typedef.
...
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00
Christoffer Lerno
8b49e6c14d
Rename def to alias.
2025-03-13 11:22:27 +01:00
Christoffer Lerno
b8ae2b06d6
Rename @return! to @return?
2025-03-12 21:40:30 +01:00
Christoffer Lerno
25bccf4883
New faults and syntax ( #2034 )
...
- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
2025-03-10 00:11:35 +01:00
Boris Barbulovski
fefce25081
C3 Android logcat interface. ( #2030 )
...
* C3 Android logcat interface.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-09 15:52:24 +01:00
Boris Barbulovski
f21cc02320
Initial Android support. ( #2024 )
...
* Initial Android support.
* Add Android x86_64
* - Typo api_verion
- Typo in DEFAULT_TARGETS
- Removed unnecessary snprintf
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-08 23:38:52 +01:00
BWindey
1461414128
[TEST] Add unit tests for libc ( #1974 )
...
Some tests for libc + fixes
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-08 22:25:21 +01:00
m0tholith
dc8b35e62f
Added is_initalized function to list, linkedlist, and anylist types ( #2027 )
...
* Added `is_initalized` function to list, linkedlist, and anylist types
2025-03-08 21:49:17 +01:00
Christoffer Lerno
a088a5057a
Remove if (catch foo) { case ... } syntax.
2025-03-07 22:48:28 +01:00
Christoffer Lerno
facaa75083
Remove use of if-catch-case
2025-03-07 13:57:05 +01:00