Closed carllocos closed 1 year ago
This is exactly this feature request: https://github.com/TOPLLab/WARDuino/issues/86 And this TODO: https://github.com/TOPLLab/WARDuino/blob/6cd2bf610d8b1cb87b0178f886360cf3cd6435de/src/WARDuino/CallbackHandler.cpp#L210-L212
Currently, a callback of any type signature can be subscribed via primitive
subscribe_interrupt
. This is a problem because the callback handler expects registered callbacks to take 5 arguments given that the callback handler pushes 5 stack values prior setting up the call seeresolve_event
.On top of my head, we could throw a trap when registering the callback via the
subscribe_interrupt
primitive. This avoids an out-of-context type mismatch fatal that the VM throws when