mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Document the panic function of library deployment
This commit is contained in:
@@ -237,15 +237,18 @@ size_t ContractCompiler::deployLibrary(ContractDefinition const& _contract)
|
||||
codecopy(codepos, subOffset, subSize)
|
||||
// Check that the first opcode is a PUSH20
|
||||
if iszero(eq(0x73, byte(0, mload(codepos)))) {
|
||||
mstore(0, <panicSig>)
|
||||
mstore(4, 0)
|
||||
mstore(0, <panicSelector>)
|
||||
mstore(4, <panicCode>)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
mstore(0, address())
|
||||
mstore8(codepos, 0x73)
|
||||
return(codepos, subSize)
|
||||
}
|
||||
)")("panicSig", util::selectorFromSignature("Panic(uint256)").str()).render(),
|
||||
)")
|
||||
("panicSelector", util::selectorFromSignature("Panic(uint256)").str())
|
||||
("panicCode", "0")
|
||||
.render(),
|
||||
{"subSize", "subOffset"}
|
||||
);
|
||||
|
||||
|
||||
@@ -656,7 +656,6 @@ pair<string, map<ContractDefinition const*, vector<string>>> IRGenerator::evalua
|
||||
|
||||
map<ContractDefinition const*, std::vector<ASTPointer<Expression>>const *, InheritanceOrder>
|
||||
baseConstructorArguments(inheritanceOrder);
|
||||
;
|
||||
|
||||
for (ASTPointer<InheritanceSpecifier> const& base: _contract.baseContracts())
|
||||
if (FunctionDefinition const* baseConstructor = dynamic_cast<ContractDefinition const*>(
|
||||
|
||||
Reference in New Issue
Block a user