Skip to content

0.7.5

Choose a tag to compare

@xTrayambak xTrayambak released this 31 Jul 06:13
· 213 commits to master since this release

We began as wanderers, and we are wanderers still.

Bali 0.7.5 is a new release with about 47 commits in total, spanning over 3 weeks. It touches several parts of the engine, but most notably: It introduces a new midtier JIT compiler for x86-64, called Madhyasthal

Additions

Madhyasthal, a new JIT tier

To overcome the limitations of the baseline JIT compiler, a new middle tier compiler has been implemented, known as Madhyasthal.

It uses its own in-memory two-address-code IR format so that it can handle optimizations properly.

Its implementation has required a lot of plumbing work across the entire VM, including work for a tiering mechanism and function promotion.

It currently ships with a single optimization: naive dead code elimination.

ECMAScript

  • Implemented String.prototype.substring()

Fixes

  • The baseline JIT now falls back to the VM when it sees comparison operations
  • Fixed a codegen bug where LesserThan binary ops would not generate LTI
  • Fixed a crash in the traceback output renderer
  • A compiler's constant pool now correctly releases its memory when it is no longer needed
  • Properly fixed the return-value-leakage codegen bugs without breaking other programs, finally.
  • The VM now profiles functions to determine compilation eligibility instead of eagerly compiling them.
  • The baseline JIT no longer spits out incomplete files at <working dir>/bali-jit-fail.bin

Documentation

  • Added documentation for the interpreter and JIT tiers

Refactoring

Housekeeping

  • Collapsed the redundant runtime directory in the VM tree
  • The bytecode generation routines are now separated into a new component: "niche" (meaning down/low)
  • Removed unused dependencies, added proper constraints on some dependencies

VM

  • Removed several obsolete typed operations
  • The VM is now a dispatch-based interpreter, using a dispatch table instead of a massive switch case for its execution routine.