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