| 65 | } |
| 66 | |
| 67 | std::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 | |
| 84 | std::vector<schema::program::Instruction> codeSectionInstructions(Assembly const& _assembly, LinkerObject const& _linkerObject, unsigned const _sourceID, size_t const _codeSectionIndex) |
| 85 | { |
no test coverage detected