about summary refs log tree commit diff
path: root/tvix/eval
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2022-10-15T23·45-0700
committerclbot <clbot@tvl.fyi>2022-10-16T09·17+0000
commit96dcc5129788de960976f892b9f1a9ed216be363 (patch)
tree16e3f6917584fde9abf0ca830f467b63cc33d137 /tvix/eval
parent8cbf308be493b8bd0946e2d08b791233d5a5417b (diff)
refactor(tvix/eval) remove Value::DynamicUpvalueMissing r/5140
I believe this variant is left over from a previous implementation.
If not, please let me know.

Signed-off-by: Adam Joseph <adam@westernsemico.com>
Change-Id: I02a3bf2f63794d09e96a5a92a034c0ad3d1ff221
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7027
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval')
-rw-r--r--tvix/eval/src/value/mod.rs6
-rw-r--r--tvix/eval/src/vm.rs5
2 files changed, 1 insertions, 10 deletions
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs
index 175b33bfa2e8..9231e91bbe8b 100644
--- a/tvix/eval/src/value/mod.rs
+++ b/tvix/eval/src/value/mod.rs
@@ -44,7 +44,6 @@ pub enum Value {
     // are never returned to or created directly by users.
     Thunk(Thunk),
     AttrNotFound,
-    DynamicUpvalueMissing(NixString),
     Blueprint(Rc<Lambda>),
     DeferredUpvalue(StackIdx),
 }
@@ -240,7 +239,6 @@ impl Value {
             }),
 
             (Value::AttrNotFound, _)
-            | (Value::DynamicUpvalueMissing(_), _)
             | (Value::Blueprint(_), _)
             | (Value::DeferredUpvalue(_), _) => {
                 panic!("tvix bug: .coerce_to_string() called on internal value")
@@ -263,7 +261,6 @@ impl Value {
             // Internal types
             Value::Thunk(_)
             | Value::AttrNotFound
-            | Value::DynamicUpvalueMissing(_)
             | Value::Blueprint(_)
             | Value::DeferredUpvalue(_) => "internal",
         }
@@ -365,9 +362,6 @@ impl Display for Value {
             Value::AttrNotFound => f.write_str("internal[not found]"),
             Value::Blueprint(_) => f.write_str("internal[blueprint]"),
             Value::DeferredUpvalue(_) => f.write_str("internal[deferred_upvalue]"),
-            Value::DynamicUpvalueMissing(name) => {
-                write!(f, "internal[no_dyn_upvalue({name})]")
-            }
         }
     }
 }
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs
index 52de99f490ed..252635de56d0 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -836,10 +836,7 @@ impl<'o> VM<'o> {
 
             // If any of these internal values are encountered here a
             // critical error has happened (likely a compiler bug).
-            Value::AttrNotFound
-            | Value::DynamicUpvalueMissing(_)
-            | Value::Blueprint(_)
-            | Value::DeferredUpvalue(_) => {
+            Value::AttrNotFound | Value::Blueprint(_) | Value::DeferredUpvalue(_) => {
                 panic!("tvix bug: internal value left on stack: {:?}", value)
             }