diff options
author | Vincent Ambo <mail@tazj.in> | 2022-09-24T13·00+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-29T11·47+0000 |
commit | d54aeb1f2055bdac05cb62ab30b6c63dc86a78e0 (patch) | |
tree | 225df28fca4e3ba540e1537cb7743135303d491e /tvix/eval/src/vm.rs | |
parent | 3f2160627895e7d1fe3236812b83bddc5d3049f5 (diff) |
chore(tvix/eval): remove existing nested key implementation r/4990
This implementation, which only ever worked for non-recursive attribute sets, is no longer needed and thus removed here. We have a new implementation of these nested keys coming up instead. Change-Id: I0c2875154026a4f5f6e0aa038e465f54444bf721 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6783 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r-- | tvix/eval/src/vm.rs | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index 547772b0fe9b..a71ab14c412c 100644 --- a/tvix/eval/src/vm.rs +++ b/tvix/eval/src/vm.rs @@ -308,7 +308,6 @@ impl<'o> VM<'o> { OpCode::OpFalse => self.push(Value::Bool(false)), OpCode::OpAttrs(Count(count)) => self.run_attrset(count)?, - OpCode::OpAttrPath(Count(count)) => self.run_attr_path(count)?, OpCode::OpAttrsUpdate => { let rhs = unwrap_or_clone_rc(fallible!(self, self.pop().to_attrs())); @@ -588,24 +587,6 @@ impl<'o> VM<'o> { } } - /// Construct runtime representation of an attr path (essentially - /// just a list of strings). - /// - /// The difference to the list construction operation is that this - /// forces all elements into strings, as attribute set keys are - /// required to be strict in Nix. - fn run_attr_path(&mut self, count: usize) -> EvalResult<()> { - debug_assert!(count > 1, "AttrPath needs at least two fragments"); - let mut path = Vec::with_capacity(count); - - for _ in 0..count { - path.push(fallible!(self, self.pop().to_str())); - } - - self.push(Value::AttrPath(path)); - Ok(()) - } - fn run_attrset(&mut self, count: usize) -> EvalResult<()> { let attrs = fallible!( self, @@ -736,8 +717,7 @@ impl<'o> VM<'o> { // If any of these internal values are encountered here a // critical error has happened (likely a compiler bug). - Value::AttrPath(_) - | Value::AttrNotFound + Value::AttrNotFound | Value::DynamicUpvalueMissing(_) | Value::Blueprint(_) | Value::DeferredUpvalue(_) => { |