fix: Revert interpreter stack display #238
Merged
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.
Encountering an error while running the CPU in
simulation
mode (i.e. through the interpreter) would display a reverted stack, which can be confusing. Additionally, the interpreter was re-implementing stack reconstruction in a bloated way while we could reuse the implementation from the underlying generation state (assuming the stack is less than 10 elements long in unit tests, which is currently always the case).The only downside is that the
interpreter
's implementation of theState
trait methodget_stack
requires a double call tostack.reverse()
, although this method is only used upon CPU erroring, so this isn't an issue.