mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adding vardecl optimization for boolean types
This commit is contained in:
committed by
chriseth
parent
e75cace78d
commit
a52c9af5b9
@@ -111,6 +111,8 @@ YulOptimizerTest::YulOptimizerTest(string const& _filename)
|
||||
m_dialect = &WasmDialect::instance();
|
||||
else if (dialectName == "evm")
|
||||
m_dialect = &EVMDialect::strictAssemblyForEVMObjects(solidity::test::CommonOptions::get().evmVersion());
|
||||
else if (dialectName == "evmTyped")
|
||||
m_dialect = &EVMDialectTyped::instance(solidity::test::CommonOptions::get().evmVersion());
|
||||
else
|
||||
BOOST_THROW_EXCEPTION(runtime_error("Invalid dialect " + dialectName));
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
let a1
|
||||
let a2: bool
|
||||
let b1, b2: bool
|
||||
function f(a:u256, b:u256, c:bool) -> r:bool, t {
|
||||
let x1: bool, x2
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// dialect: evmTyped
|
||||
// step: varDeclInitializer
|
||||
// ----
|
||||
// {
|
||||
// let a1 := 0
|
||||
// let a2:bool := false
|
||||
// let b1 := 0
|
||||
// let b2:bool := false
|
||||
// function f(a, b, c:bool) -> r:bool, t
|
||||
// {
|
||||
// let x1:bool := false
|
||||
// let x2 := 0
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user