Release 0.6.0
First release of 0.6
Changes / improvements
@default
implementations for interfaces removed.any*
=>any
, same for interfaces.- Private / local globals now have
internal
visibility in LLVM. - Updated enum syntax.
- 'rgba' also available for swizzling.
- The name "subarray" has been replaced by the more well known name "slice' across the codebase.
- Improved alignment handling.
- Add
--output-dir
to command line. #1155 - Allow making distinct types out of "void", "typeid", "anyfault" and faults.
- Removed
--system-linker
setting. - "Try" expressions may not be any binary or unary expressions. So for example
try foo() + 1
is disallowed. - Added
$$REGISTER_SIZE
for int register size. assert(false)
only allowed in unused branches or in tests. Compile time failed asserts is a compile time error.- Require expression blocks returning values to have the value used.
- Detect "unsigned >= 0" as errors.
- Improve callstack debug information #1184.
- Request jump table using @jump for switches.
- Improved inline debug information.
- Improved error messages on inlined macros.
- Introduce MSVC compatible SIMD ABI.
$foreach
doesn't create an implicit syntactic scope.- Error of
@if
depends on@if
- Support
defer (catch err)
- Added
print-input
command argument to print all files used for compilation - Allow recursive function definitions as long as they are pointers. #1182
- Default CPU to native if less than AVX, otherwise use AVX.
- Bounds checking on length for
foo[1:2]
slicing #1191. - Foreach uses non-wrapping add/dec.
Fixes
- Fixed issue in safe mode when converting enums.
- Better checking of operator methods.
- Bug when assigning an optional from an optional.
- Lambdas were not type checked thoroughly #1185.
- Fix problems using reflection on interface types #1203.
@param
with unnamed macro varargs could crash the compiler.- Compiler crash using enum nameof from different module #1205.
- Incorrect length passed to scratch buffer printf.
- Casting to a bitstruct would be allowed even if the type was the wrong size.
- Generic modules parameterized with constants would sometimes get the wrong parameterized module name causing conversion errors #1192.
- Duplicate emit of expressions on negation would incorrectly compile negated macros.
- Casting a slice address to its pointer type should not compile #1193.
- Union is not properly zero-initialized with designated initializer #1194.
- Compile time fmod evaluates to 0 #1195.
- Assertion failed when casting (unsigned) argument to enum #1196
- Correct debug info on parameters without storage.
- Fix location on foreach debug output.
- Compiler crash on designated initializer for structs with bitstruct.
Stdlib changes
- "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.
- Removed 'append' from Object and List, replaced by 'push'.
GenericList
renamedAnyList
.- Proper handling of '.' and Win32 '//server' paths.
- Path normalization - fix possible null terminator out of bounds.
- Add 'zstr' variants for
string::new_format
/string::tformat
. - Fix mutex and wait signatures for Win32.