diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-01 20:28:05 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-01 20:28:05 +0800 |
commit | c212d7c2e6b16063191d85471871eeddf0e6510d (patch) | |
tree | e8f81ae2a553e36066bf619cbd7a70b60d68b2b5 /libsolidity/interface/CompilerStack.cpp | |
parent | d4a57d81ba7f2a9b5db57397d36f1a17adb4b142 (diff) | |
download | dexon-solidity-c212d7c2e6b16063191d85471871eeddf0e6510d.tar dexon-solidity-c212d7c2e6b16063191d85471871eeddf0e6510d.tar.gz dexon-solidity-c212d7c2e6b16063191d85471871eeddf0e6510d.tar.bz2 dexon-solidity-c212d7c2e6b16063191d85471871eeddf0e6510d.tar.lz dexon-solidity-c212d7c2e6b16063191d85471871eeddf0e6510d.tar.xz dexon-solidity-c212d7c2e6b16063191d85471871eeddf0e6510d.tar.zst dexon-solidity-c212d7c2e6b16063191d85471871eeddf0e6510d.zip |
Remove unused functions from CompilerStack
Diffstat (limited to 'libsolidity/interface/CompilerStack.cpp')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 44220402..c3fcc1ef 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -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()) |