diff options
Diffstat (limited to 'src/proguard/optimize/info/MethodOptimizationInfo.java')
-rw-r--r-- | src/proguard/optimize/info/MethodOptimizationInfo.java | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/proguard/optimize/info/MethodOptimizationInfo.java b/src/proguard/optimize/info/MethodOptimizationInfo.java index fe754e5..9bfdb50 100644 --- a/src/proguard/optimize/info/MethodOptimizationInfo.java +++ b/src/proguard/optimize/info/MethodOptimizationInfo.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 @@ -38,6 +38,7 @@ public class MethodOptimizationInfo private boolean catchesExceptions = false; private boolean branchesBackward = false; private boolean invokesSuperMethods = false; + private boolean invokesDynamically = false; private boolean accessesPrivateCode = false; private boolean accessesPackageCode = false; private boolean accessesProtectedCode = false; @@ -58,7 +59,7 @@ public class MethodOptimizationInfo int parameterCount = ClassUtil.internalMethodParameterCount(method.getDescriptor(clazz)); - if ((method.getAccessFlags() & ClassConstants.INTERNAL_ACC_STATIC) == 0) + if ((method.getAccessFlags() & ClassConstants.ACC_STATIC) == 0) { parameterCount++; } @@ -142,6 +143,18 @@ public class MethodOptimizationInfo } + public void setInvokesDynamically() + { + invokesDynamically = true; + } + + + public boolean invokesDynamically() + { + return invokesDynamically; + } + + public void setAccessesPrivateCode() { accessesPrivateCode = true; @@ -256,6 +269,13 @@ public class MethodOptimizationInfo } + // For setting enum return values. + public void setReturnValue(Value returnValue) + { + this.returnValue = returnValue; + } + + public void merge(MethodOptimizationInfo other) { if (other != null) @@ -266,6 +286,7 @@ public class MethodOptimizationInfo this.catchesExceptions |= other.catchesExceptions; this.branchesBackward |= other.branchesBackward; this.invokesSuperMethods |= other.invokesSuperMethods; + this.invokesDynamically |= other.invokesDynamically; this.accessesPrivateCode |= other.accessesPrivateCode; this.accessesPackageCode |= other.accessesPackageCode; this.accessesProtectedCode |= other.accessesProtectedCode; |