Migrate execution to dynamic dispatch#360
Migrate execution to dynamic dispatch#360apoelstra merged 1 commit intoBlockstreamResearch:masterfrom
Conversation
|
@apoelstra The main voodoo lives in let typed_jet = jet
.as_ref()
.as_any()
.downcast_ref::<JE::Jet>()
.ok_or(ExecutionError::JetTypeMismatch)?;
jet_result = self.exec_jet(typed_jet, env);Here we downcast the With the move to dynamic dispatch, we lose some benefits, a few places now require additional generic boilerplate (prime example is: In a follow up PR, I'm thinking to add runtime checks for |
|
At a conference and have only done a cursory review so far. Overall this looks great! Amazing to get rid of so many generics. Frustrating to have extra generics on
Neat. We can revisit this in a followup. Maybe we can remove the generic from
Yeah, this is a good idea (but should be in a followup). We may want a |
f33074e to
56deeb9
Compare
56deeb9 to
0fb7c51
Compare
This PR closes #349 by moving all non-object-safe Jet supertraits onto Box and migrating the project’s internal generic model to dynamic dispatch.