diff options
author | Vincent Ambo <mail@tazj.in> | 2022-09-01T16·02+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-07T20·04+0000 |
commit | c269b44f411cc19042cc5087d3e7404057195b27 (patch) | |
tree | fcea0e0a3acc766f760ffe6e06e593dbfeb40f92 /tvix/eval/src/compiler/scope.rs | |
parent | 3efed26940cf24676e6de9b329d24b2a555f2330 (diff) |
feat(tvix/eval): track source spans for upvalues r/4733
With this change, the upvalue data instructions used by finalisers for thunks and closures track the source span of the first identifier that created the upvalue (if the same value is closed over multiple times the upvalue will be reused, hence only the first one). To do this the upvalue struct used by the compiler's scope now carries an identifier node, which had to be threaded through quite a few places. Change-Id: I15a5fcb4c8abbd48544a2325f297a5ad14ec06ae Reviewed-on: https://cl.tvl.fyi/c/depot/+/6400 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/compiler/scope.rs')
-rw-r--r-- | tvix/eval/src/compiler/scope.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/compiler/scope.rs b/tvix/eval/src/compiler/scope.rs index 01e0801e65c6..7614fc2b2b11 100644 --- a/tvix/eval/src/compiler/scope.rs +++ b/tvix/eval/src/compiler/scope.rs @@ -94,6 +94,7 @@ pub enum UpvalueKind { #[derive(Clone, Debug)] pub struct Upvalue { pub kind: UpvalueKind, + pub node: rnix::ast::Ident, } /// Represents the index of a local in the scope's local array, which |