• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1%verify "executed"
2%verify "exception for null object (impossible in javac)"
3%verify "dvmUnlockObject fails"
4    /*
5     * Unlock an object.
6     *
7     * Exceptions that occur when unlocking a monitor need to appear as
8     * if they happened at the following instruction.  See the Dalvik
9     * instruction spec.
10     */
11    /* monitor-exit vAA */
12    GET_OPA(a2)                            #  a2 <- AA
13    EXPORT_PC()                            #  before fetch: export the PC
14    GET_VREG(a1, a2)                       #  a1 <- vAA (object)
15    # null object?
16    beqz      a1, 1f
17    move      a0, rSELF                    #  a0 <- self
18    JAL(dvmUnlockObject)                   #  v0 <- success for unlock(self, obj)
19    # failed?
20    FETCH_ADVANCE_INST(1)                  #  before throw: advance rPC, load rINST
21    beqz      v0, common_exceptionThrown   #  yes, exception is pending
22    GET_INST_OPCODE(t0)                    #  extract opcode from rINST
23    GOTO_OPCODE(t0)                        #  jump to next instruction
241:
25    FETCH_ADVANCE_INST(1)                  #  before throw: advance rPC, load rINST
26    b         common_errNullObject
27