Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better trap handling #252

Merged
merged 1 commit into from
Dec 5, 2023
Merged

Better trap handling #252

merged 1 commit into from
Dec 5, 2023

Conversation

sorpaas
Copy link
Member

@sorpaas sorpaas commented Dec 5, 2023

Introduce two different traits TrapConsume and TrapConstruct.

TrapConstruct is self-explanatory -- given a base-type trap, it warps it to the top-level enum.

TrapConsume should be implemented on the top-level enum for all possibilities of trap handling orders, and reduce the type into Rest. For example, if a VM has three different types of traps -- CallCreateTrap, dyn Future<Output = Control<Tr>> for storage access, and Interrupt. Then TrapConsume<CallCreateTrap> should return an enum containing two other variants dyn Future<Output = Control<Tr>> and Interrupt, and so forth.

@sorpaas sorpaas merged commit d2a21ce into master Dec 5, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant