The Baseline Compiler
Bali's baseline compiler is a fairly naive, simple (~440 LoC) JIT compiler that directly translates the VM's bytecode structures to native x86-64 code.
It does not attempt to perform any optimizations, as its goal is to generate machine code with as low of a latency as possible. As such, the code generated by it tends to be of very poor quality.
Table of Contents
Function Compilation Eligibility
A function becomes eligible to be compiled by this tier when it occupies 25% of all the bytecode execution dispatches in the interpreter, after 50,000 total dispatches have been hit. If not, then the function continues to be executed by the interpreter (pulsar).
Optimizations
This tier is a 1:1 bytecode to machine code translator. It does not perform ANY optimizations, because the goal is for it to be as fast as possible.