aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AST.cpp2
-rw-r--r--CompilerUtils.cpp3
-rw-r--r--LValue.cpp2
3 files changed, 3 insertions, 4 deletions
diff --git a/AST.cpp b/AST.cpp
index 79b755e9..46c44995 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -671,7 +671,7 @@ void IndexAccess::checkTypeRequirements()
BOOST_THROW_EXCEPTION(createTypeError("Index expression cannot be omitted."));
m_index->expectType(IntegerType(256));
if (type.isByteArray())
- m_type = make_shared<IntegerType>(8, IntegerType::Modifier::Hash);
+ m_type = make_shared<FixedBytesType>(1);
else
m_type = type.getBaseType();
m_isLValue = type.getLocation() != ArrayType::Location::CallData;
diff --git a/CompilerUtils.cpp b/CompilerUtils.cpp
index e11b6b4f..7b078e03 100644
--- a/CompilerUtils.cpp
+++ b/CompilerUtils.cpp
@@ -177,8 +177,7 @@ void CompilerUtils::computeHashStatic(Type const& _type, bool _padToWordBoundari
unsigned CompilerUtils::loadFromMemoryHelper(Type const& _type, bool _fromCalldata, bool _padToWordBoundaries)
{
- unsigned _encodedSize = _type.getCalldataEncodedSize();
- unsigned numBytes = _padToWordBoundaries ? getPaddedSize(_encodedSize) : _encodedSize;
+ unsigned numBytes = _type.getCalldataEncodedSize(_padToWordBoundaries);
bool leftAligned = _type.getCategory() == Type::Category::FixedBytes;
if (numBytes == 0)
m_context << eth::Instruction::POP << u256(0);
diff --git a/LValue.cpp b/LValue.cpp
index a036be80..db3cd56b 100644
--- a/LValue.cpp
+++ b/LValue.cpp
@@ -234,7 +234,7 @@ void StorageItem::setToZero(SourceLocation const&, bool _removeReference) const
}
/// Used in StorageByteArrayElement
-static IntegerType byteType(8, IntegerType::Modifier::Hash);
+static FixedBytesType byteType(1);
StorageByteArrayElement::StorageByteArrayElement(CompilerContext& _compilerContext):
LValue(_compilerContext, byteType)