| 104 | } |
| 105 | |
| 106 | void CompilerUtils::revertWithError( |
| 107 | std::string const& _signature, |
| 108 | std::vector<Type const*> const& _parameterTypes, |
| 109 | std::vector<Type const*> const& _argumentTypes |
| 110 | ) |
| 111 | { |
| 112 | fetchFreeMemoryPointer(); |
| 113 | m_context << util::selectorFromSignatureU256(_signature); |
| 114 | m_context << Instruction::DUP2 << Instruction::MSTORE; |
| 115 | m_context << u256(4) << Instruction::ADD; |
| 116 | // Stack: <arguments...> <mem pos of encoding start> |
| 117 | abiEncode(_argumentTypes, _parameterTypes); |
| 118 | toSizeAfterFreeMemoryPointer(); |
| 119 | m_context << Instruction::REVERT; |
| 120 | } |
| 121 | |
| 122 | void CompilerUtils::returnDataToArray() |
| 123 | { |
no test coverage detected