stage1 重构代码 重构nob构建方式
This commit is contained in:
1 parent
3714c2d142
commit
4c0317fcb5
14 files changed
+4004
-2160
No files matched your search
+4
-1
@@ -223,6 +223,9 @@ typedef struct {
|
||||
usize frame_bytes;
|
||||
} frame_layout_t;
|
||||
|
||||
/* panic 数据区:fmt slice + msg slice,各 2 words(ptr + len)。 */
|
||||
enum { IR2VM_PANIC_WORDS = 4 };
|
||||
|
||||
/* 结果槽存标量;聚合/大对象额外分配一块数据区(data_off)。 */
|
||||
static usize node_data_size(spl_ir2vm_t *ctx, const spl_ir_func_t *f, const spl_ir_node_t *node) {
|
||||
switch (node->kind) {
|
||||
@@ -254,7 +257,7 @@ static usize node_data_size(spl_ir2vm_t *ctx, const spl_ir_func_t *f, const spl_
|
||||
return ir_type_size(ctx, node->mem_load.tid);
|
||||
return 0;
|
||||
case SPL_IR_DBG_PANIC:
|
||||
return sizeof(spl_vm_val_t) * 4; /* TODO: fmt slice + msg slice */
|
||||
return sizeof(spl_vm_val_t) * IR2VM_PANIC_WORDS;
|
||||
case SPL_IR_CONTROL_CALL:
|
||||
if (ir_is_aggregate(ctx, node->control_call.tid))
|
||||
return ir_type_size(ctx, node->control_call.tid);
|
||||
|
||||
Reference in new issue
Block a user