Documentation link
CHANGELOG
[Compiler]
- Generate temporary for array element access on value returned from a function, thus
array can be indexed directly without need of explicit local variable.
foo :: fn () []s32 {}
main :: fn () s32 {
i :: foo()[1];
return 0;
}
- Add #maybe_unused for enum and union type declarations.
- Allow #base on unions.
- Add support for arbitrary slices to be emitted as binary blobs into executable data segment in compile time.
- Fix implicit cast for child to base struct types.
- Add proper type propagation for volatile typed integer literals and related binary/unary operations.
- Disable error catch block on comptime functions.
- Add builtin 'IS_COMPTIME' which is true in scope of comptime functions.
- Add automatic enum type infer from usage. see: https://github.com/biscuitlang/bl/tree/master/docs/src/examples/enum_inferred_type.bl
- Add explicit comptime call. see: https://github.com/biscuitlang/bl/tree/master/docs/src/examples/comptime_call.bl
- Fix issues with scope layers in generated types with base types.
- Allow comptime external functions returning `type`. These are used only as compiler internals.
- Fix general issues with type back-propagation for untyped enums and compounds.
- Fix broken multi-return for comptime functions returning types which are not directly convertible to constants.
- Fix type naming. Use declaration name only for the top-level direct declarations.
- Fix missing scope layer on compound initializer designator resolve.
- Fix linking issues on MSVC 14.50.35717 where aggressive linking optimizations remove implicitly used built-in functions from C.
- Print VCToolsVersion used for compiler compilation.
- Build pipeline now use regular main function as an entry point.
- Fix volatile type propagation where explicit cast was required for non-s32 number literals in binop.
- Fix crash on missing declaration value.
- Complete revamp of static if implementation.
- Static if now does not introduce a new scope.
- Fixed issues when static if contains continue or break.
- Fix broken type checks on volatile int types.
- Add stdio source input support for the compiler.
- Add support for compiler intrinsic calls at compile-time.
- Improved documentation generator to support compile-time calls in function type argument list.
- Change auto cast precedence to match regular cast.
- Add `--warnings-as-errors` compiler flag to report all warnings as errors.
- Fix regression causing missing unused symbol reports.
- Revamp implementation of multi-value expressions.
- Add support for unroll multi-return value in assignment statement.
- Fix issues with multi-value declarations in global scope.
- Use regular C runtime to handle executable startup.
- Add support for clang address sanitizer on Linux and Mac.
- Fix hash table issues with reuse of deleted slots.
- RPATH is now listed first in a group when LD is called on Linux or Mac.
- LD is invoked with all dependencies in --start-group --end-group block on Linux.
- DLib now use correct dynamic runtime on Windows.
- Fix copying of system libraries to the output location in case no custom module directory was set on Windows.
- Add missing implementation for runtime compound value nested in another compound value.
[Modules]
memory:
- Add `join_slices` helper function.
- Add `Optional` value wrapper.
- Implement custom alignment handling for default allocator available now on Linux and Mac too.
debug:
- Extend `measure_elapsed_ms_end` to provide just elapsed time without any logs.
std/type_utils:
- Add various type-related utilities, mostly moved from global `a.bl` (see deprecated section).
- Add `get_struct_member_type` returning type of the struct member by providing index.
- Add `struct_members_to_enum` converting struct to enum.
experimantal/variant:
- Add experimental tagged union implementation as 'Variant' union wrapper.
std/print:
- Fix rounding of formatted floats.
- Fix issues with negative unsigned values being incorrectly converted to string when fmt is used for formatting.
- Fix union types being incorrectly printed as struct.
extra/glm:
- Add version of `abs` function for vectors.
- Add helpers for column extraction from `mat4`.
- Add `quat_slerp` function.
- Add `quat_to_yaw_pitch` function.
std/static_array:
- Add `sarray_push_all` function.
std/math:
- Add `sign` function.
std/sync:
- Add missing support for condition variable broadcast `condition_signal_all`.
std/static_array:
- Add `sarray_pop_first` and `sarray_erase_keep_order`.
std/array
- Add `make_temporary_array`.
std/string
- Add `str_chop_left` and `str_chop_right` functions.
- Add `str_set` function.
[Documentation]
- Add documentation for comptime call.
- Add documentation for static if.
[Deprecated]
`enum_count` - Use 'enum_variant_count' in 'std/type_utils' module.
`enum_variant_name` - Use 'enum_variant_name' in 'std/type_utils' module.
`enum_variant_value` - Use 'enum_variant_value' in 'std/type_utils' module.
`is_number` - Use 'is_number' in 'std/type_utils' module.
`is_real` - Use 'is_real' in 'std/type_utils' module.
`is_real_or_number` - Use 'is_real_or_number' in 'std/type_utils' module.
`is_signed_number` - Use 'is_signed_number' in 'std/type_utils' module.
`is_pointer` - Use 'is_pointer' in 'std/type_utils' module.
`is_function` - Use 'is_function' in 'std/type_utils' module.
`is_struct` - Use 'is_struct' in 'std/type_utils' module.
`typeid` - Use 'typeid' in 'std/type_utils' module.
`is_enum` - Use 'is_enum' in 'std/type_utils' module.
`number_type` - Use 'number_type' in 'std/type_utils' module.
`has_member` - Use 'has_member' in 'std/type_utils' module.
`has_member2` - Use 'has_member' in 'std/type_utils' module.
`struct_count` - Use 'struct_member_count' in 'std/type_utils' module.
`member_offset_bytes` - Use 'member_offset_bytes' in 'std/type_utils' module.
`member_offset_bytes_comptime` - Use 'member_offset_bytes' in 'std/type_utils' module.
`member_offset_bytes2` - Use 'member_offset_bytes' in 'std/type_utils' module.
`#build_entry` - Use regular main function instead.
`-silent-run` - Use '-run' instead in combination with '--no-warning'.
`--run-tests` - Use '-test'.
[MISC]
- Add gdb and lldb python pretty printers for some BL types.