/** * Gets whether the address range for the given two blocks is valid * for a catch handler. This is true as long as the covered range is * under 65536 code units. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param addresses {@code non-null;} address objects for each block * @return {@code true} if the range is valid as a catch range */ private static boolean rangeIsValid(BasicBlock start, BasicBlock end, BlockAddresses addresses) { if (start == null) { throw new NullPointerException("start == null"); } if (end == null) { throw new NullPointerException("end == null"); } // See above about selection of instructions. int startAddress = addresses.getLast(start).getAddress(); int endAddress = addresses.getEnd(end).getAddress(); return (endAddress - startAddress) <= MAX_CATCH_RANGE; } }
/** * Gets whether the address range for the given two blocks is valid * for a catch handler. This is true as long as the covered range is * under 65536 code units. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param addresses {@code non-null;} address objects for each block * @return {@code true} if the range is valid as a catch range */ private static boolean rangeIsValid(BasicBlock start, BasicBlock end, BlockAddresses addresses) { if (start == null) { throw new NullPointerException("start == null"); } if (end == null) { throw new NullPointerException("end == null"); } // See above about selection of instructions. int startAddress = addresses.getLast(start).getAddress(); int endAddress = addresses.getEnd(end).getAddress(); return (endAddress - startAddress) <= MAX_CATCH_RANGE; } }
/** * Gets whether the address range for the given two blocks is valid * for a catch handler. This is true as long as the covered range is * under 65536 code units. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param addresses {@code non-null;} address objects for each block * @return {@code true} if the range is valid as a catch range */ private static boolean rangeIsValid(BasicBlock start, BasicBlock end, BlockAddresses addresses) { if (start == null) { throw new NullPointerException("start == null"); } if (end == null) { throw new NullPointerException("end == null"); } // See above about selection of instructions. int startAddress = addresses.getLast(start).getAddress(); int endAddress = addresses.getEnd(end).getAddress(); return (endAddress - startAddress) <= MAX_CATCH_RANGE; } }
/** * Gets whether the address range for the given two blocks is valid * for a catch handler. This is true as long as the covered range is * under 65536 code units. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param addresses {@code non-null;} address objects for each block * @return {@code true} if the range is valid as a catch range */ private static boolean rangeIsValid(BasicBlock start, BasicBlock end, BlockAddresses addresses) { if (start == null) { throw new NullPointerException("start == null"); } if (end == null) { throw new NullPointerException("end == null"); } // See above about selection of instructions. int startAddress = addresses.getLast(start).getAddress(); int endAddress = addresses.getEnd(end).getAddress(); return (endAddress - startAddress) <= MAX_CATCH_RANGE; } }
/** * Gets whether the address range for the given two blocks is valid * for a catch handler. This is true as long as the covered range is * under 65536 code units. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param addresses {@code non-null;} address objects for each block * @return {@code true} if the range is valid as a catch range */ private static boolean rangeIsValid(BasicBlock start, BasicBlock end, BlockAddresses addresses) { if (start == null) { throw new NullPointerException("start == null"); } if (end == null) { throw new NullPointerException("end == null"); } // See above about selection of instructions. int startAddress = addresses.getLast(start).getAddress(); int endAddress = addresses.getEnd(end).getAddress(); return (endAddress - startAddress) <= MAX_CATCH_RANGE; } }
/** * Gets whether the address range for the given two blocks is valid * for a catch handler. This is true as long as the covered range is * under 65536 code units. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param addresses {@code non-null;} address objects for each block * @return {@code true} if the range is valid as a catch range */ private static boolean rangeIsValid(BasicBlock start, BasicBlock end, BlockAddresses addresses) { if (start == null) { throw new NullPointerException("start == null"); } if (end == null) { throw new NullPointerException("end == null"); } // See above about selection of instructions. int startAddress = addresses.getLast(start).getAddress(); int endAddress = addresses.getEnd(end).getAddress(); return (endAddress - startAddress) <= MAX_CATCH_RANGE; } }
/** * Gets whether the address range for the given two blocks is valid * for a catch handler. This is true as long as the covered range is * under 65536 code units. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param addresses {@code non-null;} address objects for each block * @return {@code true} if the range is valid as a catch range */ private static boolean rangeIsValid(BasicBlock start, BasicBlock end, BlockAddresses addresses) { if (start == null) { throw new NullPointerException("start == null"); } if (end == null) { throw new NullPointerException("end == null"); } // See above about selection of instructions. int startAddress = addresses.getLast(start).getAddress(); int endAddress = addresses.getEnd(end).getAddress(); return (endAddress - startAddress) <= MAX_CATCH_RANGE; } }
/** * Gets whether the address range for the given two blocks is valid * for a catch handler. This is true as long as the covered range is * under 65536 code units. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param addresses {@code non-null;} address objects for each block * @return {@code true} if the range is valid as a catch range */ private static boolean rangeIsValid(BasicBlock start, BasicBlock end, BlockAddresses addresses) { if (start == null) { throw new NullPointerException("start == null"); } if (end == null) { throw new NullPointerException("end == null"); } // See above about selection of instructions. int startAddress = addresses.getLast(start).getAddress(); int endAddress = addresses.getEnd(end).getAddress(); return (endAddress - startAddress) <= MAX_CATCH_RANGE; } }
/** * Makes a {@link CatchTable#Entry} for the given block range and * handlers. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param handlers {@code non-null;} the handlers for the range * @param addresses {@code non-null;} address objects for each block */ private static CatchTable.Entry makeEntry(BasicBlock start, BasicBlock end, CatchHandlerList handlers, BlockAddresses addresses) { /* * We start at the *last* instruction of the start block, since * that's the instruction that can throw... */ CodeAddress startAddress = addresses.getLast(start); // ...And we end *after* the last instruction of the end block. CodeAddress endAddress = addresses.getEnd(end); return new CatchTable.Entry(startAddress.getAddress(), endAddress.getAddress(), handlers); }
/** * Makes a {@link CatchTable#Entry} for the given block range and * handlers. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param handlers {@code non-null;} the handlers for the range * @param addresses {@code non-null;} address objects for each block */ private static CatchTable.Entry makeEntry(BasicBlock start, BasicBlock end, CatchHandlerList handlers, BlockAddresses addresses) { /* * We start at the *last* instruction of the start block, since * that's the instruction that can throw... */ CodeAddress startAddress = addresses.getLast(start); // ...And we end *after* the last instruction of the end block. CodeAddress endAddress = addresses.getEnd(end); return new CatchTable.Entry(startAddress.getAddress(), endAddress.getAddress(), handlers); }
/** * Makes a {@link CatchTable#Entry} for the given block range and * handlers. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param handlers {@code non-null;} the handlers for the range * @param addresses {@code non-null;} address objects for each block */ private static CatchTable.Entry makeEntry(BasicBlock start, BasicBlock end, CatchHandlerList handlers, BlockAddresses addresses) { /* * We start at the *last* instruction of the start block, since * that's the instruction that can throw... */ CodeAddress startAddress = addresses.getLast(start); // ...And we end *after* the last instruction of the end block. CodeAddress endAddress = addresses.getEnd(end); return new CatchTable.Entry(startAddress.getAddress(), endAddress.getAddress(), handlers); }
/** * Makes a {@link CatchTable#Entry} for the given block range and * handlers. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param handlers {@code non-null;} the handlers for the range * @param addresses {@code non-null;} address objects for each block */ private static CatchTable.Entry makeEntry(BasicBlock start, BasicBlock end, CatchHandlerList handlers, BlockAddresses addresses) { /* * We start at the *last* instruction of the start block, since * that's the instruction that can throw... */ CodeAddress startAddress = addresses.getLast(start); // ...And we end *after* the last instruction of the end block. CodeAddress endAddress = addresses.getEnd(end); return new CatchTable.Entry(startAddress.getAddress(), endAddress.getAddress(), handlers); }
/** * Makes a {@link CatchTable.Entry} for the given block range and * handlers. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param handlers {@code non-null;} the handlers for the range * @param addresses {@code non-null;} address objects for each block */ private static CatchTable.Entry makeEntry(BasicBlock start, BasicBlock end, CatchHandlerList handlers, BlockAddresses addresses) { /* * We start at the *last* instruction of the start block, since * that's the instruction that can throw... */ CodeAddress startAddress = addresses.getLast(start); // ...And we end *after* the last instruction of the end block. CodeAddress endAddress = addresses.getEnd(end); return new CatchTable.Entry(startAddress.getAddress(), endAddress.getAddress(), handlers); }
/** * Makes a {@link CatchTable#Entry} for the given block range and * handlers. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param handlers {@code non-null;} the handlers for the range * @param addresses {@code non-null;} address objects for each block */ private static CatchTable.Entry makeEntry(BasicBlock start, BasicBlock end, CatchHandlerList handlers, BlockAddresses addresses) { /* * We start at the *last* instruction of the start block, since * that's the instruction that can throw... */ CodeAddress startAddress = addresses.getLast(start); // ...And we end *after* the last instruction of the end block. CodeAddress endAddress = addresses.getEnd(end); return new CatchTable.Entry(startAddress.getAddress(), endAddress.getAddress(), handlers); }
/** * Makes a {@link CatchTable#Entry} for the given block range and * handlers. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param handlers {@code non-null;} the handlers for the range * @param addresses {@code non-null;} address objects for each block */ private static CatchTable.Entry makeEntry(BasicBlock start, BasicBlock end, CatchHandlerList handlers, BlockAddresses addresses) { /* * We start at the *last* instruction of the start block, since * that's the instruction that can throw... */ CodeAddress startAddress = addresses.getLast(start); // ...And we end *after* the last instruction of the end block. CodeAddress endAddress = addresses.getEnd(end); return new CatchTable.Entry(startAddress.getAddress(), endAddress.getAddress(), handlers); }
/** * Makes a {@link CatchTable#Entry} for the given block range and * handlers. * * @param start {@code non-null;} the start block for the range (inclusive) * @param end {@code non-null;} the start block for the range (also inclusive) * @param handlers {@code non-null;} the handlers for the range * @param addresses {@code non-null;} address objects for each block */ private static CatchTable.Entry makeEntry(BasicBlock start, BasicBlock end, CatchHandlerList handlers, BlockAddresses addresses) { /* * We start at the *last* instruction of the start block, since * that's the instruction that can throw... */ CodeAddress startAddress = addresses.getLast(start); // ...And we end *after* the last instruction of the end block. CodeAddress endAddress = addresses.getEnd(end); return new CatchTable.Entry(startAddress.getAddress(), endAddress.getAddress(), handlers); }
output.add(addresses.getEnd(block));
output.add(addresses.getEnd(block));
output.add(addresses.getEnd(block));
output.add(addresses.getEnd(block));