Merge pull request #9941 from ethereum/genmappings

Explain generated sources in source mappings.
This commit is contained in:
chriseth 2020-10-01 13:29:17 +02:00 committed by GitHub
commit b96fd20b06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,10 @@ Both kinds of source mappings use integer identifiers to refer to source files.
The identifier of a source file is stored in
``output['sources'][sourceName]['id']`` where ``output`` is the output of the
standard-json compiler interface parsed as JSON.
For some utility routines, the compiler generates "internal" source files
that are not part of the original input but are referenced from the source
mappings. These source files together with their identifiers can be
obtained via ``output['contracts'][sourceName][contractName]['evm']['bytecode']['generatedSources']``.
.. note ::
In the case of instructions that are not associated with any particular source file,