diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-08T13·38+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-08-12T14·09+0000 |
commit | 0d2896519cf8dae97da024912d93c37b3c3bba85 (patch) | |
tree | 496a282070004acbcf7643383c7ac475e1bc59da /tvix/eval/src/vm.rs | |
parent | 9c5a249b3059fa7951948b27ba5365d4570843ff (diff) |
refactor(tvix/eval): move NumberPair struct definition to vm module r/4417
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 <tazjin@tvl.su> Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r-- | tvix/eval/src/vm.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index 7b7834c650c6..6841ac4706b3 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<Value> { let mut vm = VM { chunk, |