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