Solidity sourceMap
Definition
AST sourceMap
s:l:f
(e.g. 1:2:1;1:9:1;2:1:2;2:1:2;2:1:2)
s: byte-offset to the start of the range in the source file
l: length of the source range in bytes
f: source index (in sourceList, which is part of the combined-json)
bytecode sourceMap
list of s:l:f:j separated by ;
(e.g. 10630:2840:0:-;;;10803:1458;;;;;;;;;)
Each of these elements corresponds to an instruction
s, l, f are the same of AST sourceMap's
j can be either i, o or -
i: jump instruction goes into a function (jump in?)
o:returns from a function (jump out?)
-: regular jump as part of e.g. a loop
If a field is empty, the value of the preceding element is used.
e.g. 1:2:1;1:9:1;2:1:2;2:1:2;2:1:2 and 1:2:1;:9;2:1:2;; represent the same information
If a : is missing, all following fields are considered empty.
Linkes
related issues