Welcome to the GBF Test Portal

This was built to track decompiler and CFG progress.

Decompiler Output

Backtrace

{
  "frames": []
}

Context

{
  "current_block_id": {
    "index": 1,
    "address": 88,
    "block_type": "Normal"
  },
  "current_ast_node_stack": [
    {
      "StandaloneNode": {
        "Expression": {
          "Literal": {
            "metadata": {
              "properties": {},
              "comments": []
            },
            "ptr": {
              "Number": 0
            },
            "node_id": 17528
          }
        }
      }
    },
    {
      "StandaloneNode": {
        "Expression": {
          "Assignable": {
            "MemberAccess": {
              "metadata": {
                "properties": {},
                "comments": []
              },
              "node_id": 17531,
              "ptr": {
                "rhs": {
                  "Identifier": {
                    "metadata": {
                      "properties": {},
                      "comments": []
                    },
                    "ptr": {
                      "ssa_version": null,
                      "id": "arr"
                    },
                    "node_id": 17530
                  }
                },
                "lhs": {
                  "Identifier": {
                    "metadata": {
                      "properties": {},
                      "comments": []
                    },
                    "ptr": {
                      "ssa_version": null,
                      "id": "temp"
                    },
                    "node_id": 17529
                  }
                },
                "ssa_version": 5
              }
            }
          }
        }
      }
    },
    {
      "StandaloneNode": {
        "Expression": {
          "Assignable": {
            "MemberAccess": {
              "metadata": {
                "properties": {},
                "comments": []
              },
              "node_id": 17534,
              "ptr": {
                "rhs": {
                  "Identifier": {
                    "metadata": {
                      "properties": {},
                      "comments": []
                    },
                    "node_id": 17533,
                    "ptr": {
                      "ssa_version": null,
                      "id": "elem"
                    }
                  }
                },
                "lhs": {
                  "Identifier": {
                    "metadata": {
                      "properties": {},
                      "comments": []
                    },
                    "node_id": 17532,
                    "ptr": {
                      "ssa_version": null,
                      "id": "temp"
                    }
                  }
                },
                "ssa_version": 2
              }
            }
          }
        }
      }
    }
  ],
  "current_instruction": {
    "opcode": "ForEach",
    "operand": {
      "Number": 100
    },
    "address": 88
  }
}
function enhancedForLoop()
{
    lit#5 = "baz";
    lit#6 = "bar";
    lit#7 = "foo";
    temp.arr = {lit#7, lit#6, lit#5};
    lit#8 = 0;
    temp.i = lit#8;
    lit#9 = 0;
    for (temp.elem : temp.arr) 
    {
        fn_call#10 = echo#2(temp.elem);
        temp.i++;
        lit#11 = lit#9 + 1;
    }
    lit#12 = "done enhanced for";
    fn_call#13 = echo#2(lit#12);
    lit#14 = "num elems: ";
    fn_call#15 = echo#2(lit#14 @ temp.i);
    lit#16 = 0;
    return lit#16;
}