aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/AssemblyItem.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-11-14 19:58:04 +0800
committerchriseth <chris@ethereum.org>2018-01-19 23:27:44 +0800
commit6807010dc7864500d89a833e4f6e7f338e58b948 (patch)
tree90fa3b3d59ae85a752dc611b6a32e24fe91e9efb /libevmasm/AssemblyItem.cpp
parent33723c457a99213a545006162112b55351da5fe4 (diff)
downloaddexon-solidity-6807010dc7864500d89a833e4f6e7f338e58b948.tar
dexon-solidity-6807010dc7864500d89a833e4f6e7f338e58b948.tar.gz
dexon-solidity-6807010dc7864500d89a833e4f6e7f338e58b948.tar.bz2
dexon-solidity-6807010dc7864500d89a833e4f6e7f338e58b948.tar.lz
dexon-solidity-6807010dc7864500d89a833e4f6e7f338e58b948.tar.xz
dexon-solidity-6807010dc7864500d89a833e4f6e7f338e58b948.tar.zst
dexon-solidity-6807010dc7864500d89a833e4f6e7f338e58b948.zip
Prevent libraries from being called.
Diffstat (limited to 'libevmasm/AssemblyItem.cpp')
-rw-r--r--libevmasm/AssemblyItem.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libevmasm/AssemblyItem.cpp b/libevmasm/AssemblyItem.cpp
index 64963021..5af618ff 100644
--- a/libevmasm/AssemblyItem.cpp
+++ b/libevmasm/AssemblyItem.cpp
@@ -68,6 +68,7 @@ unsigned AssemblyItem::bytesRequired(unsigned _addressLength) const
case PushSub:
return 1 + _addressLength;
case PushLibraryAddress:
+ case PushDeployTimeAddress:
return 1 + 20;
default:
break;
@@ -97,6 +98,7 @@ int AssemblyItem::returnValues() const
case PushSubSize:
case PushProgramSize:
case PushLibraryAddress:
+ case PushDeployTimeAddress:
return 1;
case Tag:
return 0;
@@ -119,6 +121,7 @@ bool AssemblyItem::canBeFunctional() const
case PushSubSize:
case PushProgramSize:
case PushLibraryAddress:
+ case PushDeployTimeAddress:
return true;
case Tag:
return false;
@@ -190,6 +193,9 @@ string AssemblyItem::toAssemblyText() const
case PushLibraryAddress:
text = string("linkerSymbol(\"") + toHex(data()) + string("\")");
break;
+ case PushDeployTimeAddress:
+ text = string("deployTimeAddress()");
+ break;
case UndefinedItem:
assertThrow(false, AssemblyException, "Invalid assembly item.");
break;
@@ -252,6 +258,9 @@ ostream& dev::eth::operator<<(ostream& _out, AssemblyItem const& _item)
_out << " PushLibraryAddress " << hash.substr(0, 8) + "..." + hash.substr(hash.length() - 8);
break;
}
+ case PushDeployTimeAddress:
+ _out << " PushDeployTimeAddress";
+ break;
case UndefinedItem:
_out << " ???";
break;