aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/ContractCompiler.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-11-30 04:02:32 +0800
committerGitHub <noreply@github.com>2017-11-30 04:02:32 +0800
commit07591478dd78dee56c5b83a62a314e984c3a83a6 (patch)
tree0cfaaea815595dac131aebc27e616e8f786b0da5 /libsolidity/codegen/ContractCompiler.cpp
parentaebf72c2c5315674af18e6016b6c85ce0e63fb31 (diff)
parent9d8e3ff395006c0c6285f70c13bd470e9374bda3 (diff)
downloaddexon-solidity-07591478dd78dee56c5b83a62a314e984c3a83a6.tar
dexon-solidity-07591478dd78dee56c5b83a62a314e984c3a83a6.tar.gz
dexon-solidity-07591478dd78dee56c5b83a62a314e984c3a83a6.tar.bz2
dexon-solidity-07591478dd78dee56c5b83a62a314e984c3a83a6.tar.lz
dexon-solidity-07591478dd78dee56c5b83a62a314e984c3a83a6.tar.xz
dexon-solidity-07591478dd78dee56c5b83a62a314e984c3a83a6.tar.zst
dexon-solidity-07591478dd78dee56c5b83a62a314e984c3a83a6.zip
Merge pull request #2863 from ethereum/structDecoder
ABI decoder
Diffstat (limited to 'libsolidity/codegen/ContractCompiler.cpp')
-rw-r--r--libsolidity/codegen/ContractCompiler.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp
index 74565ae4..a81ba518 100644
--- a/libsolidity/codegen/ContractCompiler.cpp
+++ b/libsolidity/codegen/ContractCompiler.cpp
@@ -322,6 +322,15 @@ void ContractCompiler::appendCalldataUnpacker(TypePointers const& _typeParameter
{
// We do not check the calldata size, everything is zero-padded
+ if (m_context.experimentalFeatureActive(ExperimentalFeature::ABIEncoderV2))
+ {
+ // Use the new JULIA-based decoding function
+ auto stackHeightBefore = m_context.stackHeight();
+ CompilerUtils(m_context).abiDecodeV2(_typeParameters, _fromMemory);
+ solAssert(m_context.stackHeight() - stackHeightBefore == CompilerUtils(m_context).sizeOnStack(_typeParameters) - 1, "");
+ return;
+ }
+
//@todo this does not yet support nested dynamic arrays
// Retain the offset pointer as base_offset, the point from which the data offsets are computed.