Why JVM can not type infer type params but javac can do?
Remi Forax
forax at univ-mlv.fr
Thu Jan 8 12:19:09 UTC 2015
Do you really want to enhance a simple VM checkcast to check subtyping
relationship between wildcards at runtime ?
Rémi
On 01/08/2015 09:54 AM, Ali Ebrahimi wrote:
> Hi, maybe this is stupid question, but want to ask and what is requirements
> for this?
>
> Array instantiation sample:
> public <any T> T[] newArray(int){
> return new T[0];
> }
>
> even for non-any T:
> public <T> T[] newArray(int){
> return new T[0];
> }
>
> With thousands number of optimization and inlining mechanics equipped in
> jvm, What is the reasoning behind not allowing to jvm to be aware of
> generics info emitted in classfilles?
>
> Why jvm should not able do following inlining?
>
> String[] strs = newArray(int) => String[] strs = new String[0];
> I mean even in jitted code.
>
> I think some time ago I read some papers in similar area.
More information about the valhalla-dev
mailing list