mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Store small byte arrays and strings in storage in one slot with their
length.
This commit is contained in:
@@ -435,9 +435,9 @@ StorageArrayLength::StorageArrayLength(CompilerContext& _compilerContext, const
|
||||
|
||||
void StorageArrayLength::retrieveValue(SourceLocation const&, bool _remove) const
|
||||
{
|
||||
if (!_remove)
|
||||
m_context << eth::Instruction::DUP1;
|
||||
m_context << eth::Instruction::SLOAD;
|
||||
ArrayUtils(m_context).retrieveLength(m_arrayType);
|
||||
if (_remove)
|
||||
m_context << eth::Instruction::SWAP1 << eth::Instruction::POP;
|
||||
}
|
||||
|
||||
void StorageArrayLength::storeValue(Type const&, SourceLocation const&, bool _move) const
|
||||
|
||||
Reference in New Issue
Block a user