A JIT Compiler in 380 Lines of Ruby
chris.wailes.name
chris.wailes.name
Original Post http://webcache.googleusercontent.com/search?q=cache:http://...
Chapter 1: The Lexer http://webcache.googleusercontent.com/search?q=cache:http://...
Chapter 2: The AST Nodes http://webcache.googleusercontent.com/search?q=cache:http://...
Chapter 3: The Parser http://webcache.googleusercontent.com/search?q=cache:http://...
Chapter 4: AST Translation http://webcache.googleusercontent.com/search?q=cache:http://...
Chapter 5: JIT Compilation http://webcache.googleusercontent.com/search?q=cache:http://...
Chapter 6: Adding Control Flow http://webcache.googleusercontent.com/search?q=cache:http://...
Chapter 7: Playtime http://webcache.googleusercontent.com/search?q=cache:http://...
Chapter 8: Mutable Variables http://webcache.googleusercontent.com/search?q=cache:http://...
Are the LLVM bindings for Ruby up-to-date? I thought about using them last night for a while, but ended up deciding to use peg to create a recursive descent parser for my language and am going to write some pretty generic code to do the AST myself. That way I can keep everything in C/C++.
I'm in the process of rewriting it to use peg though, as I was using a parser generator that is not open source, and it started to bug me that it wasn't.
I believe so; MacRuby is under pretty serious development by a team within Apple.
In hoc, you have control flows and can define your own functions. Unfortunately, hoc lost the battle to bc, that's why it's rarely known in the Unix community.