-
Notifications
You must be signed in to change notification settings - Fork 294
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
Add classification of EVM instructions (op_kind) #173
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #173 +/- ##
===========================================
- Coverage 100% 86.59% -13.41%
===========================================
Files 5 22 +17
Lines 839 2260 +1421
Branches 109 220 +111
===========================================
+ Hits 839 1957 +1118
- Misses 0 276 +276
- Partials 0 27 +27 |
/// Defines classification of EVM instructions. | ||
enum class op_kind | ||
{ | ||
regular, ///< Totally uninteresting instruction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆
}; | ||
static_assert(sizeof(op_table_entry) <= 2 * sizeof(void*)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is important, maybe op_kind
's underlying type should be specified?
break; | ||
|
||
case ANY_SMALL_PUSH: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can ANY_SMALL_PUSH
and ANY_LARGE_PUSH
definitions be deleted now?
case OP_REVERT: | ||
case OP_SELFDESTRUCT: | ||
is_terminator = true; | ||
default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say explicit cases here would more clearly show the intention
default: | |
op_kind::regular: | |
op_kind::terminator: |
Is this PR still useful/relevant? |
Requires #168.