1 %default { "isrange":"0", "routine":"NoRange" } 2 %verify "executed" 3 %verify "null object" 4 /* 5 * Handle an optimized virtual method call. 6 * 7 * for: [opt] invoke-virtual-quick, invoke-virtual-quick/range 8 */ 9 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */ 10 /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */ 11 movzwl 4(rPC),%ecx # eax<- FEDC or CCCC 12 movzwl 2(rPC),%edx # ecx<- BBBB 13 .if (!$isrange) 14 andl $$0xf,%ecx # eax<- C (or stays CCCC) 15 .endif 16 GET_VREG_R %ecx %ecx # ecx<- vC ("this" ptr) 17 testl %ecx,%ecx # null? 18 je common_errNullObject # yep, throw exception 19 movl offObject_clazz(%ecx),%eax # eax<- thisPtr->clazz 20 movl offClassObject_vtable(%eax),%eax # eax<- thisPtr->clazz->vtable 21 EXPORT_PC # might throw later - get ready 22 movl (%eax,%edx,4),%eax # eax<- vtable[BBBB] 23 jmp common_invokeMethod${routine} 24