| 30 | { |
| 31 | |
| 32 | schema::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 | |
| 51 | schema::materials::SourceRange::Range locationRange(langutil::SourceLocation const& _location) |
| 52 | { |
no test coverage detected