about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-26T17·48+0300
committertazjin <tazjin@tvl.su>2022-09-03T13·22+0000
commit2cdc6192b47dbba221d158de31800035c738fdc7 (patch)
treeea52a5dcb3877f4d4042dcd376425a995fb1c8e9 /tvix/eval/src
parent4f00f75e31afc6bb1f163aa67e4b1cb0cadb2e12 (diff)
docs(tvix/eval): add docstrings for usize wrappers in opcode r/4620
Change-Id: I11b9324233c0aa48bd2fbac15a484962f925e72e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6283
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src')
-rw-r--r--tvix/eval/src/opcode.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tvix/eval/src/opcode.rs b/tvix/eval/src/opcode.rs
index 220933f41ea9..f265ef06d7f5 100644
--- a/tvix/eval/src/opcode.rs
+++ b/tvix/eval/src/opcode.rs
@@ -1,14 +1,17 @@
 //! This module implements the instruction set running on the abstract
 //! machine implemented by tvix.
 
+/// Index of a constant in the current code chunk.
 #[repr(transparent)]
 #[derive(Clone, Copy, Debug)]
 pub struct ConstantIdx(pub usize);
 
+/// Index of an instruction in the current code chunk.
 #[repr(transparent)]
 #[derive(Clone, Copy, Debug)]
 pub struct CodeIdx(pub usize);
 
+/// Offset by which an instruction pointer should change in a jump.
 #[repr(transparent)]
 #[derive(Clone, Copy, Debug)]
 pub struct JumpOffset(pub usize);