diff options
Diffstat (limited to 'tvix/eval/src/vm/generators.rs')
-rw-r--r-- | tvix/eval/src/vm/generators.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tvix/eval/src/vm/generators.rs b/tvix/eval/src/vm/generators.rs index 853ab063465f..b7d8f7aeb5c5 100644 --- a/tvix/eval/src/vm/generators.rs +++ b/tvix/eval/src/vm/generators.rs @@ -293,7 +293,9 @@ impl<'o> VM<'o> { // back to the outer VM loop. VMRequest::ForceValue(value) => { self.reenqueue_generator(name, span.clone(), generator); - self.enqueue_generator("force", span, |co| value.force(co)); + self.enqueue_generator("force", span.clone(), |co| { + value.force(co, span) + }); return Ok(false); } @@ -313,7 +315,9 @@ impl<'o> VM<'o> { self.reenqueue_generator(name, span.clone(), generator); let value = self.stack[self.with_stack[idx]].clone(); - self.enqueue_generator("force", span, |co| value.force(co)); + self.enqueue_generator("force", span.clone(), |co| { + value.force(co, span) + }); return Ok(false); } @@ -328,7 +332,9 @@ impl<'o> VM<'o> { .expect("Tvix bug: generator requested captured with-value, but there is no call frame"); let value = call_frame.upvalues.with_stack().unwrap()[idx].clone(); - self.enqueue_generator("force", span, |co| value.force(co)); + self.enqueue_generator("force", span.clone(), |co| { + value.force(co, span) + }); return Ok(false); } @@ -441,7 +447,9 @@ impl<'o> VM<'o> { "generator should be reenqueued with the same frame ID" ); - self.enqueue_generator("force", span, |co| value.force(co)); + self.enqueue_generator("force", span.clone(), |co| { + value.force(co, span) + }); return Ok(false); } |