diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2016-12-14 21:20:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-14 21:20:27 +0800 |
commit | e53d12557162275a135a4ae086ae05691bc23fa3 (patch) | |
tree | 50105c5f31f40ce8405319c37ccf93911d56c370 /libsolidity/codegen/CompilerUtils.cpp | |
parent | 9d60734549f6188884bec278208cab0af9c9735e (diff) | |
parent | 0e0d5d47c0bb3edbc1558679c678ce9178a80cb9 (diff) | |
download | dexon-solidity-e53d12557162275a135a4ae086ae05691bc23fa3.tar dexon-solidity-e53d12557162275a135a4ae086ae05691bc23fa3.tar.gz dexon-solidity-e53d12557162275a135a4ae086ae05691bc23fa3.tar.bz2 dexon-solidity-e53d12557162275a135a4ae086ae05691bc23fa3.tar.lz dexon-solidity-e53d12557162275a135a4ae086ae05691bc23fa3.tar.xz dexon-solidity-e53d12557162275a135a4ae086ae05691bc23fa3.tar.zst dexon-solidity-e53d12557162275a135a4ae086ae05691bc23fa3.zip |
Merge pull request #1507 from ethereum/memcopystyle
Renamed padToWordBoundaries -> padToWords
Diffstat (limited to 'libsolidity/codegen/CompilerUtils.cpp')
-rw-r--r-- | libsolidity/codegen/CompilerUtils.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp index da2e78e8..7d382aba 100644 --- a/libsolidity/codegen/CompilerUtils.cpp +++ b/libsolidity/codegen/CompilerUtils.cpp @@ -952,9 +952,9 @@ void CompilerUtils::storeStringData(bytesConstRef _data) } } -unsigned CompilerUtils::loadFromMemoryHelper(Type const& _type, bool _fromCalldata, bool _padToWordBoundaries) +unsigned CompilerUtils::loadFromMemoryHelper(Type const& _type, bool _fromCalldata, bool _padToWords) { - unsigned numBytes = _type.calldataEncodedSize(_padToWordBoundaries); + unsigned numBytes = _type.calldataEncodedSize(_padToWords); bool isExternalFunctionType = false; if (auto const* funType = dynamic_cast<FunctionType const*>(&_type)) if (funType->location() == FunctionType::Location::External) @@ -993,9 +993,9 @@ void CompilerUtils::cleanHigherOrderBits(IntegerType const& _typeOnStack) m_context << ((u256(1) << _typeOnStack.numBits()) - 1) << Instruction::AND; } -unsigned CompilerUtils::prepareMemoryStore(Type const& _type, bool _padToWordBoundaries) +unsigned CompilerUtils::prepareMemoryStore(Type const& _type, bool _padToWords) { - unsigned numBytes = _type.calldataEncodedSize(_padToWordBoundaries); + unsigned numBytes = _type.calldataEncodedSize(_padToWords); bool leftAligned = _type.category() == Type::Category::FixedBytes; if (numBytes == 0) m_context << Instruction::POP; @@ -1003,7 +1003,7 @@ unsigned CompilerUtils::prepareMemoryStore(Type const& _type, bool _padToWordBou { solAssert(numBytes <= 32, "Memory store of more than 32 bytes requested."); convertType(_type, _type, true); - if (numBytes != 32 && !leftAligned && !_padToWordBoundaries) + if (numBytes != 32 && !leftAligned && !_padToWords) // shift the value accordingly before storing m_context << (u256(1) << ((32 - numBytes) * 8)) << Instruction::MUL; } |