dplassgit / d2lang

D2 is a strongly-typed, statically-typed, (mostly) inferred-type compiled language.
MIT License
5 stars 1 forks source link

Don't do index checks for obvious constants #332

Closed dplassgit closed 1 month ago

dplassgit commented 1 month ago

It's not often this occurs, because the ILCodeGenerator generates very inefficient code, so something like a[0] is actually temp=0 check temp for >=0, a[temp]