compiler: codegen for RTS