diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index 9ea716fb06b139f56996a305106369224b576835..3352aa183902a1d0ca745f59a08e780944a27e04 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -294,4 +294,16 @@ impl EvalContext<'_> { }, } } + fn did_put(&mut self, port: Value) -> bool { + match self { + EvalContext::Nonsync(_) => unreachable!("did_put in nonsync context"), + EvalContext::Sync(context) => match port { + Value::Output(OutputValue(port)) => { + context.is_firing(port).unwrap_or(false) + }, + Value::Input(_) => unreachable!("did_put on input port"), + _ => unreachable!("did_put on non-port value") + } + } + } }