Reimplementing branch compilation