warp icon indicating copy to clipboard operation
warp copied to clipboard

Remove for loops variable mangling

Open piwonskp opened this issue 2 years ago • 3 comments

Remove for loops variable mangling

Variable declarations in for loops get mangled because the loopFunctionaliser extracts the declarations into the same scope where the loop is instead of creating a new one. Hence, if those variables don’t get mangled, having two separate for loops in the same function such that both of them declare a variable i, would fail because we would have two different definitions of the variable i in the same scope.

Once the way we handle for loop changes, this mangling should be removed.

piwonskp avatar Jan 15 '23 19:01 piwonskp

can you assign this issue to me? @piwonskp

MostlyGenius avatar Jan 15 '23 20:01 MostlyGenius

Sure, done :)

piwonskp avatar Jan 16 '23 11:01 piwonskp

Hi @MostlyGenius ! This task was meant to be done after modifying the way we handle loops in the LoopFunctionaliser pass, and that's something that is on hold at the moment. Although removing the mangling for the variables is a good first issue, working with the pass that handles loops implies modifying a lot of the codebase, so I don't think this is something you should dive into right now. Sorry about this. We have other good first issue tasks that you can work on if you want to, we appreciate you contributing to the project.

cicr99 avatar Jan 18 '23 05:01 cicr99