diff options
author | chriseth <chris@ethereum.org> | 2017-03-16 01:07:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-16 01:07:52 +0800 |
commit | f0d539ae05739e35336cc9cc8f44bd9798a95c28 (patch) | |
tree | 13ef1dea012c7f093122d5e7578dc3c893636e59 /libsolidity/codegen/ContractCompiler.cpp | |
parent | 364da425d3116a4b85863df39a1864340861d71e (diff) | |
parent | 59099908c53129b2f5723bd0d5283c4da089e398 (diff) | |
download | dexon-solidity-f0d539ae05739e35336cc9cc8f44bd9798a95c28.tar dexon-solidity-f0d539ae05739e35336cc9cc8f44bd9798a95c28.tar.gz dexon-solidity-f0d539ae05739e35336cc9cc8f44bd9798a95c28.tar.bz2 dexon-solidity-f0d539ae05739e35336cc9cc8f44bd9798a95c28.tar.lz dexon-solidity-f0d539ae05739e35336cc9cc8f44bd9798a95c28.tar.xz dexon-solidity-f0d539ae05739e35336cc9cc8f44bd9798a95c28.tar.zst dexon-solidity-f0d539ae05739e35336cc9cc8f44bd9798a95c28.zip |
Merge pull request #1782 from ethereum/develop
Solidity 0.4.10
Diffstat (limited to 'libsolidity/codegen/ContractCompiler.cpp')
-rw-r--r-- | libsolidity/codegen/ContractCompiler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index 4d33927d..6524bd03 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -42,7 +42,7 @@ class StackHeightChecker public: StackHeightChecker(CompilerContext const& _context): m_context(_context), stackHeight(m_context.stackHeight()) {} - void check() { solAssert(m_context.stackHeight() == stackHeight, "I sense a disturbance in the stack."); } + void check() { solAssert(m_context.stackHeight() == stackHeight, std::string("I sense a disturbance in the stack: ") + std::to_string(m_context.stackHeight()) + " vs " + std::to_string(stackHeight)); } private: CompilerContext const& m_context; unsigned stackHeight; @@ -762,7 +762,9 @@ bool ContractCompiler::visit(Return const& _return) bool ContractCompiler::visit(Throw const& _throw) { CompilerContext::LocationSetter locationSetter(m_context, _throw); - m_context.appendJumpTo(m_context.errorTag()); + // Do not send back an error detail. + m_context << u256(0) << u256(0); + m_context << Instruction::REVERT; return false; } |