Fast version for POP backward propagation (without SourceInterpreter)

This commit is contained in:
Dmitry Petrov
2017-06-22 12:02:56 +03:00
parent f1183d98a9
commit d5e02f069a
4 changed files with 121 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
inline fun inlineFunVoid(f: () -> Unit): Unit {
return f()
}
inline fun coercedToUnit() {
inlineFunVoid {
var aa = 1
++aa
}
}
inline fun dup(f: () -> Unit): Unit {
f()
f()
}
fun test() {
dup { dup { dup { dup { dup {
dup { dup {
coercedToUnit()
}}}}}
}}
}
// 3 POP