buzz icon indicating copy to clipboard operation
buzz copied to clipboard

Remove dead branches

Open giann opened this issue 3 years ago • 0 comments

A simple form of compile time execution:

  • [X] if/else: when conditions are constants, gen only valid branch
  • [X] foreach: when iterable is constant and empty, don't generate loop
  • [X] for, while: when condition is constant and false, don't generate loop
  • [ ] early return: don't generate code for nodes after a return

giann avatar Aug 02 '22 05:08 giann