Relationship between EVM Opcodes and Tags?

Hi,
I want to understand the purpose of tags in EVM assembly and their relationship with Solidity function.

pragma solidity ^0.5.1;
       import './Mod.sol';
        contract MOFTest{
           ModifiedBank mb;
            constructor(address payable addressOfBank, uint amount) public {}
            function deposit (uint amount )  payable public {
           }
      }

I found that if I have a constructor then Remix IDE will have only 2 tags but now I have 2 functions and I found that there are 5 tags. Kindly explain me what is the purpose of tags and what is their relationship with Solidity functions? Also the tags are appearing in a haphazard manner, first tag1 and tag2 , then again tag1 and tag2, after that Remix IDE shows rag4, and then tag3 & tag5.
Zulfi.

1 Like

Hi @zak100,

Unfortunately I don’t know the answer.

I saw you posted in Reddit, it would be great if you could share any answers you find.

You may also want to look at:

Thanks for this article. I read some part of it.

Zulfi.

1 Like

Hi @ abcoathup,
Thanks for the article link. Can I generate the opcodes something like that using the technique mentioned in the zeppelin blog article:

I got the above image from the link:
Image Solidity to opcode

Even I fee that the attached figure is not a perfect representation of Solidity code because for the deposit function, it does not show any ‘ADD’ statement related to the “+=” operator used in th code :
balance[msg.sender] += msg.value;

but it shows a brief representation of opcode which is what I am looking for. If any body has any idea about this brief representation of opcode please guide me.

Zulfi.

1 Like