-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
Removed duplicated code in vm.run using macros. #1044
Conversation
5f43b77
to
4e69075
Compare
Codecov Report
@@ Coverage Diff @@
## master #1044 +/- ##
==========================================
+ Coverage 58.53% 58.88% +0.35%
==========================================
Files 176 172 -4
Lines 12547 11709 -838
==========================================
- Hits 7344 6895 -449
+ Misses 5203 4814 -389
Continue to review full report at Codecov.
|
@stephanemagnenat sorry for the conflict, we have a few PRs in this area at the moment |
Do you want me to fix the conflict (by using an optional result), or is there a lot ongoing and I should rather wait that the new code is completed? |
@stephanemagnenat you’re free to carry on now it all went in |
4de4d4a
to
8612f12
Compare
I've rebased my changes on master. |
I was not fully sure for the naming of the macro, between |
I agree with |
8612f12
to
6af409e
Compare
Done! |
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.
Looks good!
Thanks for the contribution @stephanemagnenat ! |
No it isn't currently but we hope to change that some point in the future |
This Pull Request reduces code duplication in VM execution, this refactoring let me find issue #1041.
It changes the following:
I did not use the macro equality, in order to keep the balance with the inequality code which, due to the
!
before theinto
, would still need the macro. When using thebinop
macro, one might want to put the call in a single line instead of using{ ... }
.I do not know whether upstream wants this change, but I submit it just in case. I do not know if the vm feature is enabled in CI.
This PR also fixes #1041.