added compile_exp and emit_vardecl_stream