aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/codegen/CompilerContext.cpp6
-rw-r--r--libsolidity/codegen/ContractCompiler.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp
index 977e6c81..51dd9fd2 100644
--- a/libsolidity/codegen/CompilerContext.cpp
+++ b/libsolidity/codegen/CompilerContext.cpp
@@ -270,7 +270,8 @@ void CompilerContext::appendInlineAssembly(
identifierAccess.resolve = [&](
assembly::Identifier const& _identifier,
assembly::IdentifierContext
- ) {
+ )
+ {
auto it = std::find(_localVariables.begin(), _localVariables.end(), _identifier.name);
return it == _localVariables.end() ? size_t(-1) : 1;
};
@@ -278,7 +279,8 @@ void CompilerContext::appendInlineAssembly(
assembly::Identifier const& _identifier,
assembly::IdentifierContext _context,
eth::Assembly& _assembly
- ) {
+ )
+ {
auto it = std::find(_localVariables.begin(), _localVariables.end(), _identifier.name);
solAssert(it != _localVariables.end(), "");
unsigned stackDepth = _localVariables.end() - it;
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp
index c035bd1f..de53f182 100644
--- a/libsolidity/codegen/ContractCompiler.cpp
+++ b/libsolidity/codegen/ContractCompiler.cpp
@@ -538,6 +538,7 @@ bool ContractCompiler::visit(InlineAssembly const& _inlineAssembly)
solAssert(!!decl, "");
if (_context == assembly::IdentifierContext::RValue)
{
+ int const depositBefore = _assembly.deposit();
solAssert(!!decl->type(), "Type of declaration required but not yet determined.");
if (FunctionDefinition const* functionDef = dynamic_cast<FunctionDefinition const*>(decl))
{
@@ -591,6 +592,7 @@ bool ContractCompiler::visit(InlineAssembly const& _inlineAssembly)
}
else
solAssert(false, "Invalid declaration type.");
+ solAssert(_assembly.deposit() - depositBefore == ref->second.valueSize, "");
}
else
{