diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-11-10 03:21:26 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-11-13 06:43:16 +0800 |
commit | 74557ceb0e520838d3e3a580cc30671a9c274ca7 (patch) | |
tree | 1015ebc5d46f250d314aaf80a849aaf0eae47882 /test | |
parent | 09f8ff27fc576dbbd05e31471bb39c00abe90563 (diff) | |
download | dexon-solidity-74557ceb0e520838d3e3a580cc30671a9c274ca7.tar.gz dexon-solidity-74557ceb0e520838d3e3a580cc30671a9c274ca7.tar.zst dexon-solidity-74557ceb0e520838d3e3a580cc30671a9c274ca7.zip |
Deterministic YulStringRepository using string hashes.
Diffstat (limited to 'test')
-rw-r--r-- | test/libyul/Inliner.cpp | 6 | ||||
-rw-r--r-- | test/libyul/YulOptimizerTest.cpp | 2 | ||||
-rw-r--r-- | test/libyul/yulOptimizerTests/fullInliner/multi_fun_callback.yul | 13 |
3 files changed, 10 insertions, 11 deletions
diff --git a/test/libyul/Inliner.cpp b/test/libyul/Inliner.cpp index 4ed52b47..66810298 100644 --- a/test/libyul/Inliner.cpp +++ b/test/libyul/Inliner.cpp @@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE(simple) BOOST_CHECK_EQUAL(inlinableFunctions("{" "function g(a:u256) -> b:u256 { b := a }" "function f() -> x:u256 { x := g(2:u256) }" - "}"), "f,g"); + "}"), "g,f"); } BOOST_AUTO_TEST_CASE(simple_inside_structures) @@ -82,7 +82,7 @@ BOOST_AUTO_TEST_CASE(simple_inside_structures) "function g(a:u256) -> b:u256 { b := a }" "function f() -> x:u256 { x := g(2:u256) }" "}" - "}"), "f,g"); + "}"), "g,f"); BOOST_CHECK_EQUAL(inlinableFunctions("{" "for {" "function g(a:u256) -> b:u256 { b := a }" @@ -92,7 +92,7 @@ BOOST_AUTO_TEST_CASE(simple_inside_structures) "{" "function h() -> y:u256 { y := 2:u256 }" "}" - "}"), "f,g,h"); + "}"), "h,g,f"); } BOOST_AUTO_TEST_CASE(negative) diff --git a/test/libyul/YulOptimizerTest.cpp b/test/libyul/YulOptimizerTest.cpp index 162b167c..03cd6446 100644 --- a/test/libyul/YulOptimizerTest.cpp +++ b/test/libyul/YulOptimizerTest.cpp @@ -90,8 +90,6 @@ YulOptimizerTest::YulOptimizerTest(string const& _filename) bool YulOptimizerTest::run(ostream& _stream, string const& _linePrefix, bool const _formatted) { - yul::YulStringRepository::instance().reset(); - assembly::AsmPrinter printer{m_yul}; shared_ptr<Block> ast; shared_ptr<assembly::AsmAnalysisInfo> analysisInfo; diff --git a/test/libyul/yulOptimizerTests/fullInliner/multi_fun_callback.yul b/test/libyul/yulOptimizerTests/fullInliner/multi_fun_callback.yul index d09877de..19ac945e 100644 --- a/test/libyul/yulOptimizerTests/fullInliner/multi_fun_callback.yul +++ b/test/libyul/yulOptimizerTests/fullInliner/multi_fun_callback.yul @@ -41,18 +41,19 @@ // h_t := 2 // mstore(7, h_t) // let g_x_1 := 10 -// f(1) +// let g_f_x_8 := 1 +// mstore(0, g_f_x_8) +// mstore(7, h()) +// g(10) +// mstore(1, g_f_x_8) // mstore(1, x) // } // function g(x_1) // { // let f_x_8 := 1 // mstore(0, f_x_8) -// let f_h_t -// f_h_t := 2 -// mstore(7, f_h_t) -// let f_g_x_1 := 10 -// f(1) +// mstore(7, h()) +// g(10) // mstore(1, f_x_8) // } // function h() -> t |