Commit ee5c475
committed
internal/stackcheck: improve checking jumps
For jumps, a special warning is now emitted when the stack does not match the expected
stack on the jump destination. Jumps going from inside a macro to outside are now also
verified.
This change also makes the stack validation more strict about the documented stack depth.
The analysis previously allowed comments to elide items and bring them back later, but
this lead to the confusing situation where a documented stack of `[]` would not check
anything. When `[]` is written, it is a statement from the user that all tracked items
have been consumed. The analysis model has now changed and no longer allows eliding items.
For explicit elision, a wildcard can be used.1 parent 48726ef commit ee5c475
File tree
9 files changed
+553
-274
lines changed- asm/testdata
- internal
- stackcheck
- stack
9 files changed
+553
-274
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
689 | | - | |
| 689 | + | |
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
| |||
0 commit comments