ReadyTalk/avian — pull request #142 by joshuawarner32 (2013-12-19 17:05:48+00:00)
Title: Remove boilerplate in Compiler interface

Rather than have a gigantic Compiler interface with lots of boilerplate methods for emitting various different operations, let's have a small set of methods for general operation formats (nullary, unary, binary, and jump, currently), and use the existing operation enums in lir.h.

The naming scheme is currently a little awkward because Compiler::binaryOp (named for the number of arguments) actually accepts a TernaryOperation (named for the number of registers required), Compiler::unaryOp accepts a BinaryOperation and so-forth.

Two last, unrelated tidbits: I used the proposed clang-format style to shorten a few long lines in compile.cpp that were causing my editor to display a horizontal scroll bar (which is rather frustrating in my particular setup). Second, I moved the language-independent thunk implementations out of compile.cpp and into runtime.cpp, in codegen. This is basically all of the arithmetic thunks with the exception of ones that throw (div and rem), since I couldn't think of a good way to break that dependency. I have no issue pulling these latter two things out, if you want.