aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerUtils.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-02-12 22:01:38 +0800
committerChristian <c@ethdev.com>2015-02-12 22:01:38 +0800
commit5e40b7942689ffa5777ee88fe90d424608027656 (patch)
tree653526635bfaa4687842c9f81b5ed2e02bcf21bd /CompilerUtils.cpp
parent5673f994fc5b035f7583bcc857ac93ecf86b4f65 (diff)
downloaddexon-solidity-5e40b7942689ffa5777ee88fe90d424608027656.tar
dexon-solidity-5e40b7942689ffa5777ee88fe90d424608027656.tar.gz
dexon-solidity-5e40b7942689ffa5777ee88fe90d424608027656.tar.bz2
dexon-solidity-5e40b7942689ffa5777ee88fe90d424608027656.tar.lz
dexon-solidity-5e40b7942689ffa5777ee88fe90d424608027656.tar.xz
dexon-solidity-5e40b7942689ffa5777ee88fe90d424608027656.tar.zst
dexon-solidity-5e40b7942689ffa5777ee88fe90d424608027656.zip
Bytes type cleanup.
Diffstat (limited to 'CompilerUtils.cpp')
-rw-r--r--CompilerUtils.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/CompilerUtils.cpp b/CompilerUtils.cpp
index 192d66d5..73be3817 100644
--- a/CompilerUtils.cpp
+++ b/CompilerUtils.cpp
@@ -184,17 +184,14 @@ void CompilerUtils::copyByteArrayToStorage(ByteArrayType const& _targetType,
<< eth::Instruction::SWAP1;
// stack here: target_ref target_data_end target_data_ref
// store length (in bytes)
- if (_sourceType.getOffset() == 0)
- m_context << eth::Instruction::CALLDATASIZE;
- else
- m_context << _sourceType.getOffset() << eth::Instruction::CALLDATASIZE << eth::Instruction::SUB;
+ m_context << eth::Instruction::CALLDATASIZE;
m_context << eth::Instruction::DUP1 << eth::Instruction::DUP5 << eth::Instruction::SSTORE;
// jump to end if length is zero
m_context << eth::Instruction::ISZERO;
eth::AssemblyItem copyLoopEnd = m_context.newTag();
m_context.appendConditionalJumpTo(copyLoopEnd);
-
- m_context << _sourceType.getOffset();
+ // store start offset
+ m_context << u256(0);
// stack now: target_ref target_data_end target_data_ref calldata_offset
eth::AssemblyItem copyLoopStart = m_context.newTag();
m_context << copyLoopStart