Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1.52 KB

README.mdown

File metadata and controls

25 lines (18 loc) · 1.52 KB

Bootstrap compiler

Acute is bootstrapped so that we can write the language in ourself. While it's true, we could just use (Steve Dekorte's IoVM](http://iolanguage.com/) that was seen as less than ideal. No LLVM bindings exist presently, and while I did start writing some, it just seemed silly.

The truth of the matter is we can build an IoVM fairly easily, and as such, the cost/benefit of using someone elses VM versus building our own, is high. As such, the choice is clear. As an example, the core bootstrap written in Ruby is 150 lines of code. Yes, one hundred and fifty. That supports the entire object model including messages, closures, slots and objects.

We build the Ruby version to build the full IoVM. The full IoVM will be a binary which can be used to build another full IoVM which should generate the same code as the previous version. Thus, we can visualize this as a flow chart:

Ruby bootstrap -> Full IoVM | ---> Full IoVM | ---> Full IoVM

and so on. We need to make sure that we build a binary that is executable on your system so that we don't need another interpreter to run the full IoVM with.

So those are the goals of our bootstrapping process.

The result of the full vm compiling itself will be LLVM IR which will replace the bootstrap. You can find this generated code (if it exists at the time you read this) in the llvm subdirectory. For historical purposes, we'll leave the Ruby bootstrap kicking around in the rb directory.