stage1 实现ir2vm 修复nob test命令的构建问题
This commit is contained in:
1 parent
87d9b7ea34
commit
a64a96f9a4
11 files changed
+1565
-195
No files matched your search
+17
-17
@@ -129,25 +129,25 @@ static int compile_spl(const char *src, const char *fname, const char *outpath,
|
||||
return 0;
|
||||
}
|
||||
|
||||
// spl_ir2vm_t ir2vm;
|
||||
// spl_ir2vm_init(&ir2vm, &a2ir.ir->ir, sema.type);
|
||||
// int rc = spl_ir2vm_run(&ir2vm);
|
||||
// if (rc != 0) {
|
||||
// printf("ir2vm error %d", rc);
|
||||
// return rc;
|
||||
// }
|
||||
// if (dump == DUMP_VM) {
|
||||
// spl_prog_dump(&ir2vm.prog);
|
||||
// // memory leak
|
||||
// return 0;
|
||||
// }
|
||||
spl_ir2vm_t ir2vm;
|
||||
spl_ir2vm_init(&ir2vm, &a2ir.ir->ir, sema.type);
|
||||
int rc = spl_ir2vm_run(&ir2vm);
|
||||
if (rc != 0) {
|
||||
printf("ir2vm error %d", rc);
|
||||
return rc;
|
||||
}
|
||||
if (dump == DUMP_VM) {
|
||||
spl_prog_dump(&ir2vm.prog);
|
||||
// memory leak
|
||||
return 0;
|
||||
}
|
||||
|
||||
// spl_prog_store_to_file(outpath, &ir2vm.prog);
|
||||
spl_prog_store_to_file(outpath, &ir2vm.prog);
|
||||
|
||||
// spl_ir2vm_drop(&ir2vm);
|
||||
// spl_ast2ir_drop(&a2ir);
|
||||
// spl_sema_drop(&sema);
|
||||
// spl_ast_drop(&ast);
|
||||
spl_ir2vm_drop(&ir2vm);
|
||||
spl_ast2ir_drop(&a2ir);
|
||||
spl_sema_drop(&sema);
|
||||
spl_ast_drop(&ast);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user