Store small byte arrays and strings in storage in one slot with their

length.
This commit is contained in:
chriseth
2015-10-02 13:12:23 +02:00
parent cae8db989a
commit da408640ca
5 changed files with 339 additions and 50 deletions
+3 -3
View File
@@ -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