Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #384 +/- ##
==========================================
+ Coverage 99.11% 99.32% +0.20%
==========================================
Files 42 42
Lines 12357 12489 +132
==========================================
+ Hits 12248 12405 +157
+ Misses 109 84 -25 |
c4fd3cb to
9a68bb8
Compare
gumb0
commented
Jun 10, 2020
b965217 to
37756a2
Compare
5a2d02c to
b2453a4
Compare
b2453a4 to
1e69b62
Compare
gumb0
commented
Jun 11, 2020
| // stack height anyway. | ||
| code.max_stack_height = std::max(code.max_stack_height, frame.stack_height); | ||
| } | ||
| if (!frame.unreachable) |
Collaborator
Author
There was a problem hiding this comment.
If we pull this max_stack_height update out of outer if, it looks like we can unify stack height update/checks for instructions and for calls, not sure if it's worth it. The error message for stack underflow would not be specific for calls then...
Collaborator
There was a problem hiding this comment.
I think this can be done in separate PR to confirm coverage of this version is full.
1e69b62 to
ffc11b9
Compare
chfast
approved these changes
Jun 12, 2020
Collaborator
chfast
left a comment
There was a problem hiding this comment.
The final version looks good to me.
| // stack height anyway. | ||
| code.max_stack_height = std::max(code.max_stack_height, frame.stack_height); | ||
| } | ||
| if (!frame.unreachable) |
Collaborator
There was a problem hiding this comment.
I think this can be done in separate PR to confirm coverage of this version is full.
ffc11b9 to
9b6d045
Compare
Collaborator
Author
|
Squashed "simplify" commit. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This applies the logic of Validation algorithm regarding unreachable to stack height checks.
Specifically
After unreachable any underflowing pop is ignored, but pushes add to stack growth.

When current frame is marked unreachable, stack height is reset.

"Simplify" commit is not squashed yet to show the different nested organization of nested ifs. I find the final one better.