Skip to content
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

Procedure context tracking in the processor #106

Closed
Tracked by #866
bobbinth opened this issue Feb 11, 2022 · 1 comment
Closed
Tracked by #866

Procedure context tracking in the processor #106

bobbinth opened this issue Feb 11, 2022 · 1 comment
Labels
assembly Related to Miden assembly on hold This issue is blocked or we don't want to start it yet processor Related to Miden VM processor

Comments

@bobbinth
Copy link
Contributor

Currently, the processor is unaware of the procedure context of an executing program. That is, the processor doesn't know which procedure is being executed, which procedure called the current procedure etc. This limits usefulness of debug info. Thus, it would be very useful if the processor maintained a "procedure stack".

To make a process aware of which procedures are executing, we could introduce two new decorators. Something like:

  • ProcStart - which the assembler would add at the start of each procedure.
  • ProcEnd - which the assembler would add right before a procedure returns.

Then, the processor would push a procedure onto a stack when it sees ProcStart decorator in the instruction stream, and remove a procedure from the stack when it sees ProcEnd decorator. This should be very lightweight - so, I don't think we should worry about performance implications.

@bobbinth bobbinth added assembly Related to Miden assembly processor Related to Miden VM processor labels Feb 11, 2022
@bobbinth bobbinth added the on hold This issue is blocked or we don't want to start it yet label May 22, 2022
@bobbinth
Copy link
Contributor Author

Closing this as we'll take a different to mapping instructions executed by the VM to the original source locations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assembly Related to Miden assembly on hold This issue is blocked or we don't want to start it yet processor Related to Miden VM processor
Projects
None yet
Development

No branches or pull requests

2 participants