Skip to content

v0.45.0

Choose a tag to compare

@github-actions github-actions released this 06 Sep 20:12
· 40 commits to master since this release

A value that is made and used costs no memory

Every value the compiler made was written to a frame slot and read back out
of it. A value made and immediately used, which is most of them, cost a
store and a load that nothing between them could see. Measured on the
compiler compiling itself: 6646 loads and 6506 stores in 25330 instructions,
so more than half of what came out was that traffic.

A value that has just been made is now left in the accumulator and not
written down. If the next thing that happens is the read of it, the slot is
never touched at all. Anything else that wants the accumulator writes it
out first, and every place that leaves a block does the same before it goes.
The two operands of a binary form are read in the order that keeps the
second one where it already is, since the second is the one made last.

That is only sound where a value is read once. Every one of them is, at all
thirty places in the reader that make one, and the compiler says so rather
than hoping: a value read twice would be read out of a slot nothing ever
wrote, so it is a refusal at build time.

gslcelf 137461 -> 112087 octets glyphelf 195954 -> 150287
gslcarm 95080 -> 83344 glypharm 203525 -> 153947
gslcrv 114000 -> 100444 glyphrv 203794 -> 156058

All three still settle in three generations, the seed still writes the same
octets for a compiler that the compiler writes, and the front ends they
build are still octet for octet what layer 18 writes.

Full Changelog: v0.44.0...v0.45.0

LOC: 24006