/** * Sorts the given list of local variable types and trims their code blocks * when necessary. The block is trimmed at the end, which is a bit * arbitrary. */ private void trimLocalVariableTypes(LocalVariableTypeInfo[] localVariableTypeInfos, int localVariableTypeInfoCount, int maxLocals) { // Sort the local variable entries. Arrays.sort(localVariableTypeInfos, 0, localVariableTypeInfoCount); int[] startPCs = createMaxArray(maxLocals); // Trim the local variable entries, starting at the last one. for (int index = localVariableTypeInfoCount-1; index >= 0; index--) { LocalVariableTypeInfo localVariableTypeInfo = localVariableTypeInfos[index]; // Make sure the variable's code block doesn't overlap with the // next one for the same variable. int maxLength = startPCs[localVariableTypeInfo.u2index] - localVariableTypeInfo.u2startPC; if (localVariableTypeInfo.u2length > maxLength) { localVariableTypeInfo.u2length = maxLength; } startPCs[localVariableTypeInfo.u2index] = localVariableTypeInfo.u2startPC; } }
/** * Sorts the given list of local variables and trims their code blocks * when necessary. The block is trimmed at the end, which is a bit * arbitrary. */ private void trimLocalVariables(LocalVariableInfo[] localVariableInfos, int localVariableInfoCount, int maxLocals) { // Sort the local variable entries. Arrays.sort(localVariableInfos, 0, localVariableInfoCount); int[] startPCs = createMaxArray(maxLocals); // Trim the local variable entries, starting at the last one. for (int index = localVariableInfoCount-1; index >= 0; index--) { LocalVariableInfo localVariableInfo = localVariableInfos[index]; // Make sure the variable's code block doesn't overlap with the // next one for the same variable. int maxLength = startPCs[localVariableInfo.u2index] - localVariableInfo.u2startPC; if (localVariableInfo.u2length > maxLength) { localVariableInfo.u2length = maxLength; } startPCs[localVariableInfo.u2index] = localVariableInfo.u2startPC; } }
/** * Sorts the given list of local variable types and trims their code blocks * when necessary. The block is trimmed at the end, which is a bit * arbitrary. */ private void trimLocalVariableTypes(LocalVariableTypeInfo[] localVariableTypeInfos, int localVariableTypeInfoCount, int maxLocals) { // Sort the local variable entries. Arrays.sort(localVariableTypeInfos, 0, localVariableTypeInfoCount); int[] startPCs = createMaxArray(maxLocals); // Trim the local variable entries, starting at the last one. for (int index = localVariableTypeInfoCount-1; index >= 0; index--) { LocalVariableTypeInfo localVariableTypeInfo = localVariableTypeInfos[index]; // Make sure the variable's code block doesn't overlap with the // next one for the same variable. int maxLength = startPCs[localVariableTypeInfo.u2index] - localVariableTypeInfo.u2startPC; if (localVariableTypeInfo.u2length > maxLength) { localVariableTypeInfo.u2length = maxLength; } startPCs[localVariableTypeInfo.u2index] = localVariableTypeInfo.u2startPC; } }
/** * Sorts the given list of local variables and trims their code blocks * when necessary. The block is trimmed at the end, which is a bit * arbitrary. */ private void trimLocalVariables(LocalVariableInfo[] localVariableInfos, int localVariableInfoCount, int maxLocals) { // Sort the local variable entries. Arrays.sort(localVariableInfos, 0, localVariableInfoCount); int[] startPCs = createMaxArray(maxLocals); // Trim the local variable entries, starting at the last one. for (int index = localVariableInfoCount-1; index >= 0; index--) { LocalVariableInfo localVariableInfo = localVariableInfos[index]; // Make sure the variable's code block doesn't overlap with the // next one for the same variable. int maxLength = startPCs[localVariableInfo.u2index] - localVariableInfo.u2startPC; if (localVariableInfo.u2length > maxLength) { localVariableInfo.u2length = maxLength; } startPCs[localVariableInfo.u2index] = localVariableInfo.u2startPC; } }
/** * Sorts the given list of local variable types and trims their code blocks * when necessary. The block is trimmed at the end, which is a bit * arbitrary. */ private void trimLocalVariableTypes(LocalVariableTypeInfo[] localVariableTypeInfos, int localVariableTypeInfoCount, int maxLocals) { // Sort the local variable entries. Arrays.sort(localVariableTypeInfos, 0, localVariableTypeInfoCount); int[] startPCs = createMaxArray(maxLocals); // Trim the local variable entries, starting at the last one. for (int index = localVariableTypeInfoCount-1; index >= 0; index--) { LocalVariableTypeInfo localVariableTypeInfo = localVariableTypeInfos[index]; // Make sure the variable's code block doesn't overlap with the // next one for the same variable. int maxLength = startPCs[localVariableTypeInfo.u2index] - localVariableTypeInfo.u2startPC; if (localVariableTypeInfo.u2length > maxLength) { localVariableTypeInfo.u2length = maxLength; } startPCs[localVariableTypeInfo.u2index] = localVariableTypeInfo.u2startPC; } }
/** * Sorts the given list of local variables and trims their code blocks * when necessary. The block is trimmed at the end, which is a bit * arbitrary. */ private void trimLocalVariables(LocalVariableInfo[] localVariableInfos, int localVariableInfoCount, int maxLocals) { // Sort the local variable entries. Arrays.sort(localVariableInfos, 0, localVariableInfoCount); int[] startPCs = createMaxArray(maxLocals); // Trim the local variable entries, starting at the last one. for (int index = localVariableInfoCount-1; index >= 0; index--) { LocalVariableInfo localVariableInfo = localVariableInfos[index]; // Make sure the variable's code block doesn't overlap with the // next one for the same variable. int maxLength = startPCs[localVariableInfo.u2index] - localVariableInfo.u2startPC; if (localVariableInfo.u2length > maxLength) { localVariableInfo.u2length = maxLength; } startPCs[localVariableInfo.u2index] = localVariableInfo.u2startPC; } }