aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorErik Kundt <bitshift@posteo.org>2018-04-05 00:21:06 +0800
committerErik Kundt <bitshift@posteo.org>2018-05-30 23:40:33 +0800
commit34b5eca1f8d9a8f04db20139601c6e944532f4e4 (patch)
tree50fde575d924b818be031b43515cd95caaf3aade /libsolidity/codegen/ExpressionCompiler.cpp
parent7156a01acc822ab66c189435421564afc8b1c922 (diff)
downloaddexon-solidity-34b5eca1f8d9a8f04db20139601c6e944532f4e4.tar.gz
dexon-solidity-34b5eca1f8d9a8f04db20139601c6e944532f4e4.tar.zst
dexon-solidity-34b5eca1f8d9a8f04db20139601c6e944532f4e4.zip
Improves assembly and adds more tests.
Diffstat (limited to 'libsolidity/codegen/ExpressionCompiler.cpp')
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index ac7610fc..93d440c8 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -866,7 +866,6 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
StorageByteArrayElement(m_context).storeValue(*type, _functionCall.location(), true);
break;
}
- case FunctionType::Kind::ByteArrayPop:
case FunctionType::Kind::ArrayPop:
{
_functionCall.expression().accept(*this);
@@ -1359,22 +1358,13 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
break;
}
}
- else if (member == "push")
+ else if (member == "push" || member == "pop")
{
solAssert(
type.isDynamicallySized() &&
type.location() == DataLocation::Storage &&
type.category() == Type::Category::Array,
- "Tried to use .push() on a non-dynamically sized array"
- );
- }
- else if (member == "pop")
- {
- solAssert(
- type.isDynamicallySized() &&
- type.location() == DataLocation::Storage &&
- type.category() == Type::Category::Array,
- "Tried to use .pop() on a non-dynamically sized array"
+ "Tried to use ." + member + "() on a non-dynamically sized array"
);
}
else