diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2016-12-13 05:39:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-13 05:39:47 +0800 |
commit | 1c3605362d6018f5ab72cc84c7511fb49c15d126 (patch) | |
tree | 0dd967a78fc37b9efc49fb7f71578a0fb52432f0 /libsolidity/codegen/CompilerContext.cpp | |
parent | c111d6e27e7a951d49e587d0984fc8c24898c18f (diff) | |
parent | 81d7e0233aa24a2d38103b2bf746cef5eb12a893 (diff) | |
download | dexon-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.cpp | 4 |
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( |