mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove unused functions from CompilerStack
This commit is contained in:
1 parent
d4a57d81ba
commit
c212d7c2e6
2 files changed
-48
No files matched your search
@@ -400,15 +400,6 @@ eth::LinkerObject const& CompilerStack::cloneObject(string const& _contractName)
|
||||
return contract(_contractName).cloneObject;
|
||||
}
|
||||
|
||||
dev::h256 CompilerStack::contractCodeHash(string const& _contractName) const
|
||||
{
|
||||
auto const& obj = runtimeObject(_contractName);
|
||||
if (obj.bytecode.empty() || !obj.linkReferences.empty())
|
||||
return dev::h256();
|
||||
else
|
||||
return dev::keccak256(obj.bytecode);
|
||||
}
|
||||
|
||||
Json::Value CompilerStack::streamAssembly(ostream& _outStream, string const& _contractName, StringMap _sourceCodes, bool _inJsonFormat) const
|
||||
{
|
||||
Contract const& currentContract = contract(_contractName);
|
||||
@@ -522,24 +513,6 @@ ContractDefinition const& CompilerStack::contractDefinition(string const& _contr
|
||||
return *contract(_contractName).contract;
|
||||
}
|
||||
|
||||
size_t CompilerStack::functionEntryPoint(
|
||||
std::string const& _contractName,
|
||||
FunctionDefinition const& _function
|
||||
) const
|
||||
{
|
||||
shared_ptr<Compiler> const& compiler = contract(_contractName).compiler;
|
||||
if (!compiler)
|
||||
return 0;
|
||||
eth::AssemblyItem tag = compiler->functionEntryLabel(_function);
|
||||
if (tag.type() == eth::UndefinedItem)
|
||||
return 0;
|
||||
eth::AssemblyItems const& items = compiler->runtimeAssemblyItems();
|
||||
for (size_t i = 0; i < items.size(); ++i)
|
||||
if (items.at(i).type() == eth::Tag && items.at(i).data() == tag.data())
|
||||
return i;
|
||||
return 0;
|
||||
}
|
||||
|
||||
tuple<int, int, int, int> CompilerStack::positionFromSourceLocation(SourceLocation const& _sourceLocation) const
|
||||
{
|
||||
int startLine;
|
||||
@@ -744,14 +717,6 @@ void CompilerStack::compileContract(
|
||||
}
|
||||
}
|
||||
|
||||
std::string CompilerStack::defaultContractName() const
|
||||
{
|
||||
if (m_stackState != CompilationSuccessful)
|
||||
BOOST_THROW_EXCEPTION(CompilerError() << errinfo_comment("Compilation was not successful."));
|
||||
|
||||
return contract("").contract->name();
|
||||
}
|
||||
|
||||
CompilerStack::Contract const& CompilerStack::contract(string const& _contractName) const
|
||||
{
|
||||
if (m_contracts.empty())
|
||||
|
||||
Reference in new issue
Block a user