Compiler Changes
- Removal of the old backend which manually produced
.llfiles and passed them to the LLVM binaries directly- Removes need for
llcandoptbinaries
- Removes need for
- LLVM C API based backed as the main backend for all platforms and targets
- Removes need for
-llvm-api
- Removes need for
- Full debug symbols support for Windows (*nix is still experimental)
- M1 ARM64/AARCH64 Support
-target:darwin_arm64 -strict-stylestyle as default- New Versioning System
dev-yyyy-mm:sha - New flags
-build-modemodes:llvm-irassembly
-o:<string>flag as an alternative to-opt:<integer>- Accepted values:
mininal,size,speed
- Accepted values:
-vet-extrafor extra vet checks (many usually false positives)-microarch:<string>-disallow-do-default-to-nil-allocator
ODIN_ROOTenvironment variable to be able to change the root directory for the Odin root pathodin test- build ands runs procedures with the attribute
@(test)in the initial package
- build ands runs procedures with the attribute
odin doc- generate documentation from a .odin file, or directory of .odin files
-doc-formatGenerates documentation as the .odin-doc format (useful for external tooling)
- Improvements to
-vet - Many bug fixes
Language Changes
- Ability to iterate on
#soatypes with afor-inloop soa_zip(generate #soa type from slices)soa_unzip(generate slices from #soa type)make_soaanddelete_soa- Allocator procedure signature change to support return a
[]byteandAllocator_Errorcode - Removal of
intrinsics.x86_mmx - Remove
#opaquetypes - Remove
bit_fieldtypes- Prefer
bits.bitfield_extractandbits.bitfield_insertprocedures located incore:math/bits
- Prefer
- Replace
inlineandno_inlinewith#force_inlineand#force_no_inline, respectively - Improved
#optional_oklogic - New procedure attributes:
@(disabled=<boolean>)@(cold)@(optimization_mode=<string>)
f16,f16le,f16betypes- Removal of "pure" calling convention
- Addition of "naked" calling convention (removes prologue and epilogue)
min(T)/max(T)support whereTis a float- Make any
structcomparable as long as all of its fields are comparable - Make any comparable type a valid
mapkey type //+build ignoretag- Useful for examples within a
package
- Useful for examples within a
Core Library Changes
New Packages
core:bufiocore:bytescore:c/frontend/tokenizercore:c/frontend/preprocessorcore:compresscore:compress/gzipcore:compress/zlibcore:imagecore:image/pngcore:iocore:math/fixedcore:path(URI-like paths)core:path/filepath(OS paths)core:slicecore:sortcore:text/scanner
Experimental Packages
core:sync/sync2(will replacecore:syncwhen finished)
New Additions to package intrinsics
volatile_loadvolatile_storedebug_traptrapallocacpu_relaxread_cycle_countercount_onescount_zeroscount_trailing_zeroscount_leading_zerosreverse_bitsbyte_swapoverflow_addoverflow_suboverflow_mulexpecttype_has_fieldtype_proc_parameter_counttype_proc_return_counttype_proc_parameter_typetype_proc_return_typetype_polymorphic_record_parameter_counttype_polymorphic_record_parameter_valuetype_field_index_oftype_equal_proctype_hasher_proc