In this series of posts, we write a bytecode compiler and a virtual machine for arithmetic in Haskell. We explore the following topics:
In this series of posts, we write a bytecode compiler and a virtual machine for arithmetic in Haskell. We explore the following topics:
Parsing arithmetic expressions to Abstract Syntax Trees (ASTs).
Compiling AST s to bytecode.
s to bytecode. Interpreting AST s.
s. Efficiently executing bytecode in a virtual machine (VM).
Disassembling bytecode and decompiling opcodes for debugging and testing.
Unit testing and property-based testing for our compiler and VM .
. Benchmarking our code to see how the different passes perform.
All the while keeping an eye on performance.
... continue reading