From 18dcbbd5428e456c6057ee78fe4b967a75bb1b0a Mon Sep 17 00:00:00 2001 From: Roland Praml Date: Wed, 15 Sep 2021 17:09:12 +0200 Subject: [PATCH] Removed obsolete method and code cleanup --- .../mozilla/classfile/ClassFileWriter.java | 34 ++----------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/src/org/mozilla/classfile/ClassFileWriter.java b/src/org/mozilla/classfile/ClassFileWriter.java index 4f296b650e..07dd4d84f2 100644 --- a/src/org/mozilla/classfile/ClassFileWriter.java +++ b/src/org/mozilla/classfile/ClassFileWriter.java @@ -1487,35 +1487,6 @@ private boolean isSuperBlockEnd(int opcode) { } } - /** - * Calculate partial dependencies for super blocks. - * - *

This is used as a workaround for dead code that is generated. Only one dependency per - * super block is given. - */ - private SuperBlock[] getSuperBlockDependencies() { - SuperBlock[] deps = new SuperBlock[superBlocks.length]; - - for (int i = 0; i < itsExceptionTableTop; i++) { - ExceptionTableEntry ete = itsExceptionTable[i]; - int startPC = getLabelPC(ete.itsStartLabel); - int handlerPC = getLabelPC(ete.itsHandlerLabel); - SuperBlock handlerSB = getSuperBlockFromOffset(handlerPC); - SuperBlock dep = getSuperBlockFromOffset(startPC); - deps[handlerSB.getIndex()] = dep; - } - int[] targetPCs = itsJumpFroms.getKeys(); - for (int i = 0; i < targetPCs.length; i++) { - int targetPC = targetPCs[i]; - int branchPC = itsJumpFroms.getInt(targetPC, -1); - SuperBlock branchSB = getSuperBlockFromOffset(branchPC); - SuperBlock targetSB = getSuperBlockFromOffset(targetPC); - deps[targetSB.getIndex()] = branchSB; - } - - return deps; - } - /** * Get the target super block of a branch instruction. * @@ -4461,10 +4432,11 @@ public String toString() { private String generatedClassName; - private ExceptionTableEntry itsExceptionTable[]; + private ExceptionTableEntry[] itsExceptionTable; + private int itsExceptionTableTop; - private int itsLineNumberTable[]; // pack start_pc & line_number together + private int[] itsLineNumberTable; // pack start_pc & line_number together private int itsLineNumberTableTop; private byte[] itsCodeBuffer = new byte[256];