Not sure why I made CompileLoc.file a DArray but there we go
Ported the funcstate (renamed FuncBuilder) part of the codegen, but don't know if it works yet as the codegen visitor hasn't been ported.