Open axic opened 6 years ago
The use of revert
and selfdestruct
it's not really important, because it have the same behavior of revert and selfdestruct on non assembly.
However for return(p,s)
the behavior is completly different, while in non assembly return;
ends the internal call and return the value for that internal call, return(p,s)
ends the external call and returns for the external call.
@axic do you know if the AST created contains the "AST" of the inline assembly aswell? I think a last time i checked (March/April) that i only got assembly nodes in the AST but without content.
Double checked and the new AST format has it in a source code format :(
The old one probably didn't have it.
There is an issue for it: https://github.com/ethereum/solidity/issues/2419
@Aniket-Engg
From https://github.com/ethereum/solidity/issues/3258.
Depends on ethereum/remix-ide#921.
It would be nice to warn if using assembly instructions which modify the control flow (e.g. they abort execution). All of them are available in the higher level language and in many cases using them there makes more sense.
Assembly instructions to highlight:
invalid
,return
,revert
,selfdestruct
cc @soad003, you might be interested