diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index 44988824b0ca822a44d4640b61b480ee6eb19ba5..fade25ccafb1caa91db843d4930698c93c605a4c 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -284,11 +284,11 @@ impl ProtocolDescription { // TODO: @temp Should just become a concrete thing that is passed in pub trait RunContext { - fn did_put(&mut self, port: PortId) -> bool; - fn get(&mut self, port: PortId) -> Option; // None if still waiting on message + fn performed_put(&mut self, port: PortId) -> bool; + fn performed_get(&mut self, port: PortId) -> Option; // None if still waiting on message fn fires(&mut self, port: PortId) -> Option; // None if not yet branched - fn get_fork(&mut self) -> Option; // None if not yet forked - fn get_channel(&mut self) -> Option<(Value, Value)>; // None if not yet prepared + fn performed_fork(&mut self) -> Option; // None if not yet forked + fn created_channel(&mut self) -> Option<(Value, Value)>; // None if not yet prepared } #[derive(Debug)] @@ -301,7 +301,7 @@ pub enum RunResult { // Can only occur inside sync blocks BranchInconsistent, // branch has inconsistent behaviour BranchMissingPortState(PortId), // branch doesn't know about port firing - BranchMissingPortValue(PortId), // branch hasn't received message on input port yet + BranchGet(PortId), // branch hasn't received message on input port yet BranchAtSyncEnd, BranchFork, BranchPut(PortId, ValueGroup), @@ -334,7 +334,7 @@ impl ComponentState { EC::NewFork => return RR::BranchFork, EC::BlockFires(port_id) => return RR::BranchMissingPortState(port_id), - EC::BlockGet(port_id) => return RR::BranchMissingPortValue(port_id), + EC::BlockGet(port_id) => return RR::BranchGet(port_id), EC::Put(port_id, value) => { let value_group = ValueGroup::from_store(&self.prompt.store, &[value]); return RR::BranchPut(port_id, value_group); @@ -469,7 +469,7 @@ impl ComponentState { } impl RunContext for EvalContext<'_> { - fn did_put(&mut self, port: PortId) -> bool { + fn performed_put(&mut self, port: PortId) -> bool { match self { EvalContext::None => unreachable!(), EvalContext::Nonsync(_) => unreachable!(), @@ -479,7 +479,7 @@ impl RunContext for EvalContext<'_> { } } - fn get(&mut self, port: PortId) -> Option { + fn performed_get(&mut self, port: PortId) -> Option { match self { EvalContext::None => unreachable!(), EvalContext::Nonsync(_) => unreachable!(), @@ -518,7 +518,7 @@ impl RunContext for EvalContext<'_> { } } - fn get_channel(&mut self) -> Option<(Value, Value)> { + fn created_channel(&mut self) -> Option<(Value, Value)> { match self { EvalContext::None => unreachable!(), EvalContext::Nonsync(context) => { @@ -531,7 +531,7 @@ impl RunContext for EvalContext<'_> { } } - fn get_fork(&mut self) -> Option { + fn performed_fork(&mut self) -> Option { // Never actually used in the old runtime return None; }