diff options
author | chriseth <chris@ethereum.org> | 2016-12-02 18:23:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-02 18:23:45 +0800 |
commit | 3a01a87afe3468421f31aa5097796dcc88e37e26 (patch) | |
tree | 9069fcc823ca4b27b6add0c7278f1086923eb36e /libevmasm/Assembly.h | |
parent | 55a719a79c1ab5b78ea6e1bcb4f27a888494a538 (diff) | |
parent | 5098e1eb15678859d1bd5e9172184d6525e03863 (diff) | |
download | dexon-solidity-3a01a87afe3468421f31aa5097796dcc88e37e26.tar.gz dexon-solidity-3a01a87afe3468421f31aa5097796dcc88e37e26.tar.zst dexon-solidity-3a01a87afe3468421f31aa5097796dcc88e37e26.zip |
Merge pull request #1386 from ethereum/metadataOut
Metadata stamp
Diffstat (limited to 'libevmasm/Assembly.h')
-rw-r--r-- | libevmasm/Assembly.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libevmasm/Assembly.h b/libevmasm/Assembly.h index a5fd4d51..9e7f9f7b 100644 --- a/libevmasm/Assembly.h +++ b/libevmasm/Assembly.h @@ -71,6 +71,9 @@ public: AssemblyItem appendJumpI(AssemblyItem const& _tag) { auto ret = append(_tag.pushTag()); append(solidity::Instruction::JUMPI); return ret; } AssemblyItem errorTag() { return AssemblyItem(PushTag, 0); } + /// Appends @a _data literally to the very end of the bytecode. + void appendAuxiliaryDataToEnd(bytes const& _data) { m_auxiliaryData += _data; } + template <class T> Assembly& operator<<(T const& _d) { append(_d); return *this; } AssemblyItems const& items() const { return m_items; } AssemblyItem const& back() const { return m_items.back(); } @@ -125,10 +128,12 @@ private: Json::Value createJsonValue(std::string _name, int _begin, int _end, std::string _value = std::string(), std::string _jumpType = std::string()) const; protected: - // 0 is reserved for exception + /// 0 is reserved for exception unsigned m_usedTags = 1; AssemblyItems m_items; std::map<h256, bytes> m_data; + /// Data that is appended to the very end of the contract. + bytes m_auxiliaryData; std::vector<std::shared_ptr<Assembly>> m_subs; std::map<h256, std::string> m_strings; std::map<h256, std::string> m_libraries; ///< Identifiers of libraries to be linked. |