about summary refs log tree commit diff
path: root/tvix/eval/src/opcode.rs
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2022-10-13T23·57-0700
committerAdam Joseph <adam@westernsemico.com>2022-10-14T09·18+0000
commit91ad5b825ba33d5dbb792d24073dbe77dbc62773 (patch)
tree0d7422f824bcc8bcd1b7e846e1b746fe8e6d65c1 /tvix/eval/src/opcode.rs
parentcbbe283b6fda93e86478c16ea295e13374eccd58 (diff)
refactor(tvix/eval): remove OpResolveWithOrUpvalue r/5128
The case branch in vm.rs for OpResolveWithOrUpvalue is
unreachable/deadcode.

I believe this opcode is unnecessary, since it should always be
statically detectable (at parse-time) whether a reference is to an
upvalue (i.e. enclosing binding); otherwise, and only then, is
with-resolution applicable.

Perhaps I've misunderstood how with-resolution works.  If so, please
explain it to me and -1/-2 this CL.

Signed-off-by: Adam Joseph <adam@westernsemico.com>
Change-Id: I4a90b9eb6cb3396df92a6a943d42ecc301871ba0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7009
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/opcode.rs')
-rw-r--r--tvix/eval/src/opcode.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/tvix/eval/src/opcode.rs b/tvix/eval/src/opcode.rs
index c44494d57aa9..fdc916ca7f79 100644
--- a/tvix/eval/src/opcode.rs
+++ b/tvix/eval/src/opcode.rs
@@ -100,7 +100,6 @@ pub enum OpCode {
     OpPushWith(StackIdx),
     OpPopWith,
     OpResolveWith,
-    OpResolveWithOrUpvalue(UpvalueIdx),
 
     // Lists
     OpList(Count),