• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download

HANDLE_OPCODE(OP_THROW)1 HANDLE_OPCODE(OP_THROW /*vAA*/)
2     {
3         Object* obj;
4 
5         /*
6          * We don't create an exception here, but the process of searching
7          * for a catch block can do class lookups and throw exceptions.
8          * We need to update the saved PC.
9          */
10         EXPORT_PC();
11 
12         vsrc1 = INST_AA(inst);
13         ILOGV("|throw v%d  (%p)", vsrc1, (void*)GET_REGISTER(vsrc1));
14         obj = (Object*) GET_REGISTER(vsrc1);
15         if (!checkForNull(obj)) {
16             /* will throw a null pointer exception */
17             LOGVV("Bad exception");
18         } else {
19             /* use the requested exception */
20             dvmSetException(self, obj);
21         }
22         GOTO_exceptionThrown();
23     }
24 OP_END
25