diff --git a/src/runtime2/branch.rs b/src/runtime2/branch.rs index 511dfc1597390034c4913bd4a68a0b566fd6df2e..af82ecc0c0e1e6c2f3604af3ca8672e599204a40 100644 --- a/src/runtime2/branch.rs +++ b/src/runtime2/branch.rs @@ -1,8 +1,7 @@ use std::collections::HashMap; use std::ops::{Index, IndexMut}; -use crate::protocol::ComponentState; -use crate::protocol::eval::{Value, ValueGroup}; +use crate::protocol::eval::{Prompt, Value, ValueGroup}; use super::port::PortIdLocal; @@ -88,7 +87,7 @@ pub(crate) struct Branch { pub id: BranchId, pub parent_id: BranchId, // Execution state - pub code_state: ComponentState, + pub code_state: Prompt, pub sync_state: SpeculativeState, pub awaiting_port: PortIdLocal, // only valid if in "awaiting message" queue. TODO: Maybe put in enum pub next_in_queue: BranchId, // used by `ExecTree`/`BranchQueue` @@ -103,7 +102,7 @@ impl BranchListItem for Branch { impl Branch { /// Creates a new non-speculative branch - pub(crate) fn new_non_sync(component_state: ComponentState) -> Self { + pub(crate) fn new_non_sync(component_state: Prompt) -> Self { Branch { id: BranchId::new_invalid(), parent_id: BranchId::new_invalid(), @@ -200,7 +199,7 @@ pub(crate) struct ExecTree { impl ExecTree { /// Constructs a new execution tree with a single non-sync branch. - pub fn new(component: ComponentState) -> Self { + pub fn new(component: Prompt) -> Self { return Self { branches: vec![Branch::new_non_sync(component)], queues: [BranchQueue::new(); 3]