Repository navigation
Do not reset the stack size after a break instruction - #755
Merged
Merged
Conversation
"break" is not an unconditional jump instruction, it should not impact the stack size.
Owner
|
That makes sense. Thank you! |
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 is just a minor correctness fix of something I noticed while reading the code.
breakis not an unconditional jump instruction. It serves as a breakpoint for the debugger. This means it should not require the stack size of the next instruction to be zero (when there is no forward branch to it).I don't think the C# compiler emits
breakinstructions, so a unit test would have to use an assembly written in IL. I didn't think it's worth the trouble (as this change can only increase themaxstackvalue), but I can write one if you prefer.