diff options
author | chriseth <chris@ethereum.org> | 2018-10-10 21:15:38 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-10-11 22:59:57 +0800 |
commit | 6e32a1becb90728f3a3bcbbc83a8e6c94f5e000c (patch) | |
tree | aaf5abdda5e081ab6eac3ecee6c98d5231f4b5a6 /test/libjulia/yulOptimizerTests/disambiguator | |
parent | 4607118d2e9bbf59707b48f177aff54ac99163b8 (diff) | |
download | dexon-solidity-6e32a1becb90728f3a3bcbbc83a8e6c94f5e000c.tar.gz dexon-solidity-6e32a1becb90728f3a3bcbbc83a8e6c94f5e000c.tar.zst dexon-solidity-6e32a1becb90728f3a3bcbbc83a8e6c94f5e000c.zip |
Disambiguator tests.
Diffstat (limited to 'test/libjulia/yulOptimizerTests/disambiguator')
9 files changed, 159 insertions, 0 deletions
diff --git a/test/libjulia/yulOptimizerTests/disambiguator/for_statement.yul b/test/libjulia/yulOptimizerTests/disambiguator/for_statement.yul new file mode 100644 index 00000000..0d2a38c5 --- /dev/null +++ b/test/libjulia/yulOptimizerTests/disambiguator/for_statement.yul @@ -0,0 +1,28 @@ +// yul +{ + { let a:u256, b:u256 } + { + for { let a:u256 } a { a := a } { + let b:u256 := a + } + } +} +// ---- +// disambiguator +// { +// { +// let a:u256, b:u256 +// } +// { +// for { +// let a_1:u256 +// } +// a_1 +// { +// a_1 := a_1 +// } +// { +// let b_1:u256 := a_1 +// } +// } +// } diff --git a/test/libjulia/yulOptimizerTests/disambiguator/funtion_call.yul b/test/libjulia/yulOptimizerTests/disambiguator/funtion_call.yul new file mode 100644 index 00000000..f917bb68 --- /dev/null +++ b/test/libjulia/yulOptimizerTests/disambiguator/funtion_call.yul @@ -0,0 +1,22 @@ +// yul +{ + { let a:u256, b:u256, c:u256, d:u256, f:u256 } + { + function f(a:u256) -> c:u256, d:u256 { + let b:u256, c_1:u256 := f(a) + } + } +} +// ---- +// disambiguator +// { +// { +// let a:u256, b:u256, c:u256, d:u256, f:u256 +// } +// { +// function f_1(a_1:u256) -> c_1:u256, d_1:u256 +// { +// let b_1:u256, c_1_1:u256 := f_1(a_1) +// } +// } +// } diff --git a/test/libjulia/yulOptimizerTests/disambiguator/if_statement.yul b/test/libjulia/yulOptimizerTests/disambiguator/if_statement.yul new file mode 100644 index 00000000..14f53757 --- /dev/null +++ b/test/libjulia/yulOptimizerTests/disambiguator/if_statement.yul @@ -0,0 +1,22 @@ +// yul +{ + { let a:u256, b:u256, c:u256 } + { + let a:bool + if a { let b:bool := a } + } +} +// ---- +// disambiguator +// { +// { +// let a:u256, b:u256, c:u256 +// } +// { +// let a_1:bool +// if a_1 +// { +// let b_1:bool := a_1 +// } +// } +// } diff --git a/test/libjulia/yulOptimizerTests/disambiguator/smoke.yul b/test/libjulia/yulOptimizerTests/disambiguator/smoke.yul new file mode 100644 index 00000000..d6cd8a61 --- /dev/null +++ b/test/libjulia/yulOptimizerTests/disambiguator/smoke.yul @@ -0,0 +1,5 @@ +{ } +// ---- +// disambiguator +// { +// } diff --git a/test/libjulia/yulOptimizerTests/disambiguator/smoke_yul.yul b/test/libjulia/yulOptimizerTests/disambiguator/smoke_yul.yul new file mode 100644 index 00000000..e55f4cd3 --- /dev/null +++ b/test/libjulia/yulOptimizerTests/disambiguator/smoke_yul.yul @@ -0,0 +1,6 @@ +// yul +{ } +// ---- +// disambiguator +// { +// } diff --git a/test/libjulia/yulOptimizerTests/disambiguator/switch_statement.yul b/test/libjulia/yulOptimizerTests/disambiguator/switch_statement.yul new file mode 100644 index 00000000..340ecccf --- /dev/null +++ b/test/libjulia/yulOptimizerTests/disambiguator/switch_statement.yul @@ -0,0 +1,27 @@ +// yul +{ + { let a:u256, b:u256, c:u256 } + { + let a:u256 + switch a + case 0:u256 { let b:u256 := a } + default { let c:u256 := a } + } +} +// ---- +// disambiguator +// { +// { +// let a:u256, b:u256, c:u256 +// } +// { +// let a_1:u256 +// switch a_1 +// case 0:u256 { +// let b_1:u256 := a_1 +// } +// default { +// let c_1:u256 := a_1 +// } +// } +// } diff --git a/test/libjulia/yulOptimizerTests/disambiguator/variables.yul b/test/libjulia/yulOptimizerTests/disambiguator/variables.yul new file mode 100644 index 00000000..65bd4c8f --- /dev/null +++ b/test/libjulia/yulOptimizerTests/disambiguator/variables.yul @@ -0,0 +1,12 @@ +// yul +{ { let a:u256 } { let a:u256 } } +// ---- +// disambiguator +// { +// { +// let a:u256 +// } +// { +// let a_1:u256 +// } +// } diff --git a/test/libjulia/yulOptimizerTests/disambiguator/variables_clash.yul b/test/libjulia/yulOptimizerTests/disambiguator/variables_clash.yul new file mode 100644 index 00000000..e462442a --- /dev/null +++ b/test/libjulia/yulOptimizerTests/disambiguator/variables_clash.yul @@ -0,0 +1,13 @@ +// yul +{ { let a:u256 let a_1:u256 } { let a:u256 } } +// ---- +// disambiguator +// { +// { +// let a:u256 +// let a_1:u256 +// } +// { +// let a_2:u256 +// } +// } diff --git a/test/libjulia/yulOptimizerTests/disambiguator/variables_inside_functions.yul b/test/libjulia/yulOptimizerTests/disambiguator/variables_inside_functions.yul new file mode 100644 index 00000000..e80959f6 --- /dev/null +++ b/test/libjulia/yulOptimizerTests/disambiguator/variables_inside_functions.yul @@ -0,0 +1,24 @@ +// yul +{ + { let c:u256 let b:u256 } + function f(a:u256, c:u256) -> b:u256 { let x:u256 } + { + let a:u256 let x:u256 + } +} +// ---- +// disambiguator +// { +// { +// let c:u256 +// let b:u256 +// } +// function f(a:u256, c_1:u256) -> b_1:u256 +// { +// let x:u256 +// } +// { +// let a_1:u256 +// let x_1:u256 +// } +// } |