stage1 - 全面重构 stage1 编译器架构:类型系统(arena + items)、IR 发射层(spl_emit.h/c)、统一所有 emit 调用点。

- 实现 as 类型转换运算符、修复 &&/|| 短路求值 bug。
- 在 splc1.spl 中实现 Vec/Map/Emit 基础库(~50 个方法)。
- 修复实例方法调用中 self 参数被错误丢弃的 bug。
This commit is contained in:
zzy
2026-07-20 20:53:41 +08:00
parent 21f35b30fa
commit 459b6188a9
17 changed files with 307 additions and 217 deletions

View File

@@ -4,7 +4,7 @@
* 验证点defer 语句、defer 块、多个 defer逆序执行
* 函数中 defer、块作用域 defer
*/
#[extern("vm")] fn vm_printf(fmt: *u8, ...) void;
@extern(vm) fn vm_printf(fmt: *u8, ...) void;
fn with_cleanup() void {
defer vm_printf(" inner defer\n");