diff options
Diffstat (limited to 'src/proguard/optimize/TailRecursionSimplifier.java')
-rw-r--r-- | src/proguard/optimize/TailRecursionSimplifier.java | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/proguard/optimize/TailRecursionSimplifier.java b/src/proguard/optimize/TailRecursionSimplifier.java index f820566..dd38d6b 100644 --- a/src/proguard/optimize/TailRecursionSimplifier.java +++ b/src/proguard/optimize/TailRecursionSimplifier.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 @@ -23,7 +23,7 @@ package proguard.optimize; import proguard.classfile.*; import proguard.classfile.attribute.*; import proguard.classfile.attribute.visitor.*; -import proguard.classfile.constant.MethodrefConstant; +import proguard.classfile.constant.*; import proguard.classfile.constant.visitor.ConstantVisitor; import proguard.classfile.editor.CodeAttributeComposer; import proguard.classfile.instruction.*; @@ -91,15 +91,14 @@ implements AttributeVisitor, int accessFlags = method.getAccessFlags(); if (// Only check the method if it is private, static, or final. - (accessFlags & (ClassConstants.INTERNAL_ACC_PRIVATE | - ClassConstants.INTERNAL_ACC_STATIC | - ClassConstants.INTERNAL_ACC_FINAL)) != 0 && + (accessFlags & (ClassConstants.ACC_PRIVATE | + ClassConstants.ACC_STATIC | + ClassConstants.ACC_FINAL)) != 0 && // Only check the method if it is not synchronized, etc. - (accessFlags & (ClassConstants.INTERNAL_ACC_SYNCHRONIZED | - ClassConstants.INTERNAL_ACC_NATIVE | - ClassConstants.INTERNAL_ACC_INTERFACE | - ClassConstants.INTERNAL_ACC_ABSTRACT)) == 0) + (accessFlags & (ClassConstants.ACC_SYNCHRONIZED | + ClassConstants.ACC_NATIVE | + ClassConstants.ACC_ABSTRACT)) == 0) { // codeAttributeComposer.DEBUG = DEBUG = // clazz.getName().equals("abc/Def") && @@ -254,7 +253,7 @@ implements AttributeVisitor, // Implementations for ConstantVisitor. - public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) + public void visitAnyMethodrefConstant(Clazz clazz, RefConstant methodrefConstant) { recursive = targetMethod.equals(methodrefConstant.referencedMember); } @@ -280,7 +279,7 @@ implements AttributeVisitor, String descriptor = method.getDescriptor(clazz); boolean isStatic = - (method.getAccessFlags() & ClassConstants.INTERNAL_ACC_STATIC) != 0; + (method.getAccessFlags() & ClassConstants.ACC_STATIC) != 0; // Count the number of parameters, taking into account their categories. int parameterSize = ClassUtil.internalMethodParameterSize(descriptor); @@ -314,23 +313,23 @@ implements AttributeVisitor, byte opcode; switch (parameterType.charAt(0)) { - case ClassConstants.INTERNAL_TYPE_BOOLEAN: - case ClassConstants.INTERNAL_TYPE_BYTE: - case ClassConstants.INTERNAL_TYPE_CHAR: - case ClassConstants.INTERNAL_TYPE_SHORT: - case ClassConstants.INTERNAL_TYPE_INT: + case ClassConstants.TYPE_BOOLEAN: + case ClassConstants.TYPE_BYTE: + case ClassConstants.TYPE_CHAR: + case ClassConstants.TYPE_SHORT: + case ClassConstants.TYPE_INT: opcode = InstructionConstants.OP_ISTORE; break; - case ClassConstants.INTERNAL_TYPE_LONG: + case ClassConstants.TYPE_LONG: opcode = InstructionConstants.OP_LSTORE; break; - case ClassConstants.INTERNAL_TYPE_FLOAT: + case ClassConstants.TYPE_FLOAT: opcode = InstructionConstants.OP_FSTORE; break; - case ClassConstants.INTERNAL_TYPE_DOUBLE: + case ClassConstants.TYPE_DOUBLE: opcode = InstructionConstants.OP_DSTORE; break; |