From 2cdc6192b47dbba221d158de31800035c738fdc7 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 26 Aug 2022 20:48:39 +0300 Subject: docs(tvix/eval): add docstrings for usize wrappers in opcode Change-Id: I11b9324233c0aa48bd2fbac15a484962f925e72e Reviewed-on: https://cl.tvl.fyi/c/depot/+/6283 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/opcode.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tvix') 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); -- cgit 1.4.1