Repository navigation
Tala 0.2.0
Compile times
- The frontend spends about half as long in garbage collection, with no more
memory.
Licensing
- Project files move to the Progmasoft Linking Exception, Version 2.0. Code talac
generates, TalaRT and the standard library no longer put any duty on a program
built with talac. Earlier releases can rely on Version 2.0 too.
Incremental builds
--incremental=<directory>keeps an object per source and lowers only the
sources whose code, or the signature of what they call, changed. The sources
that do change are lowered on several threads.
Linking
-
LLD's COFF, ELF and Mach-O linkers are linked into talac, which links
executables itself. A Windows executable needs nothing from the host, and
its import libraries are written by LLVM. For Linux, macOS and the BSDs
talac takes the command line of the linker fromclang -###, which knows
where the target's C library is, and runs it with LLD; withoutclang, a
target of the host is linked byccas before. Building talac needs LLD's
static libraries and headers: the LLVM release for Windows has them, the
Linux toolchain carries them from revision 2, and on macOS they are built
from the LLVM sources against Homebrew's LLVM, because Homebrew'slldhas
only shared libraries;LLD_ROOTnames them where they are not beside
LLVM. -
An executable is linked for its target rather than for the host: a Windows
executable for the machine of the target from any host, and another Linux,
macOS or BSD target throughclang --target=<triple>. The runtime of another
target is looked up inruntimes/<triple>/beside talac. -
--sysroot=<path>names the system root the linker driver links against
on Linux, macOS and the BSDs; it must be a directory. A Windows target
links no system library and refuses it, whatever the host. -
The Tala runtime is TalaRT:
talart.libandlibtalart.aas archives,
talart.dll,libtalart.soandlibtalart.dylibas shared libraries.
By default a program takes TalaRT from the shared library, which talac
copies beside it and which it finds there through its run path or the
Windows loader.--static-talart-library=truelinks the archive in
instead. -
A Windows executable defines
_fltuseditself, so code that uses floating
point links without TalaRT's archive.
Tests
- A class other than the entry may have a
Main: it is an ordinary method, and
no longer stops the build with TAL2008. A test build of a program with a
Maincompiles for the same reason. talac --testbuilds the runner of the[Fact]methods of its sources. The
runner calls every fact in source order, printsPASSorFAILwith the
name of each and the totals, and exits with1when a test failed.#expect condition;checks a condition in test code. A false one prints the
file, line and column and the text of the condition, and for a comparison
the value of each operand that is not a literal; the test goes on and fails
at its end. Each operand is evaluated once, for the comparison and the
report alike.#expectoutside a[Fact]method and outside#if Factis
an error (TAP0044), and so is#expectused as a value (TAP0055).[Fact]and[Fact("name")]mark a static, parameterlessvoidmethod as a
test (TAE0015toTAE0020for facts that cannot run).
Conditional directives
#if,#elseif,#elseand#endifchoose code for the target at the
boundaries of declarations, members and statements, withFact,os(...),
family(...),true,false,not,&&,||and parentheses. Talac
passes the target's operating system to the frontend.#regionand#endregion, with an optional name that the closing directive
may repeat.- A directive that would split an expression, an unknown system or family, a
misplaced#elseifor#elseand an unclosed group are errors (TAP0042
toTAP0052andTAP0054).#defineand its symbols and the diagnostic directives are
refused as not implemented yet (TAP0053,TAP0047).
Runtime
- The runtime catalog gains
tala_test_fail,tala_test_endand
tala_test_finish(identities 14 to 16), and the runtime exports
tala_test_status, which the process entry of a test build returns.
Optimization levels
--opt-level=sand-Osoptimize without growing the code, and
--opt-level=zand-Ozmake it as small as LLVM can. As in Clang, both
run the default pipeline over functions markedoptsize, andzalso
minsize.--opt-level=gruns the optimizations of level1, which keep a program
easy to debug, as Clang's-Ogdoes. It ran none before, like0.