https://github.com/deltaluca/haxe/commit/a14a26e6d3ddec1816e111846060b927f595a643

This looks a lot better to me, it lays out the optimisations to be applied in a cleaner way