3 ms·
> For arrays of whatever, it may be internally transformed into the same contiguous representation you see in C. This is a bit tricky because Java and C semant
by gsg 12y ago
> For arrays of whatever, it may be internally transformed into the same contiguous representation you see in C.
This is a bit tricky because Java and C semantics are not the same, and an optimizer is obliged to prove that the difference does not matter before allowing the transformation. (It could also be given license by some kind of annotation.)
Sharing of mutated fields and Java's == are the major obstacles to doing this transparently, as far as I know. They turn out not to matter if there are no other references to the objects which you want to embed in the array, but proving that (in all the cases in which you would want it to apply) is a bit tough.