RFR: vbox/vunbox should throw ClassCastException if target type is invalid

Tobias Hartmann tobias.hartmann at oracle.com
Thu Jun 8 13:47:48 UTC 2017


Hi Roland,

On 08.06.2017 11:31, Roland Westrelin wrote:
>  610   // Check if the class of the source is a subclass of the value-capable class
>  611   // corresponding to the target.
>  612   // TOOD: Implement profiling of vunbox bytecodes to enable type speculation.
>  613   if (target_vcc_klass == NULL || !target_vcc_klass->is_subclass_of(source_type->klass())) {
> 
> The comment says class of the source subclass target's vcc but the code
> does the opposite check?

Good catch, I fixed it:
http://cr.openjdk.java.net/~thartmann/valhalla/vt_prototype/webrev.19/

Thanks,
Tobias


More information about the valhalla-dev mailing list