diff --git a/src/protocol/eval/value.rs b/src/protocol/eval/value.rs index a6fe4c77fe73edefead5449a99c6b78ca8bfc5f7..d08d327fecbb3faaaa79ae2c9b7629ebb8ba8a4e 100644 --- a/src/protocol/eval/value.rs +++ b/src/protocol/eval/value.rs @@ -1,7 +1,6 @@ use std::collections::VecDeque; use super::store::*; -use crate::PortId; use crate::protocol::ast::{ AssignmentOperator, BinaryOperator, @@ -20,6 +19,17 @@ pub enum ValueId { Heap(HeapPos, u32), // allocated region + values within that region } +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct PortId{ + pub(crate) id: u32 +} + +impl PortId { + pub fn new(id: u32) -> Self { + return Self{ id }; + } +} + /// Represents a value stored on the stack or on the heap. Some values contain /// a `HeapPos`, implying that they're stored in the store's `Heap`. Clearing /// a `Value` with a `HeapPos` from a stack must also clear the associated