diff options
author | chriseth <chris@ethereum.org> | 2017-05-27 01:30:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-27 01:30:42 +0800 |
commit | 788b64ea6181af6e7e364e86d64508c4809ca9b7 (patch) | |
tree | 2a136a342d6f8980f96043b0f6ce74828f89fdd6 /libsolidity/codegen/CompilerContext.cpp | |
parent | e022f11cdb752a07b6c0f824f3e4f91233a19359 (diff) | |
parent | fe32531a16322c9528c34cfbd32924b4c24a1f13 (diff) | |
download | dexon-solidity-788b64ea6181af6e7e364e86d64508c4809ca9b7.tar dexon-solidity-788b64ea6181af6e7e364e86d64508c4809ca9b7.tar.gz dexon-solidity-788b64ea6181af6e7e364e86d64508c4809ca9b7.tar.bz2 dexon-solidity-788b64ea6181af6e7e364e86d64508c4809ca9b7.tar.lz dexon-solidity-788b64ea6181af6e7e364e86d64508c4809ca9b7.tar.xz dexon-solidity-788b64ea6181af6e7e364e86d64508c4809ca9b7.tar.zst dexon-solidity-788b64ea6181af6e7e364e86d64508c4809ca9b7.zip |
Merge pull request #2291 from ethereum/evm15
Allow different assembly types and target machines.
Diffstat (limited to 'libsolidity/codegen/CompilerContext.cpp')
-rw-r--r-- | libsolidity/codegen/CompilerContext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp index 5c4f88c4..404a3af6 100644 --- a/libsolidity/codegen/CompilerContext.cpp +++ b/libsolidity/codegen/CompilerContext.cpp @@ -266,10 +266,10 @@ void CompilerContext::appendInlineAssembly( int startStackHeight = stackHeight(); - assembly::ExternalIdentifierAccess identifierAccess; + julia::ExternalIdentifierAccess identifierAccess; identifierAccess.resolve = [&]( assembly::Identifier const& _identifier, - assembly::IdentifierContext + julia::IdentifierContext ) { auto it = std::find(_localVariables.begin(), _localVariables.end(), _identifier.name); @@ -277,7 +277,7 @@ void CompilerContext::appendInlineAssembly( }; identifierAccess.generateCode = [&]( assembly::Identifier const& _identifier, - assembly::IdentifierContext _context, + julia::IdentifierContext _context, julia::AbstractAssembly& _assembly ) { @@ -285,14 +285,14 @@ void CompilerContext::appendInlineAssembly( solAssert(it != _localVariables.end(), ""); int stackDepth = _localVariables.end() - it; int stackDiff = _assembly.stackHeight() - startStackHeight + stackDepth; - if (_context == assembly::IdentifierContext::LValue) + if (_context == julia::IdentifierContext::LValue) stackDiff -= 1; if (stackDiff < 1 || stackDiff > 16) BOOST_THROW_EXCEPTION( CompilerError() << errinfo_comment("Stack too deep (" + to_string(stackDiff) + "), try removing local variables.") ); - if (_context == assembly::IdentifierContext::RValue) + if (_context == julia::IdentifierContext::RValue) _assembly.appendInstruction(dupInstruction(stackDiff)); else { |