diff options
author | chriseth <chris@ethereum.org> | 2018-12-20 01:06:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-20 01:06:13 +0800 |
commit | 1df8f40cd2fd7b47698d847907b8ca7b47eb488d (patch) | |
tree | 5ed5816fe2d1a8a207e750d39884aca7957c8289 /libsolidity/interface/CompilerStack.h | |
parent | c8a2cb62832afb2dc09ccee6fd42c1516dfdb981 (diff) | |
parent | ddf54b21d1d002903624f61173ab4af197f50053 (diff) | |
download | dexon-solidity-1df8f40cd2fd7b47698d847907b8ca7b47eb488d.tar dexon-solidity-1df8f40cd2fd7b47698d847907b8ca7b47eb488d.tar.gz dexon-solidity-1df8f40cd2fd7b47698d847907b8ca7b47eb488d.tar.bz2 dexon-solidity-1df8f40cd2fd7b47698d847907b8ca7b47eb488d.tar.lz dexon-solidity-1df8f40cd2fd7b47698d847907b8ca7b47eb488d.tar.xz dexon-solidity-1df8f40cd2fd7b47698d847907b8ca7b47eb488d.tar.zst dexon-solidity-1df8f40cd2fd7b47698d847907b8ca7b47eb488d.zip |
Merge pull request #5697 from ethereum/develop
Merge develop into release for 0.5.2
Diffstat (limited to 'libsolidity/interface/CompilerStack.h')
-rw-r--r-- | libsolidity/interface/CompilerStack.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index 2c7add3b..81d5009f 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -34,15 +34,14 @@ #include <libdevcore/Common.h> #include <libdevcore/FixedHash.h> -#include <json/json.h> - #include <boost/noncopyable.hpp> +#include <json/json.h> +#include <functional> +#include <memory> #include <ostream> #include <string> -#include <memory> #include <vector> -#include <functional> namespace langutil { @@ -262,7 +261,11 @@ private: std::shared_ptr<langutil::Scanner> scanner; std::shared_ptr<SourceUnit> ast; bool isLibrary = false; - void reset() { scanner.reset(); ast.reset(); } + h256 mutable keccak256HashCached; + h256 mutable swarmHashCached; + void reset() { *this = Source(); } + h256 const& keccak256() const; + h256 const& swarmHash() const; }; /// The state per contract. Filled gradually during compilation. @@ -316,7 +319,7 @@ private: std::string createMetadata(Contract const& _contract) const; /// @returns the metadata CBOR for the given serialised metadata JSON. - static bytes createCBORMetadata(std::string _metadata, bool _experimentalMode); + static bytes createCBORMetadata(std::string const& _metadata, bool _experimentalMode); /// @returns the computer source mapping string. std::string computeSourceMapping(eth::AssemblyItems const& _items) const; |