HYDROGEN: Code generation
As promised, here is the first part of my series on HYDROGEN, where I will discuss code generation.
As promised, here is the first part of my series on HYDROGEN, where I will discuss code generation.
It's now quite commonplace to define virtual machines for "userland" code - the Java VM, the CLR, the Parrot virtual machine and 'hidden' VMs that underlie various programming language implementations such as CPython and Scheme 48.
However, it's more unusual to define a virtual machine for running an operating system kernel upon. Which is exactly what I set out to do with HYDROGEN, a kernel-level virtual machine for the ARGON project.
I came accross a copy of AI Memo 628, which describes the MIT CHAOS network. I love reading about old computer technology, since they come from a time where creativity was unbridled; nowadays, suggesting a new technology that isn't intimately compatible with The Legacy Systems is unwise, so we carry their mistakes onwards for ever more.
A lot of the core infrastructure in a computer system - such as memory management - is somewhat overlooked for opportunities to improve things, because a vicious circle of conservatism sets in: we tune memory manages for systems that work like POSIX, and then stick with systems that work like POSIX since the memory management is so well-tuned...
So I set myself the task of designing, from scratch, an approach to memory management that's appropriate to an event-driven system based around a purely functional language with mutation expressed via unique typing.
It's far from complete, but here's a brain dump: