From 0d2896519cf8dae97da024912d93c37b3c3bba85 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 8 Aug 2022 16:38:11 +0300 Subject: refactor(tvix/eval): move NumberPair struct definition to vm module This isn't relevant to the value type itself. Change-Id: I678bc92a8a530b1081ed498bf3ff7925217bcc01 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6081 Tested-by: BuildkiteCI Autosubmit: tazjin Reviewed-by: grfn --- tvix/eval/src/vm.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tvix/eval/src/vm.rs') diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index 7b7834c650..6841ac4706 100644 --- a/tvix/eval/src/vm.rs +++ b/tvix/eval/src/vm.rs @@ -5,7 +5,7 @@ use crate::{ chunk::Chunk, errors::{Error, EvalResult}, opcode::OpCode, - value::{NumberPair, Value}, + value::Value, }; pub struct VM { @@ -123,6 +123,12 @@ impl VM { } } +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum NumberPair { + Floats(f64, f64), + Integer(i64, i64), +} + pub fn run_chunk(chunk: Chunk) -> EvalResult { let mut vm = VM { chunk, -- cgit 1.4.1