kevin.cianfarini
09/16/2022, 8:36 PMArrays of value types should be packed, without indirections, as arrays of primitives are now.Since Kotlin has separate, specialized, types for each primitive value how does this bode for value classes on Native? I imagine that
Array<MyValueClass>
would be boxed unless the compiler/runtime were doing some magic I’m unaware of.mkrussel
09/16/2022, 8:55 PMkevin.cianfarini
09/16/2022, 9:10 PMVArray<T>
landskevin.cianfarini
09/16/2022, 9:13 PMmkrussel
09/16/2022, 9:16 PMkevin.cianfarini
09/16/2022, 9:20 PMSo whileVery similar toandList<String>
will both be represented by the same runtime classList<Integer>
,List.class
will not be (more generally, for all value typesList<int>
andV
whereW
,V != W
andList<V>
will likely be represented by different classes.)List<W>
VArray<T>
but more generic. Kotlin/Native could do something similar for all generic types by monomorphizing any value type parameter and doing traditional type erasure for reference typeskevin.cianfarini
09/16/2022, 9:22 PMkevin.cianfarini
09/16/2022, 9:23 PM