-
Notifications
You must be signed in to change notification settings - Fork 182
Description
I was going through a Vyper bytecode in the playground and I found myself searching for bytecode offsets multiple times in the raw bytecode and in the memory. I had to take the pushed values in hex, convert to decimal, multiply with 2, and use a text editor the find the exact offset for that hex value.
Ideally I should be able to see the byte lengths on selecting with the cursor in bytecode or memory views to see easier.
Example
An example with this bytecode
60e7515034610035573360a75260206100f560003960005160c75266eca7a2f8618d6f60e7526100a761003a6000396101076000f35b600080fd60003560e01c60026005820660011b61009d01601e39600051565b635f284cb3811861009257346100985760206100c760403960206040f35b63117803e3811861009257346100985760206100a760403960206040f35b633bc72e5e811861009257346100985760206100c760403960206040f35b635acb1ac8811861009257346100985760206100e760403960206040f35b60006000fd5b600080fd001a00920038005600748418a7810a1860a16576797065728300040000140000000000000000000000000000000000000000000000000000000000000005
The CALLER value gets stored to a7 in the memory

Stored:

Later on in the code I want to be able to see the offsets as such

If you think this makes sense, I can implement and open a PR for this, it should be straightforward. We can think about where to show this and the design colors etc. I'd put them bottom right of the memory and bytecode view text blocks, as in the example.