HANDLE_OPCODE(OP_MONITOR_EXIT)1HANDLE_OPCODE(OP_MONITOR_EXIT /*vAA*/) 2 { 3 Object* obj; 4 5 EXPORT_PC(); 6 7 vsrc1 = INST_AA(inst); 8 ILOGV("|monitor-exit v%d %s(0x%08x)", 9 vsrc1, kSpacing+5, GET_REGISTER(vsrc1)); 10 obj = (Object*)GET_REGISTER(vsrc1); 11 if (!checkForNull(obj)) { 12 /* 13 * The exception needs to be processed at the *following* 14 * instruction, not the current instruction (see the Dalvik 15 * spec). Because we're jumping to an exception handler, 16 * we're not actually at risk of skipping an instruction 17 * by doing so. 18 */ 19 ADJUST_PC(1); /* monitor-exit width is 1 */ 20 GOTO_exceptionThrown(); 21 } 22 ILOGV("+ unlocking %p %s", obj, obj->clazz->descriptor); 23 if (!dvmUnlockObject(self, obj)) { 24 assert(dvmCheckException(self)); 25 ADJUST_PC(1); 26 GOTO_exceptionThrown(); 27 } 28 } 29 FINISH(1); 30 OP_END 31