git.delta.rocks / jrsonnet / refs/commits / 16d0d0ea3d7b

difftreelog

fix object iteration in comps

xwwykrnwYaroslav Bolyukin2026-05-08parent: #341222d.patch.diff
in: master

1 file changed

modifiedcrates/jrsonnet-evaluator/src/evaluate/compspec.rsdiffbeforeafterboth
177 // specs, allocate one Iter A-frame per for-spec and re-set the slot177 // specs, allocate one Iter A-frame per for-spec and re-set the slot
178 // per iteration as long as the frame's refcount stays at 1.178 // per iteration as long as the frame's refcount stays at 1.
179 'eager: {179 'eager: {
180 if !comp.compspecs.iter().all(|c| {
181 matches!(
182 c,
183 LCompSpec::If(_)
184 | LCompSpec::For {
185 destruct: LDestruct::Full(_),
186 ..
187 }
188 )
189 }) {
190 break 'eager;
191 }
180 let mut out = Vec::new();192 let mut out = Vec::new();
181
182 if comp.compspecs.iter().all(|c| {193 if evaluate_compspecs_eager(
183 matches!(
184 c,
185 LCompSpec::If(_)
186 | LCompSpec::For {
187 destruct: LDestruct::Full(_),
188 ..
189 }
190 )
191 }) && evaluate_compspecs_eager(
192 ctx.clone(),194 ctx.clone(),
193 &comp.compspecs,195 &comp.compspecs,
194 &cached_overs,196 &cached_overs,