diff options
author | Gav Wood <i@gavwood.com> | 2015-06-13 15:26:02 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-06-13 15:26:02 +0800 |
commit | 5e3fcb7346e81aa11701861cef4d6dc0da27e7b8 (patch) | |
tree | 7982f28a76d6ae1de87b6110f47b66b6c80ff6cd | |
parent | 39e0029d18471a1c9d327f22dbe56fb13f71b668 (diff) | |
parent | 91a72076164793ced6887d8c65eb73a265689999 (diff) | |
download | dexon-solidity-5e3fcb7346e81aa11701861cef4d6dc0da27e7b8.tar.gz dexon-solidity-5e3fcb7346e81aa11701861cef4d6dc0da27e7b8.tar.zst dexon-solidity-5e3fcb7346e81aa11701861cef4d6dc0da27e7b8.zip |
Merge branch 'develop' of github.com:ethereum/cpp-ethereum into develop
-rw-r--r-- | TestHelper.cpp | 2 | ||||
-rw-r--r-- | libsolidity/SolidityOptimizer.cpp | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp index 873ea21e..733ccb6d 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -352,6 +352,8 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost) BOOST_CHECK_MESSAGE((m_TestObject["out"].get_str() == m_TestObject["expectOut"].get_str()), warning); else BOOST_WARN_MESSAGE((m_TestObject["out"].get_str() == m_TestObject["expectOut"].get_str()), warning); + + m_TestObject.erase(m_TestObject.find("expectOut")); } // export logs diff --git a/libsolidity/SolidityOptimizer.cpp b/libsolidity/SolidityOptimizer.cpp index 397ee631..85a88c03 100644 --- a/libsolidity/SolidityOptimizer.cpp +++ b/libsolidity/SolidityOptimizer.cpp @@ -944,6 +944,14 @@ BOOST_AUTO_TEST_CASE(cse_access_previous_sequence) // 0, SLOAD, 1, ADD, SSTORE, 0 SLOAD } +BOOST_AUTO_TEST_CASE(cse_optimise_return) +{ + checkCSE( + AssemblyItems{u256(0), u256(7), Instruction::RETURN}, + AssemblyItems{Instruction::STOP} + ); +} + BOOST_AUTO_TEST_CASE(control_flow_graph_remove_unused) { // remove parts of the code that are unused |