format icon indicating copy to clipboard operation
format copied to clipboard

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

Open yann300 opened this issue 1 year ago • 1 comments

yann300 avatar Dec 07 '23 14:12 yann300

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 :)

gnidan avatar Mar 28 '24 15:03 gnidan