Bit 0.38.0
Bit 0.38.0
Breaking changes
- A module's startup-initializer failure message names the module-relative file:
error: module <path> failed to start: <message> (<path>/<file>:<line>), with.as the path of the root module. It named the absolute host path before, so the shipped compiler binary no longer embeds the build machine's stdlib path, and the three release binaries rebuild byte for byte from the tag.
Highlights
umulHi(a: u64, b: u64): u64is the high 64 bits of the 128-bit product: one instruction (UMULHon arm64, one-operandMULon x86-64), no call, no allocation, legal in@nosplit.std/mathgainsmul64(a, b): (u64, u64), the full(hi, lo)product, which compiles to onemulon x86-64 besidea * bon the same operands.std/crypto: an RSA-2048 PKCS#1 v1.5 signature allocates 21.1 KB, from 18.4 MB. Ed25519 sign allocates 12769 B and verify 14353 B per call, from 6.04 MB and 6.30 MB. Modular exponentiation is a 4-bit fixed-window constant-time Montgomery loop of about 1.25 multiplies per exponent bit.std/smtp: delivery status notifications (RFC 3461) throughDsn,NotifyandRetonMessage.dsnandEnvelope.dsn, sent only when the server advertisedDSN;Client.authMechanisms()lists the server's AUTH mechanisms.std/net: IDNA status, mapping, Bidi and joining data are one two-stage table of 8-byte records instead of hex tables binary-searched per probe; an ASCII label is checked in place.- x86-64:
x + kandx - kinto another register is onelea. The compiler built for x86-64 Linux goes from 7931mov+addpairs to 0 and has 8080 fewer instructions. - Optimizer: a fallible callee whose error is a return word is inlined; a join's edges are threaded past a compare its arguments already decide;
xs[i] = vinto a narrow[]i8,[]i16,[]i32,[]u16,[]u32or[]boolis inline instead of a runtime call; slice header loads survive element stores (fe25519MulCoreon arm64: 569 to 498 instructions). - Packages:
pkg/authhas the Have I Been Pwned range check asPwnedPasswords;pkg/websessions carry an index andSessionStore.destroyIndexedrevokes by it;pkg/tomlparsesfixture.tomlat 290.4 objects/KB, from 355.8.
Compiler
- x64: one mul for umulHi(a, b) beside a * b on the same operands (652c1f9)
- optinline: admit a fallible callee whose error is a return word (62849a9)
- opt: thread a join's edges past a compare its arguments already decide (e624f1b)
- codegen: branch past argument-free jump-only blocks (48a568e)
- x64: add of a constant into another register is one lea (75b972a)
- Inline xs[i] = v for word-strided narrow Int elements (cff7e63)
- CSE slice header loads across element stores; skip the null guard behind a bounds test (ba48e3b)
- x64: one mul for umulHi(a, b) beside a * b on the same operands (4e43ee5)
- x64: add of a constant into another register is one lea (047f3b8)
- x64: a spilled param read right after the entry binding uses its incoming register (95b0d44)
- x64: selfcheck the entry-binding register forwarding and its refusals (940616e)
- jumpchain: forward through a block whose params are bound on the edge into it (910f80b)
- codegen: branch past forwarders whose jump arguments are already in place (cd9ff82)
- x64: sub of a constant into another register is one lea (a2307cc)
- x64: refuse the argument-register forward at a safepoint or asm position (ce07c71)
Standard library
- crypto: Ed25519 sign and verify on preallocated field elements (f811601)
- std/crypto: RSA private op and modexp on a fixed-width Montgomery workspace (6c422f2)
- std/crypto: R^2 in five squarings after ~k doublings; skip the reduce for an in-range public base (982dd97)
- std/crypto: 4-bit fixed-window constant-time Montgomery exponentiation (874cb70)
- crypto: Ed25519 sign and verify on preallocated field elements (1592f31)
- std/net gen_idna: one two-stage table of 8-byte records instead of hex tables searched per probe (100479a)
- std/net idna: check an ASCII label in place and decode a label's runes in one allocation (b5ddd17)
- std/smtp: delivery status notifications (RFC 3461): Envelope.dsn with NOTIFY, RET, ENVID, ORCPT (d3e7728)
- std/smtp: Dsn.notify is a list of Notify, and Message carries a dsn (3152b4f)
Tests
- Add umulHi builtin and std/math mul64; field25519 multiply on 128-bit products (51c9c4d)
- Add umulHi builtin and std/math mul64; field25519 multiply on 128-bit products (a160d71)
- optstrbox: follow call words through block params and passthrough args (35edd86)
- gcretention: re-derive the builder_min512 pin after the 0.37.0 stage0 repin (3076646)
- golden census: dRun 645, re-derived off disk after merging into (47c32d5)
- golden census: 644 run cases after merging main into task-7182 (8ae0297)
- optstrbox: reuse a box whose word 2 is a box of the same words (5867a63)
- optstrbox: ask every method a call_iface can land on before refusing its re-box (868faaa)
- optstrbox, optinlinecost: price the return reuse diamond as the ret it is (786e6c8)
- Startup-initializer failure message names the module-relative file, not the host path (1bc39fd)
- optstrbox: move the call half of the reuse question into optstrboxcall.bit; golden census 645 (a4a7fbe)
- golden census: dRun 646, re-derived off disk after merging and (43c22d1)
- constimmfold: re-derive the x86-64 twoFolds pin for the lea form selects (e5f54ce)
Documentation
- auth: Have I Been Pwned range check as the built-in BreachCheck (7d5eed1)
- pkg/web: SessionStore index, destroyIndexed and Session.index (eb8d60f)
- pkg/toml: no KeyPath for an undotted key, no WTable or Option box per frame (5850498)
- authz: register
@tableclasses as resources by class name, the all marker, resourceRef, resourceByName, fieldType (38cf146) - pkg/mail: open(url, Options) with the SMTP transport: smtps://, smtp:// with required STARTTLS, ?tls=off (e203d0b)
Build and tooling
- Repin stage0 to v0.37.0 (5941c46)
- scripts: retire every declared oracle-lag signature at the 0.37.0 pin (295ab6c)
- tools/genunicode idnaemit: assert the out-of-range record is record 0 instead of discarding its index (c7e81bd)
Benchmarks
Artifacts
Published for aarch64-linux, aarch64-macos, x86_64-linux and x86_64-windows.
See dist/README.md for the full target table, the archive layout,
the required BIT_STDLIB/BIT_LIBBITRT environment, and the
SHA256SUMS format.
Verify a download before running it:
sha256sum --check --ignore-missing SHA256SUMS # shasum -a 256 on macOSFull commit log: v0.37.0..HEAD