stage1 重写进行代码设计并重构 提供diag替换老旧错误处理

This commit is contained in:
zzy committed 2026-09-16 15:21:59 +08:00
1 parent 7cbe2d2b9a
commit e4347cc3ea
14 files changed
+983 -526

No files matched your search

+3 -2
View File
@@ -1,6 +1,7 @@
#ifndef __SPL_IR2VM_H__
#define __SPL_IR2VM_H__
#include "spl_diag.h"
#include "spl_ir.h"
#include "spl_type.h"
@@ -13,7 +14,7 @@ typedef struct {
typedef VEC(spl_ir2vm_fdbg_t) spl_ir2vm_fdbg_vec_t;
typedef MAP(spl_ir_func_ref_t, isize) spl_extern_idx_map_t;
// MAP()
typedef struct {
const spl_ir_t *ir;
const spl_type_t *type;
@@ -21,7 +22,7 @@ typedef struct {
spl_extern_idx_map_t extern_native;
spl_prog_t prog;
// spl_ir2vm_fdbg_vec_t fdbg; /* ir2vm_run 后填充;splc0 -g 读取生成 debug 段 */
spl_diag_t *diag;
} spl_ir2vm_t;
void spl_ir2vm_init(spl_ir2vm_t *ctx, const spl_ir_t *ir, const spl_type_t *type,