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

Function instructionContext

libevmasm/Ethdebug.cpp:67–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67std::optional<schema::program::Context> instructionContext(Assembly::CodeSection const& _codeSection, size_t _assemblyItemIndex, unsigned _sourceID)
68{
69 solAssert(_assemblyItemIndex < _codeSection.items.size());
70 langutil::SourceLocation const& location = _codeSection.items.at(_assemblyItemIndex).location();
71 if (!location.isValid())
72 return std::nullopt;
73
74 return schema::program::Context{
75 schema::materials::SourceRange{
76 .source = sourceReference(_sourceID),
77 .range = locationRange(location)
78 },
79 std::nullopt,
80 std::nullopt
81 };
82}
83
84std::vector<schema::program::Instruction> codeSectionInstructions(Assembly const& _assembly, LinkerObject const& _linkerObject, unsigned const _sourceID, size_t const _codeSectionIndex)
85{

Callers 1

codeSectionInstructionsFunction · 0.85

Calls 6

sourceReferenceFunction · 0.85
locationRangeFunction · 0.85
atMethod · 0.80
sizeMethod · 0.45
locationMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected