Const deduplication doesn't propagate outer consts to loops, due to it being expensive in WOM mode. But in RW mode, since loops execute in the same frame as the parent, it is cheap and desirable for loops to use outside consts. In fact, this is related to the const hoistering optimization for RW mode described in TODO-optimizations.txt file.
Const deduplication doesn't propagate outer consts to loops, due to it being expensive in WOM mode. But in RW mode, since loops execute in the same frame as the parent, it is cheap and desirable for loops to use outside consts. In fact, this is related to the const hoistering optimization for RW mode described in
TODO-optimizations.txtfile.