Upstream

I came across this comment in compiler.go

// FIXME create a compilation state, rather than storing in 'compiler'.

I decided I'd have a go at it. This pull request is the initial pass at it. Please comment if you had something else in mind, or intended to encapsulate things like appending to either of the slices as well. Or maybe there was more data that I missed that should have been part of the struct.