refactor(tvix/eval): use light spans in builtins.import
Change-Id: I05732073155b430575babb6f076bf465aef98857 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7581 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
947a56c4b6
commit
edd13573f5
2 changed files with 8 additions and 12 deletions
|
|
@ -220,17 +220,17 @@ impl<'o> VM<'o> {
|
|||
self.chunk().get_span(self.frame().ip - 1)
|
||||
}
|
||||
|
||||
/// Returns the information needed to calculate the current span,
|
||||
/// but without performing that calculation.
|
||||
pub(crate) fn current_light_span(&self) -> LightSpan {
|
||||
LightSpan::new_delayed(self.frame().lambda.clone(), self.frame().ip - 1)
|
||||
}
|
||||
|
||||
/// Access the I/O handle used for filesystem access in this VM.
|
||||
pub(crate) fn io(&self) -> &Box<dyn EvalIO> {
|
||||
&self.io_handle
|
||||
}
|
||||
|
||||
/// Returns the information needed to calculate the current span,
|
||||
/// but without performing that calculation.
|
||||
fn current_light_span(&self) -> LightSpan {
|
||||
LightSpan::new_delayed(self.frame().lambda.clone(), self.frame().ip - 1)
|
||||
}
|
||||
|
||||
/// Construct an error from the given ErrorKind and the source
|
||||
/// span of the current instruction.
|
||||
pub fn error(&self, kind: ErrorKind) -> Error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue