diff options
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r-- | ExpressionCompiler.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp index 05835818..d949265d 100644 --- a/ExpressionCompiler.cpp +++ b/ExpressionCompiler.cpp @@ -714,7 +714,6 @@ void ExpressionCompiler::endVisit(MemberAccess const& _memberAccess) { case DataLocation::Storage: { - m_context << eth::Instruction::POP; // structs always align to new slot pair<u256, unsigned> const& offsets = type.getStorageOffsetsOfMember(member); m_context << offsets.first << eth::Instruction::ADD << u256(offsets.second); setLValueToStorageItem(_memberAccess); @@ -792,8 +791,6 @@ bool ExpressionCompiler::visit(IndexAccess const& _indexAccess) Type const& baseType = *_indexAccess.getBaseExpression().getType(); if (baseType.getCategory() == Type::Category::Mapping) { - // storage byte offset is ignored for mappings, it should be zero. - m_context << eth::Instruction::POP; // stack: storage_base_ref Type const& keyType = *dynamic_cast<MappingType const&>(baseType).getKeyType(); m_context << u256(0); // memory position @@ -812,10 +809,6 @@ bool ExpressionCompiler::visit(IndexAccess const& _indexAccess) ArrayType const& arrayType = dynamic_cast<ArrayType const&>(baseType); solAssert(_indexAccess.getIndexExpression(), "Index expression expected."); - // remove storage byte offset - if (arrayType.location() == DataLocation::Storage) - m_context << eth::Instruction::POP; - _indexAccess.getIndexExpression()->accept(*this); // stack layout: <base_ref> [<length>] <index> ArrayUtils(m_context).accessIndex(arrayType); |