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

Function instructionOperation

libevmasm/Ethdebug.cpp:32–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30{
31
32schema::program::Instruction::Operation instructionOperation(Assembly const& _assembly, LinkerObject const& _linkerObject, size_t const _start, size_t const _end)
33{
34 solAssert(_end <= _linkerObject.bytecode.size());
35 solAssert(_start < _end);
36 schema::program::Instruction::Operation operation;
37 operation.mnemonic = instructionInfo(static_cast<Instruction>(_linkerObject.bytecode[_start]), _assembly.evmVersion()).name;
38 static size_t constexpr instructionSize = 1;
39 if (_start + instructionSize < _end)
40 {
41 bytes const argumentData(
42 _linkerObject.bytecode.begin() + static_cast<std::ptrdiff_t>(_start) + instructionSize,
43 _linkerObject.bytecode.begin() + static_cast<std::ptrdiff_t>(_end)
44 );
45 solAssert(!argumentData.empty());
46 operation.arguments = {{schema::data::HexValue{argumentData}}};
47 }
48 return operation;
49}
50
51schema::materials::SourceRange::Range locationRange(langutil::SourceLocation const& _location)
52{

Callers 1

codeSectionInstructionsFunction · 0.85

Calls 4

sizeMethod · 0.45
evmVersionMethod · 0.45
beginMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected