clean up and pass symbol table to runtime.