Pseudocode: Generate merge instruction regardless of number of branches

This commit is contained in:
Alexey Sedunov
2014-07-25 20:59:00 +04:00
parent d008cb8c21
commit 9f3ebe5f3b
21 changed files with 525 additions and 500 deletions
@@ -7,9 +7,9 @@ tailRecursive fun test() : Int {
}
}
---------------------
{ // do nothing } !<v1>: *
test() <v0>: * NEW: call(test(), test) -> <v0>
{ test() } <v0>: * COPY
try { // do nothing } finally { test() } !<v1>: * COPY
{ try { // do nothing } finally { test() } } !<v1>: * COPY
{ // do nothing } !<v1>: *
test() <v0>: * NEW: call(test(), test) -> <v0>
{ test() } <v0>: * COPY
try { // do nothing } finally { test() } <v2>: * NEW: merge(try { // do nothing } finally { test() }|!<v1>) -> <v2>
{ try { // do nothing } finally { test() } } <v2>: * COPY
=====================