diff options
author | chriseth <chris@ethereum.org> | 2017-11-14 19:58:04 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-01-19 23:27:44 +0800 |
commit | 6807010dc7864500d89a833e4f6e7f338e58b948 (patch) | |
tree | 90fa3b3d59ae85a752dc611b6a32e24fe91e9efb /libevmasm/Assembly.cpp | |
parent | 33723c457a99213a545006162112b55351da5fe4 (diff) | |
download | dexon-solidity-6807010dc7864500d89a833e4f6e7f338e58b948.tar.gz dexon-solidity-6807010dc7864500d89a833e4f6e7f338e58b948.tar.zst dexon-solidity-6807010dc7864500d89a833e4f6e7f338e58b948.zip |
Prevent libraries from being called.
Diffstat (limited to 'libevmasm/Assembly.cpp')
-rw-r--r-- | libevmasm/Assembly.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index 5fab24e1..b9fedf26 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -283,6 +283,11 @@ Json::Value Assembly::assemblyJSON(StringMap const& _sourceCodes) const createJsonValue("PUSHLIB", i.location().start, i.location().end, m_libraries.at(h256(i.data()))) ); break; + case PushDeployTimeAddress: + collection.append( + createJsonValue("PUSHDEPLOYADDRESS", i.location().start, i.location().end) + ); + break; case Tag: collection.append( createJsonValue("tag", i.location().start, i.location().end, string(i.data()))); @@ -590,6 +595,10 @@ LinkerObject const& Assembly::assemble() const ret.linkReferences[ret.bytecode.size()] = m_libraries.at(i.data()); ret.bytecode.resize(ret.bytecode.size() + 20); break; + case PushDeployTimeAddress: + ret.bytecode.push_back(byte(Instruction::PUSH20)); + ret.bytecode.resize(ret.bytecode.size() + 20); + break; case Tag: assertThrow(i.data() != 0, AssemblyException, "Invalid tag position."); assertThrow(i.splitForeignPushTag().first == size_t(-1), AssemblyException, "Foreign tag."); |