Skip to content

Release 1.0.0b14

Pre-release
Pre-release

Choose a tag to compare

@jonathanhogg jonathanhogg released this 03 Jul 16:21
· 595 commits to main since this release
v1.0.0b14
6456b92

This release has the following changes from b13:

  • Reworked the AST to be a pure expression tree, removing the ugly special pleading done for Top and also:
    • removing Let and making InlineLet the only let (where is just syntactic sugar)
    • making Import introduce names into a sub-expression the same as let
    • ditching the StoreGlobal stuff in favour of a new Export mechanism that is injected into the last leaf of the AST via a parser rule matching EOF
    • extracting pragmas at parse time and storing them directly on the Program in the compiler
  • Tighter restrictions on module imports – no more access to state – which allows module exports to be cached so that they are only run once (unless the source file changes)
  • Addition of anonymous functions with new func(x) x*x syntax
  • Simpler for loops in the VM with the addition of tracking the number of bindings being done on each iteration in the LoopSource list; this allows ditching a few instructions from loops and dropping unnecessary operands from the loop instructions
  • A fix for a bug in simplifying on static state (it would collect old keys)

Plus it adds a heap more tests for the language in the form of unit/regression tests of the simplifier and compiler, and a bunch of integration tests of the language that test the interaction of the parser, simplifier, compiler and VM. Excitingly, these new tests unearthed a few significant bugs in the semantics and also shone a light on corners of the simplifier that could benefit from more work.

This release touches a lot of dangerous code in the language, but thanks to that mass of new tests I'm feeling pretty confident about it.