MCPcopy Create free account
hub / github.com/argotorg/solidity / sourceMapping

Method sourceMapping

libsolidity/interface/CompilerStack.cpp:963–978  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

961}
962
963std::string const* CompilerStack::sourceMapping(std::string const& _contractName) const
964{
965 solAssert(m_stackState == CompilationSuccessful, "Compilation was not successful.");
966
967 // TODO
968 if (m_eofVersion.has_value())
969 return nullptr;
970
971 Contract const& c = contract(_contractName);
972 if (!c.sourceMapping)
973 {
974 if (auto items = assemblyItems(_contractName))
975 c.sourceMapping.emplace(evmasm::AssemblyItem::computeSourceMapping(*items, sourceIndices()));
976 }
977 return c.sourceMapping ? &*c.sourceMapping : nullptr;
978}
979
980std::string const* CompilerStack::runtimeSourceMapping(std::string const& _contractName) const
981{

Callers 2

importEVMAssemblyMethod · 0.45
compileSolidityMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected