private void generateExceptionHandlers() {
            if (mExceptionGuardHandlers == null) {
                return;
            }

            int size = mExceptionGuardHandlers.size();
            if (size == 0) {
                return;
            }

            Label dumpException = mBuilder.createLabel();

            for (int i=0; i<size; i++) {
                GuardHandler gh = mExceptionGuardHandlers.get(i);
                mBuilder.exceptionHandler(gh.tryStart, gh.tryEnd,
                                          "java.lang.RuntimeException");
                // Subroutine will pop exception object off stack.
                mBuilder.jsr(dumpException);

                if (gh.replacement != null) {
                    generate(gh.replacement);
                }

                mBuilder.branch(gh.tryEnd);
            }

            dumpException.setLocation();

            // Generate code to pass caught exception to
            // ThreadGroup.uncaughtException.

            TypeDesc throwableDesc = makeDesc(Throwable.class);
            TypeDesc threadDesc = makeDesc(Thread.class);
            TypeDesc threadGroupDesc = makeDesc(ThreadGroup.class);

            LocalVariable exception =
                mBuilder.createLocalVariable("e", throwableDesc);
            LocalVariable retAddr =
                mBuilder.createLocalVariable("addr", TypeDesc.OBJECT);
            LocalVariable thread =
                mBuilder.createLocalVariable("t", threadDesc);

            // Capture return address.
            mBuilder.storeLocal(retAddr);

            // Assume caller has placed exception on stack.
            mBuilder.storeLocal(exception);

            mBuilder.invokeStatic("java.lang.Thread", "currentThread",
                                  threadDesc);
            mBuilder.storeLocal(thread);
            mBuilder.loadLocal(thread);
            mBuilder.invokeVirtual("java.lang.Thread", "getThreadGroup",
                                   threadGroupDesc);
            mBuilder.loadLocal(thread);
            mBuilder.loadLocal(exception);
            mBuilder.invokeVirtual
                ("java.lang.ThreadGroup", "uncaughtException", null,
                 new TypeDesc[]{threadDesc, throwableDesc});

            mBuilder.ret(retAddr);
        }