aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerContext.cpp
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-12-13 05:39:47 +0800
committerGitHub <noreply@github.com>2016-12-13 05:39:47 +0800
commit1c3605362d6018f5ab72cc84c7511fb49c15d126 (patch)
tree0dd967a78fc37b9efc49fb7f71578a0fb52432f0 /libsolidity/codegen/CompilerContext.cpp
parentc111d6e27e7a951d49e587d0984fc8c24898c18f (diff)
parent81d7e0233aa24a2d38103b2bf746cef5eb12a893 (diff)
downloaddexon-solidity-1c3605362d6018f5ab72cc84c7511fb49c15d126.tar.gz
dexon-solidity-1c3605362d6018f5ab72cc84c7511fb49c15d126.tar.zst
dexon-solidity-1c3605362d6018f5ab72cc84c7511fb49c15d126.zip
Merge pull request #1468 from ethereum/memcpy-assembly
Implement memcpy without the identity precompile
Diffstat (limited to 'libsolidity/codegen/CompilerContext.cpp')
-rw-r--r--libsolidity/codegen/CompilerContext.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp
index 2de5a3ec..c14ab845 100644
--- a/libsolidity/codegen/CompilerContext.cpp
+++ b/libsolidity/codegen/CompilerContext.cpp
@@ -202,6 +202,8 @@ void CompilerContext::appendInlineAssembly(
return false;
unsigned stackDepth = _localVariables.end() - it;
int stackDiff = _assembly.deposit() - startStackHeight + stackDepth;
+ if (_context == assembly::CodeGenerator::IdentifierContext::LValue)
+ stackDiff -= 1;
if (stackDiff < 1 || stackDiff > 16)
BOOST_THROW_EXCEPTION(
CompilerError() <<
@@ -217,7 +219,7 @@ void CompilerContext::appendInlineAssembly(
return true;
};
- solAssert(assembly::InlineAssemblyStack().parseAndAssemble(*assembly, *m_asm, identifierAccess), "");
+ solAssert(assembly::InlineAssemblyStack().parseAndAssemble(*assembly, *m_asm, identifierAccess), "Failed to assemble inline assembly block.");
}
FunctionDefinition const& CompilerContext::resolveVirtualFunction(