3 ms·
They might be talking about the checkcast operation: https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.checkcast https://docs.oracle.com/j
by newmana 3y ago
They might be talking about the checkcast operation:
https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.checkcast https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.ht...
This is generated when you do something like:
final Main value = list.get(0);
http://henrikeichenhardt.blogspot.com/2013/05/how-are-java-generics-implemented-under.html http://henrikeichenhardt.blogspot.com/2013/05/how-are-java-g...
- xxs 3y agoThe cast is added by javac, so it just needs to verify the object on the stack to be compatible w/ the provided class. That part is very simple.