refactor(tvix/eval): Drop LightSpan entirely

This was made unnecessary in c92d06271 (feat(tvix/eval): drop
LightSpan::Delayed, 2023-12-08) because it didn't improve benchmarks as
much as expected and has been vestigial since; this continues the
cleanup by just removing it altogether

Change-Id: I21ec7ae9b52a5cccd2092696a5a87f658194d672
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11949
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Aspen Smith 2024-07-04 13:42:50 -04:00 committed by clbot
parent 8e31088a01
commit 6037888e18
8 changed files with 109 additions and 175 deletions

View file

@ -29,7 +29,6 @@ use crate::chunk::Chunk;
use crate::errors::{CatchableErrorKind, Error, ErrorKind, EvalResult};
use crate::observer::CompilerObserver;
use crate::opcode::{CodeIdx, ConstantIdx, Count, JumpOffset, OpCode, UpvalueIdx};
use crate::spans::LightSpan;
use crate::spans::ToSpan;
use crate::value::{Closure, Formals, Lambda, NixAttrs, Thunk, Value};
use crate::warnings::{EvalWarning, WarningKind};
@ -1257,7 +1256,7 @@ impl Compiler<'_, '_> {
if lambda.upvalue_count == 0 {
self.emit_constant(
if is_suspended_thunk {
Value::Thunk(Thunk::new_suspended(lambda, LightSpan::new_actual(span)))
Value::Thunk(Thunk::new_suspended(lambda, span))
} else {
Value::Closure(Rc::new(Closure::new(lambda)))
},
@ -1565,10 +1564,7 @@ fn compile_src_builtin(
});
}
Ok(Value::Thunk(Thunk::new_suspended(
result.lambda,
LightSpan::Actual { span: file.span },
)))
Ok(Value::Thunk(Thunk::new_suspended(result.lambda, file.span)))
})))
}