aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/expressionSplitter/inside_function.yul
diff options
context:
space:
mode:
authorChristian Parpart <christian@parpart.family>2018-10-15 18:30:00 +0800
committerGitHub <noreply@github.com>2018-10-15 18:30:00 +0800
commitb2b845d6def4d28215c5d591589555bd8f4ea6ab (patch)
treea8501e929c94a7d36e69a6350e98c68556fe9038 /test/libyul/yulOptimizerTests/expressionSplitter/inside_function.yul
parentb965fd6e17f77e94afeb070a27182251b85b8ab3 (diff)
parent1304361b9c48438d5c55903492b5f11c3dac73e5 (diff)
downloaddexon-solidity-b2b845d6def4d28215c5d591589555bd8f4ea6ab.tar.gz
dexon-solidity-b2b845d6def4d28215c5d591589555bd8f4ea6ab.tar.zst
dexon-solidity-b2b845d6def4d28215c5d591589555bd8f4ea6ab.zip
Merge pull request #5220 from ethereum/libjulia-to-libyul
Renames `libjulia` directory to `libyul` & namespace `dev::julia` to `dev::yul`
Diffstat (limited to 'test/libyul/yulOptimizerTests/expressionSplitter/inside_function.yul')
-rw-r--r--test/libyul/yulOptimizerTests/expressionSplitter/inside_function.yul29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/libyul/yulOptimizerTests/expressionSplitter/inside_function.yul b/test/libyul/yulOptimizerTests/expressionSplitter/inside_function.yul
new file mode 100644
index 00000000..53bbcea7
--- /dev/null
+++ b/test/libyul/yulOptimizerTests/expressionSplitter/inside_function.yul
@@ -0,0 +1,29 @@
+{
+ let x := mul(f(0, mload(7)), 3)
+ function f(a, b) -> c {
+ c := mul(a, mload(add(b, c)))
+ }
+ sstore(x, f(mload(2), mload(2)))
+}
+// ----
+// expressionSplitter
+// {
+// let _1 := 3
+// let _2 := 7
+// let _3 := mload(_2)
+// let _4 := 0
+// let _5 := f(_4, _3)
+// let x := mul(_5, _1)
+// function f(a, b) -> c
+// {
+// let _6 := add(b, c)
+// let _7 := mload(_6)
+// c := mul(a, _7)
+// }
+// let _8 := 2
+// let _9 := mload(_8)
+// let _10 := 2
+// let _11 := mload(_10)
+// let _12 := f(_11, _9)
+// sstore(x, _12)
+// }