Releases: odin-lang/Odin
Releases · odin-lang/Odin
dev-2023-01
New Language Features
Compiler Improvements
- Improvements to multiple return values ABI for Odin calling conventions
- Improved internal thread pool implementation (ready for next month's release)
- Futex usage too
- Numerous bug and typo fixes
New Packages
core:text/match
Package Improvements
- Make
synccallscontextlesswhere possible - Add different variants for
sync.once_do - Make
os.get_last_errorcontextless - Numerous fixes to
core:fmt
dev-2022-12
New Language Features
- New
map: High performance, cache-friendly, open-addressed Robin Hood hashing hash map data structure with various optimizations for Odin- PR #2181
- Smaller internal data structure than previously (4 pointers down from 7 pointers)
- SOA based memory layout
- Up to 4x-6x faster insertion and lookup on average
- Entries are stored in non-contiguous cell-layout which means no element straddles across a cache line
- Only one allocation per map rather than two (previously hashes and entries)
- Only requires
alloc_non_zeroedandfreeinternally
- Only requires
- Robin Hood hashing
- Smaller header information (
runtime.Map_Info) for dynamic calls. - Allows for calling
delete_keywhilst iterating across the map
Compiler Improvements
- Add debug symbols for global constants for integers, booleans, enums, runes, and pointers
- Variables are namedspaced with
pkg::name, ornameif built-in (or the initial package for convenience)
- Variables are namedspaced with
- Improvements to debug information generation
-default-to-nil-allocatoralso enabled-no-dynamic-literals- Improvements to
intrinsics.ptr_subcode generation - Numerous bug fixes
New Packages
vendor:cgltf
Package Improvements
- Add
Allocator_Mode.Alloc_Non_Zeroed - DirectX packages to use
bit_setfor flags where possible instead of just anenum - Implement numerous
core:mathprocedures in native Odin - Add
math.pow10 - Add
strings.write_(f16|f32|f64) - Add
user_data: rawptrtofilepath.Walk_Proc
dev-2022-11
New Language Features
-
Compiler Improvements
- Make
raw_dataan intrinsic rather than a@(builtin)runtime procedure - Allow
transmuteto be constant for integers of the same internal endianness - Throw type checker error when scalar cast to non-square matrix
- Fix
#defined(I) - Build script: Detect
whichand complain if not found - Add early LLVM > 14 detection, as LLVM 15 and above are not (yet) supported
- Remove previously deprecated
-optflag - Improve SysV ABI LLVM IR generation for development purposes
- Use direct parameter value in
lb_find_identwhen possible - Optimize
#caller_locationand#locationto use read only data section where possible - Ad-hoc pass source code location directly by pointer without stack copy
- Clarify
odin helpfor-define - Add
-minimum-os-versionfor Darwin targets, e.g.-minimum-os-version:12.0.0 - Add
-target-featuresflag to force extra LLVM options - Add safety check for #2161
New Packages
-
Package Improvements
- Update Darwin release map for
core:sys/info - Unify
Static_ArenaandGrowing_ArenaintoArena - Many improvements to
core:mem/virtualin general - Add and correct various Windows, Darwin, glfw, objC and other bindings
- Allow for
N = -1inwstring_to_utf8 - Add
core:math/rand.choice - Heavily improve time handling on Windows for
time.now()andos.File_Info
dev-2022-10
New Language Features
cap(Enum), equivalent tomax(Enum)-min(Enum)+1ODIN_BUILD_PROJECT_NAMEconstant//+build-project-namebuild directiveintrinsics.type_convert_variants_to_pointers- Add
helgrindandvalgrindsupport
Compiler Improvements
- Greatly improve error messages
- Preparations for Compiler Explorer support
- Use
uintinstead ofintto improve bounds checking code generation - Replace
#optional_secondwith#optional_allocator_error - Remove extra pointer indirection
- Make
intrinsics.count_{ones,zeros,trailing_zeros,leading_zeros}work at compile time - Improve
map - Improve parapoly support for ^T to [^]$V and vice versa
- Various bugfixes
- Simplify win32 resource file linking
- Add Windows 32-bit build system error
- Add
helpcommand, so you can now useodin help buildin addition toodin build -help - Improve macOS version detection for
odin report
New Packages
- Add
vendor:zlib - Begin work on
core:debug/peto parse PE files - Add
core:sys/infoto query CPU, GPU, RAM, etc.
Package Improvements
- Add system:legacy_stdio_definitions.lib to
core:c - Allow reading/writing files larger than
max(i32)on Darwin - Allow skipping unused fields in
core:encoding/json - Add parsing of +/-Inf and NaN to
core:strconv - Add additional win32 imports and constants
- Fix typo in
map_insert - Fix
libc.aligned_alloc - Add
slice.enumerated_array - Add serial comms support to
core:sys/windows - Add complex support to
core:libc - Correct json unmarshal of
maps - Fix Darwin libs for
vendor:stb/image - Added support for ID3D11InfoQueue to
vendor:directx - Improve
core:mem/virtualhandling of out of memory on Windows - Simplify
core:ioby removing different unnecessary types and calls - Add the builtin procedures
abs,clamp,min,maxtocore:mathas aliases
dev-2022-09
New Language Features
#soapointer type to ad with refactory to#soadata types- e.g.
#soa ^#soa[]T
- e.g.
New Compiler Features
- Make
unreachable()a built-in compiler-level procedure - Allow for
foo() or_else unreachable()or other diverging procedures
Compiler Improvements
#loadcan now optionally import the loaded file data as a different type than[]u8#load(path)#load(path, []T)(whereTis a type that can be trivially loaded from memory (i.e. no pointers))#load(path, string)(shorthand forstring(#load(path)))
- Deprecate
#load_or(path, default)in favour of#load(path) or_else default - Allow chaining of
#load(path1) or_else #load(path2) - Pass size information to allocator to
delete, when possible, to improve tracking information - Improved detection of rc.exe
- Improvements to debug symbols for range intervals
- Fix Objective-C related
x->y()calls in Odin - Prepare for future LLVM versions
- Various bugfixes
New Packages
vendor:commonmark- Markdown Variant: https://commonmark.org/
Package Improvements
core:image/tgacan now load as well- Add
math.divmodandmath.floor_divmod - Pretty marshal output for
core:encoding/json - Add ID3D11Debug to
vendor:directx/d3d11package - Add wgl, raw input, and additional Windows imports
- Add more
core:container/queuehelpers andpeek_frontandpeek_back - Add
reflect.get_union_variant - Add
slice.sort_with_indicesfamily of procedures - Improvements to
sync.Futexsupport on windows - Add
core:sys/valgrindpackage for valgrind, memcheck, and callgrind - Various bugfixes
dev-2022-08
New Language Features
None
New Compiler Features
#by_ptrprocedure attribute to enforce a parameter to be passed by pointer internally
Compiler Improvements
- Improved build scripts for *nix systems
- Improved error message when doing
^xinstead of&xfor addressable variables - Improved debug symbol generation
- Fix and improve
x->y()behaviour to minimize duplicate evaluation - Disallow
proc do stmtand only allowproc() { stmt }- This removed an ambiguity with parsing
- Fix minor issue with a lack of a trailing comma in parsing
structs without-vet - Numerous bug fixes
New Packages
None
Package Improvements
- Improvements to
strings.Bufferrelated procedures - Update
vendor:raylibto support macos-arm64 - Minor improvements to mathematical procedures
- Minor clean up of the WASI API
- Simplify logic of
appendof zero sized elements
dev-2022-07
New Language Features
- Add builtin
shrinkfor dynamic maps and arrays
New Compiler Features
Compiler Improvements
- Fix
odin testrunner. - Use
memmoveif possible when emitting store over a certain size
New Packages
core:slice/heap- A max heap implementation
Package Improvements
- Tighter allocation of Arena allocator
- Remove
simd_rem; Disallowsimd_devfor integers - Remove
stringsdependency fromcore:sys/windows - Additional Win32 bindings
- Add new verbs and qualifiers to
core:fmt - Support utf-16 printing with
[]u16and[^]u16 - Add
strings.prefix_lengthandslice.prefix_length - Add
runtime.dll_forward_reasonfor Windows
dev-2022-06
New Language Features
-
Generic
#simdtype and intrinsics- Supports array programming semantics (operators)
- New generic intrinsics
- Platform specific intrinsics for the x86 family:
sse,sse2,sse41,sse42,ssse3cmpxchg16b,fxsr,lzcnt,pclmulqdq,popcnt,sha
- PR #1807
-
Merge functionality of
#maybewith standardunionfunctionalityMaybe :: union($T: typeid) {T}No need for#maybeany more
-
Deprecation of
a..brange syntax to prefera..=b
New Compiler Features
-
New intrinsics:
non_temporal_loadnon_temporal_storefused_mul_add
-
Generic
#simdintrinsics:simd_addsimd_subsimd_mulsimd_divsimd_shlsimd_shrsimd_shl_maskedsimd_shr_maskedsimd_add_satsimd_sub_satsimd_andsimd_orsimd_xorsimd_and_notsimd_negsimd_abssimd_minsimd_maxsimd_clampsimd_lanes_eqsimd_lanes_nesimd_lanes_ltsimd_lanes_lesimd_lanes_gtsimd_lanes_gesimd_extractsimd_replacesimd_reduce_add_orderedsimd_reduce_mul_orderedsimd_reduce_minsimd_reduce_maxsimd_reduce_andsimd_reduce_orsimd_reduce_xorsimd_shufflesimd_selectsimd_ceilsimd_floorsimd_truncsimd_nearestsimd_to_bitssimd_lanes_reversesimd_lanes_rotate_leftsimd_lanes_rotate_right
-
Platform specific intrinsics:
x86_cpuidx86_xgetbv
-
@(priority_index=<int>)forforeign import- Force certain things to be linked before others
- Required for the deterministic link order of foreign imports
Compiler Improvements
- Allow
transmuteon constant expressions - Heavily improved support for
js_wasm32target- Basic DOM UI procedures
- Event system including listeners
- Page Allocator
- Compiler flag error message improvements
- Improved ternary-if type inference
- Improved -vet shadowing with ternary-if expressions
- Allow
import _ "foo"to allow for@(init)procedures without producing an import name - Correct
@(require_results)on parapoly procedures
New Packages
core:simdcore:simd/x86core:encoding/endianvendor:ggpovendor:openexr
Package Improvements
- Unify
raw_dataincore:memwithcore:runtime- Make
raw_datareturn[^]Ttypes
- Make
core:imagegeneric interface improvementsimage.which- Generic loader
- Add
#optional_oktodynlib.symbol_address - Add
mem.DEFAULT_PAGE_SIZE - Add
rand.init_as_systemto allow for system-level based random number generation - Numerous minor fixes to
core:packages - Interface cleans up to numerous packages keeping platform specific code private
dev-2022-05
New Language Features
None
New Compiler Features
- New intrinsics:
intrinsics.type_is_multi_pointerintrinsics.type_field_type
Compiler Improvements
- Numerous bug fixes
- Refactored filename handling
- Error message if the output is a directory
- Packages are assumed to be directory-based unless
-fileis supplied
New Packages
- New builtin
container_of core:compress/shocoA short string (de)compressorcore:container/intrusive/listAn intrusive linked listcore:encoding/varintLEB128 encode and decodecore:encoding/xmlAn XML parsercore:image/netpbmA reader/writer for the NetPBM image formatscore:image/qoiA reader/writer for the QOI image formatcore:image/tgaA writer for a common subset of the TGA formatcore:text/i18nAn easy way to translate your software using GetText or Qt Linguist translations
Package Improvements
- Additional D3D and win32 bindings and constants
- Unified
SemaandAtomic_Semabehaviour - Fix quaternion implementation #1644
- Updated Vulkan generator and package
- Fixed static arena assertion fail #1740
core:container/lruReduce allocations, fixescore:encoding/jsonUnmarshal fixescore:hash/xxhashFixescore:path/filepathAdd file stem and long-extension procedurescore:sliceMore helperscore:stringsAdd Levenshtein distancecore:syncImprovementscore:threadNew thread pool implementationvendor:metalandvendor:darwinnumerous additions and fixes- Quicksort minor fix
dev-2022-04
New Language Features
- None
New Compiler Features
- Rework of the entire atomic intrinsics (similar to C11 in design)
Atomic_Memory_Orderenumatomic_type_is_lock_freeatomic_thread_fenceatomic_signal_fenceatomic_storeatomic_store_explicitatomic_loadatomic_load_explicitatomic_addatomic_add_explicitatomic_subatomic_sub_explicitatomic_andatomic_and_explicitatomic_nandatomic_nand_explicitatomic_oratomic_or_explicitatomic_xoratomic_xor_explicitatomic_exchangeatomic_exchange_explicitatomic_compare_exchange_strongatomic_compare_exchange_strong_explicitatomic_compare_exchange_weakatomic_compare_exchange_weak_explicit
union #shared_nil- This adds a feature to
unionwhich requires all the variants to have anilvalue and on assign to the union, checks whether that value isnilor not. If the value isnil, the union will benil(thus sharing thenilvalue)
- This adds a feature to
- Improved build script for the compiler
- Numerous bug fixes
Compiler Improvements
- Improve
-helpmessages for define/config
New Packages
- Completely redesigned
core:sync- Designed from the ground up with making the zero value useful (no need to initialize nor destroy values)
- Utilizes the abilities of modern OSes with native futex support
- Primitives:
MutexRW_MutexRecursive_MutexCondSemaFutex
- Extended:
Wait_GroupBarrierAuto_Reset_EventTicket_MutexBenaphoreRecursive_BenaphoreOnce
core:math/ease
Package Improvements
- Update Thread Pool in
core:thread - More additions to
core:sys/windows - Remove
#caller_locationfrom certain calls incore:container/small_array vendor:stb/easy_fontfixes/improvements- Update
mem.nil_allocatorto match the same implementation inruntime - Numerous improvements and additions to
core:strings - Add
nilcheck onast.walkincore:odin/ast - Numerous bug fixes