• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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),%eax               # eax<- FEDC or CCCC
12    movzwl    2(rPC),%ecx               # ecx<- BBBB
13    .if     (!$isrange)
14    andl      $$0xf,%eax                # eax<- C (or stays CCCC)
15    .endif
16    GET_VREG(%eax,%eax)                 # eax<- vC ("this" ptr)
17    testl     %eax,%eax                 # null?
18    je        common_errNullObject      # yep, throw exception
19    movl      offObject_clazz(%eax),%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,%ecx,4),%eax        # eax<- vtable[BBBB]
23    jmp       common_invokeMethod${routine}
24