aboutsummaryrefslogtreecommitdiffstats
path: root/src/proguard/optimize/peephole/BranchTargetFinder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/proguard/optimize/peephole/BranchTargetFinder.java')
-rw-r--r--src/proguard/optimize/peephole/BranchTargetFinder.java28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/proguard/optimize/peephole/BranchTargetFinder.java b/src/proguard/optimize/peephole/BranchTargetFinder.java
index 7e5a11f..8f650bb 100644
--- a/src/proguard/optimize/peephole/BranchTargetFinder.java
+++ b/src/proguard/optimize/peephole/BranchTargetFinder.java
@@ -2,7 +2,7 @@
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
- * Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu)
+ * Copyright (c) 2002-2009 Eric Lafortune (eric@graphics.cornell.edu)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
@@ -29,8 +29,6 @@ import proguard.classfile.instruction.*;
import proguard.classfile.instruction.visitor.InstructionVisitor;
import proguard.classfile.util.SimplifiedVisitor;
-import java.util.Arrays;
-
/**
* This AttributeVisitor finds all instruction offsets, branch targets, and
* exception targets in the CodeAttribute objects that it visits.
@@ -314,19 +312,25 @@ implements AttributeVisitor,
initializationOffsets = new int[codeLength];
// Reset the arrays.
- Arrays.fill(subroutineStarts, 0, codeLength, NONE);
- Arrays.fill(subroutineEnds, 0, codeLength, NONE);
- Arrays.fill(creationOffsets, 0, codeLength, NONE);
- Arrays.fill(initializationOffsets, 0, codeLength, NONE);
+ for (int index = 0; index < codeLength; index++)
+ {
+ subroutineStarts[index] = NONE;
+ subroutineEnds[index] = NONE;
+ creationOffsets[index] = NONE;
+ initializationOffsets[index] = NONE;
+ }
}
else
{
// Reset the arrays.
- Arrays.fill(instructionMarks, 0, codeLength, (short)0);
- Arrays.fill(subroutineStarts, 0, codeLength, NONE);
- Arrays.fill(subroutineEnds, 0, codeLength, NONE);
- Arrays.fill(creationOffsets, 0, codeLength, NONE);
- Arrays.fill(initializationOffsets, 0, codeLength, NONE);
+ for (int index = 0; index < codeLength; index++)
+ {
+ instructionMarks[index] = 0;
+ subroutineStarts[index] = NONE;
+ subroutineEnds[index] = NONE;
+ creationOffsets[index] = NONE;
+ initializationOffsets[index] = NONE;
+ }
instructionMarks[codeLength] = 0;
}