about summary refs log tree commit diff
path: root/tvix/eval/src/opcode.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-07T23·32+0300
committertazjin <tazjin@tvl.su>2022-08-12T13·24+0000
commit72be759e1e3ec9c84ef3f2f15d54662efa7b0c03 (patch)
tree49778caae847d77a7e2dee132b4fb8ea73b33f6b /tvix/eval/src/opcode.rs
parentd35ecc0caf2d6ba54b5934f606796687303275b0 (diff)
feat(tvix/eval): implement unary negation operator r/4411
Change-Id: I5d012cc073e55d79d7b34b88283aab3164864293
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6075
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/opcode.rs')
-rw-r--r--tvix/eval/src/opcode.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/tvix/eval/src/opcode.rs b/tvix/eval/src/opcode.rs
index 307b695f6d9b..0aa252c4cc08 100644
--- a/tvix/eval/src/opcode.rs
+++ b/tvix/eval/src/opcode.rs
@@ -17,9 +17,13 @@ pub enum OpCode {
     OpTrue,
     OpFalse,
 
-    // Simple binary operators
+    // Arithmetic binary operators
     OpAdd,
     OpSub,
     OpMul,
     OpDiv,
+
+    // Unary operators
+    OpInvert,
+    OpNegate,
 }