This repository has been archived by the owner on Mar 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Enums and dataflow processing (includes #64) #65
Open
DomHenderson
wants to merge
26
commits into
keep-starknet-strange:main
Choose a base branch
from
NethermindEth:enums
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #65 +/- ##
==========================================
+ Coverage 86.27% 90.84% +4.56%
==========================================
Files 36 38 +2
Lines 1741 2151 +410
==========================================
+ Hits 1502 1954 +452
+ Misses 239 197 -42
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
DomHenderson
changed the title
[WIP] Enums
Enums and dataflow processing (includes #64)
Mar 15, 2023
Spotted a couple small todos that are in scope, should be back out of draft again soon |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Enum types are implemented as structs with a preceding index field, and then one field for each unique enum subtype (i.e. if the enum is always a felt then the struct will only have two fields). Each version of enum init takes a single argument, allocating it on the stack alongside the index and any other fields which will not be assigned any particular value. This includes the comparison testing infrastructure because it's what I'm using to test it, but can be decoupled if/when needed Enum match extracts each field from the enum struct, switches on the index field, and utilises the dataflow graph to forward data onto its destinations.
This has required improving data flow handling and adding phi instructions. To summarise:
Does this introduce a breaking change?
Other information