Migrate execution to dynamic dispatch#360
Migrate execution to dynamic dispatch#360ivanlele wants to merge 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 |
| struct UnfinalizeTypes<'a, 'brand> { | ||
| inference_context: &'a types::Context<'brand>, | ||
| phantom: PhantomData<J>, | ||
| phantom: PhantomData<()>, |
There was a problem hiding this comment.
In f33074e:
Lol. You should just delete this phantomdata.
There was a problem hiding this comment.
Done, and the next one too. Probably should've worn my glasses when I was going over it one last time :d
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.