Examples of ExceptionTableEntry


Examples of com.strobel.assembler.ir.attributes.ExceptionTableEntry

        final InstructionCollection instructions = _instructions;

        for (int i = 0, n = instructions.size(); i < n; i++) {
            final Instruction blockStart = instructions.get(i);
            final ExceptionTableEntry blockStartExceptionHandler = findInnermostExceptionHandler(blockStart.getOffset());

            //
            // See how big we can make that block...
            //
            for (; i + 1 < n; i++) {
                final Instruction instruction = instructions.get(i);
                final OpCode opCode = instruction.getOpCode();

                if (opCode.isUnconditionalBranch() /*|| opCode.canThrow()*/ || _hasIncomingJumps[i + 1]) {
                    break;
                }

                final Instruction next = instruction.getNext();

                if (next != null) {
                    //
                    // Ensure that blocks never contain instructions from different try blocks.
                    //
                    final ExceptionTableEntry innermostExceptionHandler = findInnermostExceptionHandler(next.getOffset());

                    if (innermostExceptionHandler != blockStartExceptionHandler) {
                        break;
                    }
                }
View Full Code Here

Examples of com.strobel.assembler.ir.attributes.ExceptionTableEntry

                if (innermostHandler == null) {
                    continue;
                }

                for (final ExceptionTableEntry entry : _tableEntries) {
                    final ExceptionTableEntry handlerEntry = (ExceptionTableEntry) innermostHandler.getUserData();

                    if (handlerEntry == null) {
                        continue;
                    }

                    if (entry.getStartOffset() == handlerEntry.getStartOffset() &&
                        entry.getEndOffset() == handlerEntry.getEndOffset()) {

                        final ControlFlowNode handlerNode = firstOrDefault(
                            _nodes,
                            new Predicate<ControlFlowNode>() {
                                @Override
View Full Code Here

Examples of com.strobel.assembler.ir.attributes.ExceptionTableEntry

            }
        }
    }

    private ControlFlowNode findInnermostExceptionHandlerNode(final int offsetInTryBlock) {
        final ExceptionTableEntry entry = findInnermostExceptionHandler(offsetInTryBlock);

        if (entry == null) {
            return null;
        }

        final Instruction nodeStart = _instructions.atOffset(entry.getHandlerOffset());

        for (final ControlFlowNode node : _nodes) {
            if (node.getStart() == nodeStart) {
                return node;
            }
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.ExceptionTableEntry

                    List exceptionTable = new ArrayList();
                    if(handlerCount != null) {
                        for (int j = 0; j < handlerCount[i]; j++) {
                            String handlerClass = handlerClassTypes[i][j];
                            CPClass cpHandlerClass = new CPClass(handlerClass);
                            ExceptionTableEntry entry = new ExceptionTableEntry(
                                    handlerStartPCs[i][j], handlerEndPCs[i][j],
                                    handlerCatchPCs[i][j], cpHandlerClass);
                            exceptionTable.add(entry);
                        }
                    }
View Full Code Here

Examples of org.apache.harmony.unpack200.bytecode.ExceptionTableEntry

                                // catch is a finally (that is, the
                                // exception table catch_type should be 0
                                cpHandlerClass = segment.getCpBands()
                                        .cpClassValue(handlerClass);
                            }
                            ExceptionTableEntry entry = new ExceptionTableEntry(
                                    handlerStartPCs[i][j], handlerEndPCs[i][j],
                                    handlerCatchPCs[i][j], cpHandlerClass);
                            exceptionTable.add(entry);
                        }
                    }
View Full Code Here

Examples of org.apache.harmony.unpack200.bytecode.ExceptionTableEntry

                                // catch is a finally (that is, the
                                // exception table catch_type should be 0
                                cpHandlerClass = segment.getCpBands()
                                        .cpClassValue(handlerClass);
                            }
                            ExceptionTableEntry entry = new ExceptionTableEntry(
                                    handlerStartPCs[i][j], handlerEndPCs[i][j],
                                    handlerCatchPCs[i][j], cpHandlerClass);
                            exceptionTable.add(entry);
                        }
                    }
View Full Code Here

Examples of org.apache.harmony.unpack200.bytecode.ExceptionTableEntry

                                // catch is a finally (that is, the
                                // exception table catch_type should be 0
                                cpHandlerClass = segment.getCpBands()
                                        .cpClassValue(handlerClass);
                            }
                            ExceptionTableEntry entry = new ExceptionTableEntry(
                                    handlerStartPCs[i][j], handlerEndPCs[i][j],
                                    handlerCatchPCs[i][j], cpHandlerClass);
                            exceptionTable.add(entry);
                        }
                    }
View Full Code Here

Examples of org.apache.harmony.unpack200.bytecode.ExceptionTableEntry

                                // catch is a finally (that is, the
                                // exception table catch_type should be 0
                                cpHandlerClass = segment.getCpBands()
                                        .cpClassValue(handlerClass);
                            }
                            ExceptionTableEntry entry = new ExceptionTableEntry(
                                    handlerStartPCs[i][j], handlerEndPCs[i][j],
                                    handlerCatchPCs[i][j], cpHandlerClass);
                            exceptionTable.add(entry);
                        }
                    }
View Full Code Here

Examples of org.gjt.jclasslib.structures.attributes.ExceptionTableEntry

            }
        }
       
        protected Object doGetValueAt(int row, int column) {

            ExceptionTableEntry exceptionTableEntry = exceptionTable[row];
            int catchType = exceptionTableEntry.getCatchType();
           
            switch (column) {
                case START_PC_COLUMN_INDEX:
                    return String.valueOf(exceptionTableEntry.getStartPc());
                case END_PC_COLUMN_INDEX:
                    return String.valueOf(exceptionTableEntry.getEndPc());
                case HANDLER_PC_COLUMN_INDEX:
                    return String.valueOf(exceptionTableEntry.getHandlerPc());
                case CATCH_TYPE_COLUMN_INDEX:
                    if (catchType == 0) {
                        return "";
                    } else {
                        return CPINFO_LINK_TEXT + String.valueOf(catchType);
                    }
                case CATCH_TYPE_VERBOSE_COLUMN_INDEX:
                    if (catchType == 0) {
                        return "any";
                    } else {
                        return getConstantPoolEntryName(exceptionTableEntry.getCatchType());
                    }
                default:
                    return "";
            }
        }
View Full Code Here

Examples of org.gjt.jclasslib.structures.attributes.ExceptionTableEntry

            }
        }
       
        protected Object doGetValueAt(int row, int column) {

            ExceptionTableEntry exceptionTableEntry = exceptionTable[row];
            int catchType = exceptionTableEntry.getCatchType();
           
            switch (column) {
                case START_PC_COLUMN_INDEX:
                    return String.valueOf(exceptionTableEntry.getStartPc());
                case END_PC_COLUMN_INDEX:
                    return String.valueOf(exceptionTableEntry.getEndPc());
                case HANDLER_PC_COLUMN_INDEX:
                    return String.valueOf(exceptionTableEntry.getHandlerPc());
                case CATCH_TYPE_COLUMN_INDEX:
                    if (catchType == 0) {
                        return "";
                    } else {
                        return CPINFO_LINK_TEXT + String.valueOf(catchType);
                    }
                case CATCH_TYPE_VERBOSE_COLUMN_INDEX:
                    if (catchType == 0) {
                        return "any";
                    } else {
                        return getConstantPoolEntryName(exceptionTableEntry.getCatchType());
                    }
                default:
                    return "";
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.