-
-
Notifications
You must be signed in to change notification settings - Fork 343
Description
According to rust-lang/rust#67186 LLVM only permits generating arrays (or perhaps indexing into them) of isize::MAX
as opposed to the theoretical maximum of usize::MAX
imposed by the size of a pointer. (Apparently the reason for the restriction is related to doing pointer arithmetic potentially involving negative numbers, which a language like C would permit in userspace.)
Is this still true? Inkwell's API doesn't suggest or mention it, so it seems worth verifying empirically. What about for Cranelift? (If it's not true, it seems better to go with usize::MAX
since Roc doesn't support arbitrary pointer arithmetic.) Probably the easiest way to verify it is through a List.range
test.
If it is true, how should we enforce this? Error if attempting to create a list that's over isize::MAX
elements?