about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests/notyetpassing
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-12-12T05·17-0800
committerclbot <clbot@tvl.fyi>2023-12-12T14·55+0000
commit9792920f8cdec92aa2c650de8cfd0a85fa7dce52 (patch)
treebaa5eb473824dc67af8965ef7b7cd9d69f6231a3 /tvix/eval/src/tests/tvix_tests/notyetpassing
parente54eeda0ff4b777899491e2a753481e9c73af7df (diff)
fix(tvix/eval): fix branching on catchable defaults (b/343) r/7178
This commit adds Opcode::OpJumpIfCatchable, which can be inserted
ahead of most VM operations which expect a boolean on the stack, in
order to handle catchables in branching position properly.

Other than remembering to patch the jump, no other changes should be
required.

This commit also fixes b/343 by emitting this new opcode when
compiling if-then-else.  There are probably other places where we
need to do the same thing.

Change-Id: I48de3010014c0bbeba15d34fc0d4800e0bb5a1ef
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10288
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: Adam Joseph <adam@westernsemico.com>
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/notyetpassing')
-rw-r--r--tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.exp1
-rw-r--r--tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.nix1
2 files changed, 0 insertions, 2 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.exp b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.exp
deleted file mode 100644
index c508d5366f70..000000000000
--- a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.exp
+++ /dev/null
@@ -1 +0,0 @@
-false
diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.nix b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.nix
deleted file mode 100644
index 0523cf864c3b..000000000000
--- a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.nix
+++ /dev/null
@@ -1 +0,0 @@
-(builtins.tryEval (({ foo ? throw "up" }: if foo then 1 else 2) { })).success