Christoffer Lerno
869bcf8b2b
Removing use of $assignable and deprecate it. Fix regression for stacktraces on MacOS. Added readline_to_stream. Regression: Chaining an optional together with contracts could in some cases lose the optional.
2025-07-21 03:20:40 +02:00
Christoffer Lerno
908d705669
Removing use of $assignable and deprecate it.
2025-07-20 20:07:06 +02:00
Kiana
506e63284b
Tidy up path.c3 ( #2309 )
...
* Tidy up path.c3
2025-07-20 12:26:44 +02:00
Christian Buttner
cf913b41c6
Fix Formatter.print returning incorrect size ( #2306 )
...
* Fix `Formatter.print` returning incorrect size
2025-07-18 15:54:07 +02:00
Christoffer Lerno
adb3df05c6
Allow even smaller memory limits.
2025-07-18 10:54:03 +02:00
Christoffer Lerno
26d5cc694a
Formatting option "%h" now supports pointers.
2025-07-08 11:43:49 +02:00
Christoffer Lerno
1ab57ecf20
Improve contract for readline. #2280
2025-07-07 02:42:48 +02:00
Christoffer Lerno
fad87b294b
mkdir/rmdir would not work properly with substring paths on non-windows platforms.
2025-06-30 21:41:52 +02:00
Christoffer Lerno
13bb2b6690
Const Enums From / to ordinal using casts is back. Add "--use-old-enums", deprecating lookup.
2025-06-30 21:41:52 +02:00
Christoffer Lerno
9285dfefad
- $member.get supports bitstructs.
...
- $member.set for setting members without the *& trick.
- io::struct_to_format now supports bitstructs.
2025-06-29 01:19:09 +02:00
Christoffer Lerno
2afa544d7d
Correctly format '%c' when given a width. #2199
2025-06-15 02:27:36 +02:00
Christoffer Lerno
496d23e93f
Fix some @require comments.
2025-06-10 01:54:45 +02:00
Christoffer Lerno
7f85534414
- Implicitly convert from constant typeid to Type in $Type assignment, and $assignable.
...
- Make $Type parameters accept constant typeid values.
2025-06-05 00:37:16 +02:00
Christoffer Lerno
8b29e4780d
The %s would not properly print function pointers.
2025-04-25 11:26:28 +02:00
Boris Barbulovski
b5d0739de0
Add env::ANDROID to std.*
2025-04-16 17:47:49 +02:00
Christoffer Lerno
fa707db078
Do not implicitly convert enums to ordinal in formatting functions.
2025-03-25 12:27:51 +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
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
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
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
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
Christoffer Lerno
c0b80eccad
Change @return! syntax to require ":" after faults. Update all contracts to consistently use ":" before the description.
2025-03-05 17:11:45 +01:00
Christoffer Lerno
2439405e70
- $foreach "()" replaced by trailing ":" $foreach ($x, $y : $foo) -> $foreach $x, $y : $foo:
...
- `$for` "()" replaced by trailing ":" `$for (var $x = 0; $x < FOO; $x++)` -> `$for var $x = 0; $x < FOO; $x++:`
- `$switch` "()" replaced by trailing ":" `$switch ($Type)` -> `$switch $Type:`
- Empty `$switch` requires trailing ":" `$switch` -> `$switch:`
2025-03-04 16:13:47 +01:00
Christoffer Lerno
0925010c07
Removal of any-switches
2025-03-03 15:02:25 +01:00
Christoffer Lerno
c40198b016
- new_* functions in general moved to version without new_ prefix.
...
- `string::new_from_*` changed to `string::from_*`.
- `String.to_utf16_copy` and related changed to `String.to_utf16`.
- `String.to_utf16_tcopy` and related changed to `String.to_temp_utf16`
- `mem::temp_new` changed to `mem::tnew`.
- `mem::temp_alloc` and related changed to `mem::talloc`.
- `mem::temp_new_array` changed to `mem::temp_array`.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
222bfb158b
Remove deprecated functions.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
2a895ec7be
First 0.7 update, removing all deprecated features.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
33b05bcfeb
More deprecations in lib6, and updates to lib7
2025-02-27 11:10:41 +01:00
Christoffer Lerno
3da9f73338
- Output into /.build/obj/<platform> by default.
...
- Output llvm/asm into llvm/<platform> and asm/<platform> by default.
- Don't delete .o files not produced by the compiler.
- Correctly handle in/out when interacting with inout.
2025-02-22 22:34:26 +01:00
Alex Veden
5046608d1f
added io::stdout().flush() - to force printing test name before possible deadlock
...
mem::scoped() and long jump resilience fixed #1963
fixed --test-nosort argument + extra test for teardown_fn memory leak
Some renaming. Simplify robust test allocator handling. Pop temp allocators in test runner.
`Thread` no longer allocates memory on posix.
Update unprintable struct output.
Correctly give an error if a character literal contains a line break.
2025-02-20 01:15:48 +01:00
Christoffer Lerno
d9e5926d57
Fix error when boolean combined with ??. First checkin of C3 tester (unfinished)
2025-02-19 01:02:58 +01:00
Christoffer Lerno
e77d1fb646
- Increase precedence of (Foo) { 1, 2 }
...
- Add `--enable-new-generics` to enable `Foo{int}` generic syntax.
2025-02-18 00:26:22 +01:00
Christoffer Lerno
8c58b31bbd
Remove <[]> experimental generic syntax.
2025-02-13 12:53:46 +01:00
Christoffer Lerno
4961d0433f
- Circumvent Aarch64 miscompilations of atomics.
...
- Fixes to ByteBuffer allocation/free.
- Fix issue where compiling both for asm and object file would corrupt the obj file output.
2025-02-12 12:50:30 +01:00
Christoffer Lerno
c4212c4649
- Test runner will also check for leaks.
...
- `write` of qoi would leak memory.
- Issue when having an empty `Path` or just "."
- `set_env` would leak memory.
2025-02-10 00:39:02 +01:00
Christoffer Lerno
e1d546225f
Update stdlib with new syntax for short function decl.
2025-02-08 23:04:59 +01:00
Christoffer Lerno
3c50376175
New test runner
2025-01-30 01:09:48 +01:00
Christoffer Lerno
9530fe8fcd
Fix regression for parsing types and switch to the "new" generic syntax that's being tested.
2025-01-26 22:51:27 +01:00
Christoffer Lerno
e40bab2d30
Allow (int[*]) { 1, 2 } cast style initialization. Experimental change from [*] to [?]. Fix issue where compile time declarations in expression list would not be handled properly.
2025-01-25 22:10:12 +01:00
Christoffer Lerno
c3f5806aa3
Const strings and bytes were not properly converted to compile time bools.
...
Contracts @require/@ensure are no longer treated as conditionals, but must be explicitly bool.
2025-01-18 23:24:55 +01:00
Christoffer Lerno
721aaa28aa
Added '%h' and '%H' for printing out binary data in hexadecimal using the formatter.
2025-01-16 01:06:57 +01:00
Christian Buttner
27970085e5
Fix formatter output length calculation.
2025-01-12 22:54:43 +01:00
Christoffer Lerno
8e0d6d11b9
Deprecated '&' macro arguments.
2025-01-08 22:13:49 +01:00
Christoffer Lerno
dad97fc2d9
Improved #foo resolution inside of the compiler.
...
Deprecation of several `&` macros.
2025-01-08 12:55:20 +01:00
Radek Micek
ece6efc75e
Fix fputc
2025-01-01 12:17:58 +01:00