aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-04-12 01:24:38 +0800
committerchriseth <chris@ethereum.org>2017-04-25 22:49:03 +0800
commit34717838da875c5265f005bb92c3349c08063ba5 (patch)
tree4fbd69879a891dd5ff13c79ffb71f26e6e9bc8aa /libsolidity
parent83bf34c571023cb264c56b3bd791a6fd9ebc3bf2 (diff)
downloaddexon-solidity-34717838da875c5265f005bb92c3349c08063ba5.tar
dexon-solidity-34717838da875c5265f005bb92c3349c08063ba5.tar.gz
dexon-solidity-34717838da875c5265f005bb92c3349c08063ba5.tar.bz2
dexon-solidity-34717838da875c5265f005bb92c3349c08063ba5.tar.lz
dexon-solidity-34717838da875c5265f005bb92c3349c08063ba5.tar.xz
dexon-solidity-34717838da875c5265f005bb92c3349c08063ba5.tar.zst
dexon-solidity-34717838da875c5265f005bb92c3349c08063ba5.zip
Review comments.
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
{