Skip to content

sysl 0.12.1

Choose a tag to compare

@edadma edadma released this 21 Nov 12:10
· 192 commits to dev since this release

A patch release: building a large tree's tests is faster and holds less memory, with a new --build-jobs bound, regex search is faster, ScopedThread.join answers any value, and a generic's value parameters are checked as symbols in its own declaration. Two changes alter what compiles; they are listed first.

Install

brew install sysl-lang/tap/sysl

or download sysl-0.12.1-darwin-arm64.tar.gz below and put its bin/ on your PATH; the compiler finds share/sysl/library beside itself.

Behaviour changes

  • ScopedThread.join answers any value. 0.12.0 refused a scoped thread whose closure answered a value that is not Share (a string, a Buf, a &T, a struct or Option holding one). Such an answer is now moved out by the first join, since the ended thread's slot is its one owner; joining the same handle a second time stops the program with a message. A Share answer joined twice answers the same value without waiting again.
  • A value parameter is a symbol inside its own declaration. Before, it stood at a value that took no part in type equality, so cast[const N: usize, const M: usize](b: Buf[N]) -> Buf[M] = b, and an uncalled -> Buf[N] = Buf[N + 1](...), compiled. Now Buf[N] and Buf[M] are two types there, and a value argument computed over the parameters is compared as a polynomial (N + M is M + N, 2 * N is N + N, an exact division by a constant cancels). A mismatch in a result, a local's declared type, an argument or a field is refused at the declaration, whether or not anything calls it, and the message says how the two forms differ. reference/generics.md has the rules and examples.

Improved

  • Building a large tree's tests is faster and holds less memory. The generated test dispatcher was one function with an arm per test (52,000 blocks for the compiler's own suite); its arms are now cut into functions of 256, spread across the codegen units. On the compiler's own test build the longest unit's clang goes from 205 s and 8.1 GB to 73 s and 4.4 GB. Measured with this release's compiler on that build (SYSL_NO_CACHE=1, every one of its 26,416 tests compiled in): the whole build takes 522 s, against 611 s on 0.12.0, and the clangs' whole phase takes 80 s. The largest process peaks at 9.5 GB resident (/usr/bin/time -l), and the compiler holds 4.8 GB as the clangs start.
  • sysl test --build-jobs <n>, or build_jobs in a manifest's test block, bounds how many of the test build's compiles run at once, separately from how many tests run at once. --build-jobs 1 compiles one piece after another, the slowest build that holds the least memory; --build-jobs 4 suits a 16 GB machine. Without either, the settled --jobs bounds the build as before. SYSL_TIMINGS=1 now reports the test build's phases.
  • Regex search skips positions where no match can begin. While no match is under way, a search steps over every character the pattern's first instructions refuse, and every start shares one unset capture array. regex-redux on a 5,000,000-line fasta goes from 56.7 s to 33.7 s with 2.2x less allocation; output is identical.

Fixed

  • A closure type error in a closure passed to a generic library function (spawn, Buf.map) is reported only at your line; the library's own line no longer earns a second, wrong error. An instantiation whose own type arguments were never worked out is the only one kept quiet, so a generic or a property whose result its body settles (= value, a some result) still reports that body's errors instead of reaching clang.

Known issues

  • TernDB's suite still has failures on this release; they are being investigated.

Tests

  • Full suite on the release tree (SYSL_DOCS=1, stage 2): 26404 passed, 4 failed, 5 ignored. All 4 came from one cause, the refused-closure fix above silencing a body that settles its own result. It was corrected, and the four files, three new neighbour tests, 17 generic, closure and inference test files and the pages reference/traits.md, reference/generics.md and library/threads.md then passed (388 tests and three docs sweeps, 0 failed). The stage-3 self check reports identical emit-llvm (2904905 lines).
  • --std: 2258 passed, 0 failed.
  • slate on the candidate: 2806 passed, 0 failed.