implement primop (filter)

This commit is contained in:
2026-04-25 21:08:54 +08:00
parent 4f3cd0ef4c
commit 26717a8184
18 changed files with 560 additions and 129 deletions
+7 -2
View File
@@ -1,6 +1,6 @@
use fix_common::StringId;
use fix_error::Error;
use gc_arena::Gc;
use gc_arena::{Gc, RefLock};
use smallvec::SmallVec;
use crate::value::NixType;
@@ -298,7 +298,12 @@ impl<'gc> crate::Vm<'gc> {
for _ in 0..count {
items.push(reader.read_operand_data(ctx).resolve(mc, self));
}
let list = Gc::new(mc, List { inner: items });
let list = Gc::new(
mc,
List {
inner: RefLock::new(items),
},
);
self.push(Value::new_gc(list));
Step::Continue(())
}