3608 flags = Z_ARG5, |
3608 flags = Z_ARG5, |
3609 receiver = Z_tmp_1; |
3609 receiver = Z_tmp_1; |
3610 |
3610 |
3611 BLOCK_COMMENT("invokeinterface {"); |
3611 BLOCK_COMMENT("invokeinterface {"); |
3612 |
3612 |
3613 prepare_invoke(byte_no, interface, method, // Get f1 klassOop, f2 itable index. |
3613 prepare_invoke(byte_no, interface, method, // Get f1 klassOop, f2 Method*. |
3614 receiver, flags); |
3614 receiver, flags); |
3615 |
3615 |
3616 // Z_R14 (== Z_bytecode) : return entry |
3616 // Z_R14 (== Z_bytecode) : return entry |
3617 |
3617 |
|
3618 // First check for Object case, then private interface method, |
|
3619 // then regular interface method. |
|
3620 |
3618 // Special case of invokeinterface called for virtual method of |
3621 // Special case of invokeinterface called for virtual method of |
3619 // java.lang.Object. See cpCacheOop.cpp for details. |
3622 // java.lang.Object. See cpCache.cpp for details. |
3620 // This code isn't produced by javac, but could be produced by |
3623 NearLabel notObjectMethod, no_such_method; |
3621 // another compliant java compiler. |
|
3622 NearLabel notMethod, no_such_interface, no_such_method; |
|
3623 __ testbit(flags, ConstantPoolCacheEntry::is_forced_virtual_shift); |
3624 __ testbit(flags, ConstantPoolCacheEntry::is_forced_virtual_shift); |
3624 __ z_brz(notMethod); |
3625 __ z_brz(notObjectMethod); |
3625 invokevirtual_helper(method, receiver, flags); |
3626 invokevirtual_helper(method, receiver, flags); |
3626 __ bind(notMethod); |
3627 __ bind(notObjectMethod); |
|
3628 |
|
3629 // Check for private method invocation - indicated by vfinal |
|
3630 NearLabel notVFinal; |
|
3631 __ testbit(flags, ConstantPoolCacheEntry::is_vfinal_shift); |
|
3632 __ z_brz(notVFinal); |
|
3633 |
|
3634 // Get receiver klass into klass - also a null check. |
|
3635 __ load_klass(klass, receiver); |
|
3636 |
|
3637 NearLabel subtype, no_such_interface; |
|
3638 |
|
3639 __ check_klass_subtype(klass, interface, Z_tmp_2, Z_tmp_3, subtype); |
|
3640 // If we get here the typecheck failed |
|
3641 __ z_bru(no_such_interface); |
|
3642 __ bind(subtype); |
|
3643 |
|
3644 // do the call |
|
3645 __ profile_final_call(Z_tmp_2); |
|
3646 __ profile_arguments_type(Z_tmp_2, method, Z_ARG5, true); |
|
3647 __ jump_from_interpreted(method, Z_tmp_2); |
|
3648 |
|
3649 __ bind(notVFinal); |
3627 |
3650 |
3628 // Get receiver klass into klass - also a null check. |
3651 // Get receiver klass into klass - also a null check. |
3629 __ restore_locals(); |
3652 __ restore_locals(); |
3630 __ load_klass(klass, receiver); |
3653 __ load_klass(klass, receiver); |
3631 |
3654 |