3352 __ jump_from_interpreted(rmethod, r0); 3353 } 3354 3355 void TemplateTable::fast_invokevfinal(int byte_no) 3356 { 3357 __ call_Unimplemented(); 3358 } 3359 3360 void TemplateTable::invokeinterface(int byte_no) { 3361 transition(vtos, vtos); 3362 assert(byte_no == f1_byte, "use this argument"); 3363 3364 prepare_invoke(byte_no, r0, rmethod, // get f1 Klass*, f2 Method* 3365 r2, r3); // recv, flags 3366 3367 // r0: interface klass (from f1) 3368 // rmethod: method (from f2) 3369 // r2: receiver 3370 // r3: flags 3371 3372 // Check for private method invocation - indicated by vfinal 3373 Label notVFinal; 3374 __ tbz(flags, ConstantPoolCacheEntry::is_vfinal_shift, notVFinal); 3375 3376 __ null_check(r2); 3377 3378 __ profile_final_call(r0); 3379 __ profile_arguments_type(r0, rmethod, r4, true); 3380 __ jump_from_interpreted(rmethod, r0); 3381 3382 __ bind(notVFinal); 3383 3384 // Special case of invokeinterface called for virtual method of 3385 // java.lang.Object. See cpCacheOop.cpp for details. 3386 // This code isn't produced by javac, but could be produced by 3387 // another compliant java compiler. 3388 Label notMethod; 3389 __ tbz(r3, ConstantPoolCacheEntry::is_forced_virtual_shift, notMethod); 3390 3391 invokevirtual_helper(rmethod, r2, r3); 3392 __ bind(notMethod); 3393 3394 // Get receiver klass into r3 - also a null check 3395 __ restore_locals(); 3396 __ null_check(r2, oopDesc::klass_offset_in_bytes()); 3397 __ load_klass(r3, r2); 3398 3399 Label no_such_interface, no_such_method; 3400 3401 // Preserve method for throw_AbstractMethodErrorVerbose. 3402 __ mov(r16, rmethod); 3403 // Receiver subtype check against REFC. 3404 // Superklass in r0. Subklass in r3. Blows rscratch2, r13 3405 __ lookup_interface_method(// inputs: rec. class, interface, itable index 3406 r3, r0, noreg, 3407 // outputs: scan temp. reg, scan temp. reg 3408 rscratch2, r13, 3409 no_such_interface, 3410 /*return_method=*/false); 3411 3412 // profile this call 3413 __ profile_virtual_call(r3, r13, r19); 3414 3415 // Get declaring interface class from method, and itable index 3416 __ ldr(r0, Address(rmethod, Method::const_offset())); 3417 __ ldr(r0, Address(r0, ConstMethod::constants_offset())); 3418 __ ldr(r0, Address(r0, ConstantPool::pool_holder_offset_in_bytes())); 3419 __ ldrw(rmethod, Address(rmethod, Method::itable_index_offset())); | 3352 __ jump_from_interpreted(rmethod, r0); 3353 } 3354 3355 void TemplateTable::fast_invokevfinal(int byte_no) 3356 { 3357 __ call_Unimplemented(); 3358 } 3359 3360 void TemplateTable::invokeinterface(int byte_no) { 3361 transition(vtos, vtos); 3362 assert(byte_no == f1_byte, "use this argument"); 3363 3364 prepare_invoke(byte_no, r0, rmethod, // get f1 Klass*, f2 Method* 3365 r2, r3); // recv, flags 3366 3367 // r0: interface klass (from f1) 3368 // rmethod: method (from f2) 3369 // r2: receiver 3370 // r3: flags 3371 3372 Label no_such_interface; 3373 3374 // Check for private method invocation - indicated by vfinal 3375 Label notVFinal; 3376 __ tbz(flags, ConstantPoolCacheEntry::is_vfinal_shift, notVFinal); 3377 3378 // Get receiver klass into r3 - also a null check 3379 __ null_check(r2, oopDesc::klass_offset_in_bytes()); 3380 __ load_klass(r3, r2); 3381 3382 Label subtype; 3383 __ check_klass_subtype(r3, r0, r4, subtype); 3384 // If we get here the typecheck failed 3385 __ b(no_such_interface); 3386 __ bind(subtype); 3387 3388 __ profile_final_call(r0); 3389 __ profile_arguments_type(r0, rmethod, r4, true); 3390 __ jump_from_interpreted(rmethod, r0); 3391 3392 __ bind(notVFinal); 3393 3394 // Special case of invokeinterface called for virtual method of 3395 // java.lang.Object. See cpCacheOop.cpp for details. 3396 // This code isn't produced by javac, but could be produced by 3397 // another compliant java compiler. 3398 Label notMethod; 3399 __ tbz(r3, ConstantPoolCacheEntry::is_forced_virtual_shift, notMethod); 3400 3401 invokevirtual_helper(rmethod, r2, r3); 3402 __ bind(notMethod); 3403 3404 // Get receiver klass into r3 - also a null check 3405 __ restore_locals(); 3406 __ null_check(r2, oopDesc::klass_offset_in_bytes()); 3407 __ load_klass(r3, r2); 3408 3409 Label no_such_method; 3410 3411 // Preserve method for throw_AbstractMethodErrorVerbose. 3412 __ mov(r16, rmethod); 3413 // Receiver subtype check against REFC. 3414 // Superklass in r0. Subklass in r3. Blows rscratch2, r13 3415 __ lookup_interface_method(// inputs: rec. class, interface, itable index 3416 r3, r0, noreg, 3417 // outputs: scan temp. reg, scan temp. reg 3418 rscratch2, r13, 3419 no_such_interface, 3420 /*return_method=*/false); 3421 3422 // profile this call 3423 __ profile_virtual_call(r3, r13, r19); 3424 3425 // Get declaring interface class from method, and itable index 3426 __ ldr(r0, Address(rmethod, Method::const_offset())); 3427 __ ldr(r0, Address(r0, ConstMethod::constants_offset())); 3428 __ ldr(r0, Address(r0, ConstantPool::pool_holder_offset_in_bytes())); 3429 __ ldrw(rmethod, Address(rmethod, Method::itable_index_offset())); |