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

When a JUMPDEST is reached, the compiler should return precise information about the AST node it is jumped to (if any). #41

Open
yann300 opened this issue Dec 7, 2023 · 1 comment

Comments

@yann300
Copy link

yann300 commented Dec 7, 2023

No description provided.

@gnidan
Copy link
Member

gnidan commented Mar 28, 2024

What I am currently thinking about what this might look like, I imagine there would be an object annotating the JUMPDEST operation that might resemble something like (for function calls specifically):

pc: 5
op: JUMPDEST
operation:
  begin: "function-call"
  name: "transfer"
  definition:
    file: 1
    start: 60
    length: 120
  from: 
    file: 1
    start: 80
    length: 33

Yann, you raise that loops also use JUMPDEST. There's an open question (IMO) about whether this debug format should include primitives about loops (probably?), but hopefully this provides a rough starting point to understand how this might work.

Of course we might also add AST node information, somewhere in that definition field :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants