fix: thunk & function

This commit is contained in:
2025-05-15 11:11:11 +08:00
parent bcb6c48cfa
commit 2293b9e2de
10 changed files with 76 additions and 112 deletions

View File

@@ -98,11 +98,17 @@ impl Compile for ir::Attrs {
comp.push(OpCode::AttrSet);
for stc in self.stcs {
stc.1.compile(comp);
if !self.rec {
comp.push(OpCode::CaptureEnv);
}
comp.push(OpCode::PushStaticAttr { name: stc.0 });
}
for dynamic in self.dyns {
dynamic.0.compile(comp);
dynamic.1.compile(comp);
if !self.rec {
comp.push(OpCode::CaptureEnv);
}
comp.push(OpCode::PushDynamicAttr)
}
if self.rec {