perform constant subscript calculations at compile time