feat(tvix/eval): track span of first force in a thunk blackhole

This is step 1 towards being able to use all 4 spans that we know when
dealing with infinite recursion. It tracks the span at which the
force of a thunk was first requested when constructing a blackhole, so
that we can highlight the spans of the first and second forces.

These are actually the least relevant spans, but the easiest to put in
place, more coming soon.

Change-Id: I4c7e82f6211b98756439d4148a4191457cc46807
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8269
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Vincent Ambo 2023-03-13 00:30:27 +03:00 committed by clbot
parent 5095e4f269
commit 3fa6b13c1e
5 changed files with 48 additions and 17 deletions

View file

@ -483,7 +483,10 @@ impl<'o> VM<'o> {
let gen_span = frame.current_light_span();
self.push_call_frame(span, frame);
self.enqueue_generator("force", gen_span, |co| thunk.force(co));
self.enqueue_generator("force", gen_span.clone(), |co| {
thunk.force(co, gen_span)
});
return Ok(false);
}
}