feat: ref

This commit is contained in:
2025-05-11 00:32:44 +08:00
parent 561b9bf36a
commit f52687bc1e
5 changed files with 62 additions and 55 deletions

View File

@@ -1,3 +1,5 @@
use std::cell::OnceCell;
use crate::bytecode::*;
use crate::ir;
use crate::ty::internal::Const;
@@ -19,7 +21,7 @@ pub fn compile(downgraded: ir::Downgraded) -> Program {
.funcs
.into_iter()
.map(|func| Func {
env: None,
env: OnceCell::new(),
param: func.param.into(),
opcodes: Compiler::new().compile(*func.body),
})