summaryrefslogtreecommitdiff
path: root/src/proguard/shrink/Shrinker.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/proguard/shrink/Shrinker.java')
-rw-r--r--src/proguard/shrink/Shrinker.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/proguard/shrink/Shrinker.java b/src/proguard/shrink/Shrinker.java
index 0472c3d..72f878b 100644
--- a/src/proguard/shrink/Shrinker.java
+++ b/src/proguard/shrink/Shrinker.java
@@ -2,7 +2,7 @@
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
- * Copyright (c) 2002-2013 Eric Lafortune (eric@graphics.cornell.edu)
+ * Copyright (c) 2002-2014 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
@@ -73,8 +73,8 @@ public class Shrinker
new MultiClassVisitor(new ClassVisitor[]
{
usageMarker,
- new NamedMethodVisitor(ClassConstants.INTERNAL_METHOD_NAME_INIT,
- ClassConstants.INTERNAL_METHOD_TYPE_INIT,
+ new NamedMethodVisitor(ClassConstants.METHOD_NAME_INIT,
+ ClassConstants.METHOD_TYPE_INIT,
usageMarker)
});
@@ -88,6 +88,7 @@ public class Shrinker
// Mark the seeds.
programClassPool.accept(classPoolvisitor);
libraryClassPool.accept(classPoolvisitor);
+ libraryClassPool.classesAccept(usageMarker);
// Mark interfaces that have to be kept.
programClassPool.classesAccept(new InterfaceUsageMarker(usageMarker));
@@ -100,7 +101,6 @@ public class Shrinker
{
new InnerUsageMarker(usageMarker),
new AnnotationUsageMarker(usageMarker),
- new SignatureUsageMarker(usageMarker),
new LocalVariableTypeUsageMarker(usageMarker)
}))));
@@ -146,7 +146,7 @@ public class Shrinker
}
}
- // Discard unused program classes.
+ // Clean up used program classes and discard unused program classes.
int originalProgramClassPoolSize = programClassPool.size();
ClassPool newProgramClassPool = new ClassPool();
@@ -160,6 +160,10 @@ public class Shrinker
programClassPool.clear();
+ // Clean up library classes.
+ libraryClassPool.classesAccept(
+ new ClassShrinker(usageMarker));
+
// Check if we have at least some output classes.
int newProgramClassPoolSize = newProgramClassPool.size();
if (newProgramClassPoolSize == 0)