Skip to content

Commit

Permalink
Automatic code cleanup.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 219881070
  • Loading branch information
cushon authored and Copybara-Service committed Nov 2, 2018
1 parent da39293 commit f8be43c
Show file tree
Hide file tree
Showing 19 changed files with 61 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ private static class ClassInfoBuilder extends ClassVisitor {
private boolean directDep;

public ClassInfoBuilder() {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class DepsCheckerClassVisitor extends ClassVisitor {
private final DepsCheckerMethodVisitor defaultMethodChecker = new DepsCheckerMethodVisitor();

public DepsCheckerClassVisitor(ClassCache classCache, ResultCollector resultCollector) {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
this.classCache = classCache;
this.resultCollector = resultCollector;
}
Expand Down Expand Up @@ -221,7 +221,7 @@ private void checkInternalNameArray(@Nullable String[] internalNames) {
private class DepsCheckerAnnotationVisitor extends AnnotationVisitor {

DepsCheckerAnnotationVisitor() {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
}

@Override
Expand Down Expand Up @@ -262,7 +262,7 @@ public void visitEnum(String name, String desc, String value) {
private class DepsCheckerFieldVisitor extends FieldVisitor {

DepsCheckerFieldVisitor() {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
}

@Override
Expand All @@ -283,7 +283,7 @@ public AnnotationVisitor visitTypeAnnotation(
private class DepsCheckerMethodVisitor extends MethodVisitor {

DepsCheckerMethodVisitor() {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private static class MockClassVisitor extends ClassVisitor {
final MockMethodVisitor mv = new MockMethodVisitor();

public MockClassVisitor() {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
}

@Override
Expand All @@ -86,7 +86,7 @@ private static class MockMethodVisitor extends MethodVisitor {
String desc;

public MockMethodVisitor() {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public final class BytecodeTypeInference extends MethodVisitor {
private final String methodSignature;

public BytecodeTypeInference(int access, String owner, String name, String methodDescriptor) {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
localVariableSlots = createInitialLocalVariableTypes(access, owner, name, methodDescriptor);
previousFrame = FrameInfo.create(ImmutableList.copyOf(localVariableSlots), ImmutableList.of());
this.methodSignature = owner + "." + name + methodDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class CloseResourceMethodScanner extends ClassVisitor {
private int classFileVersion;

public CloseResourceMethodScanner() {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
}

@Override
Expand Down Expand Up @@ -73,7 +73,7 @@ private class StackMapFrameCollector extends MethodVisitor {
private boolean hasStackMapFrame;

public StackMapFrameCollector(String name, String desc) {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
methodSignature = internalName + '.' + name + desc;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class CoreLibraryInvocationRewriter extends ClassVisitor {
private final CoreLibrarySupport support;

public CoreLibraryInvocationRewriter(ClassVisitor cv, CoreLibrarySupport support) {
super(Opcodes.ASM6, cv);
super(Opcodes.ASM7, cv);
this.support = support;
}

Expand All @@ -46,7 +46,7 @@ public MethodVisitor visitMethod(

private class CoreLibraryMethodInvocationRewriter extends MethodVisitor {
public CoreLibraryMethodInvocationRewriter(MethodVisitor mv) {
super(Opcodes.ASM6, mv);
super(Opcodes.ASM7, mv);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public DefaultMethodClassFixer(
@Nullable CoreLibrarySupport coreLibrarySupport,
ClassReaderFactory bootclasspath,
ClassLoader targetLoader) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
this.classpath = classpath;
this.coreLibrarySupport = coreLibrarySupport;
this.bootclasspath = bootclasspath;
Expand Down Expand Up @@ -454,7 +454,7 @@ private class DefaultMethodStubber extends ClassVisitor {

public DefaultMethodStubber(
boolean isBootclasspathInterface, boolean mayNeedStubsForSuperclass) {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
this.isBootclasspathInterface = isBootclasspathInterface;
this.mayNeedStubsForSuperclass = mayNeedStubsForSuperclass;
}
Expand Down Expand Up @@ -617,7 +617,7 @@ private class DefaultMethodFinder extends ClassVisitor {
private boolean found;

public DefaultMethodFinder() {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
}

@Override
Expand Down Expand Up @@ -663,7 +663,7 @@ private class InstanceMethodRecorder extends ClassVisitor {
private String className;

public InstanceMethodRecorder(boolean ignoreEmulatedMethods) {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
this.ignoreEmulatedMethods = ignoreEmulatedMethods;
}

Expand Down Expand Up @@ -711,7 +711,7 @@ private static class InterfaceInitializationNecessityDetector extends ClassVisit
private boolean hasDefaultMethods;

public InterfaceInitializationNecessityDetector(String internalName) {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
this.internalName = internalName;
}

Expand Down Expand Up @@ -745,7 +745,7 @@ public MethodVisitor visitMethod(
hasDefaultMethods = isNonBridgeDefaultMethod(access);
}
if ("<clinit>".equals(name)) {
return new MethodVisitor(Opcodes.ASM6) {
return new MethodVisitor(Opcodes.ASM7) {
@Override
public void visitFieldInsn(int opcode, String owner, String name, String desc) {
if (opcode == Opcodes.PUTSTATIC && internalName.equals(owner)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class EmulatedInterfaceRewriter extends ClassVisitor {
private final CoreLibrarySupport support;

public EmulatedInterfaceRewriter(ClassVisitor dest, CoreLibrarySupport support) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
this.support = support;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public InterfaceDesugaring(
ClassLoader targetLoader,
GeneratedClassStore store,
boolean legacyJaCoCo) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
this.interfaceCache = interfaceCache;
this.depsCollector = depsCollector;
this.coreLibrarySupport = coreLibrarySupport;
Expand Down Expand Up @@ -338,7 +338,7 @@ private ClassVisitor companion() {
private class InterfaceFieldWriteCollector extends MethodVisitor {

public InterfaceFieldWriteCollector(MethodVisitor mv) {
super(Opcodes.ASM6, mv);
super(Opcodes.ASM7, mv);
}

@Override
Expand Down Expand Up @@ -384,7 +384,7 @@ public InterfaceInvocationRewriter(
ClassLoader targetLoader,
DependencyCollector depsCollector,
String declaringClass) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
this.interfaceName = knownInterfaceName;
this.bootclasspath = bootclasspath;
this.targetLoader = targetLoader;
Expand Down Expand Up @@ -478,7 +478,7 @@ private Method findDefaultMethod(String owner, String name, String desc) {
private static class MoveJacocoFieldAccess extends MethodVisitor {

public MoveJacocoFieldAccess(MethodVisitor mv) {
super(Opcodes.ASM6, mv);
super(Opcodes.ASM7, mv);
}

@Override
Expand All @@ -501,7 +501,7 @@ private static class MultiplexAnnotations extends MethodVisitor {
private final MethodVisitor annotationOnlyDest;

public MultiplexAnnotations(@Nullable MethodVisitor dest, MethodVisitor annotationOnlyDest) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
this.annotationOnlyDest = annotationOnlyDest;
}

Expand Down Expand Up @@ -546,7 +546,7 @@ private static class MultiplexAnnotationVisitor extends AnnotationVisitor {

public MultiplexAnnotationVisitor(
@Nullable AnnotationVisitor dest, AnnotationVisitor... moreDestinations) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
this.moreDestinations = moreDestinations;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class InvokeDynamicLambdaMethodCollector extends ClassVisitor {
private boolean needOuterClassRewrite = false;

public InvokeDynamicLambdaMethodCollector() {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
}

/**
Expand Down Expand Up @@ -64,7 +64,7 @@ public void visitOuterClass(String owner, String name, String desc) {
private class LambdaMethodCollector extends MethodVisitor {

public LambdaMethodCollector(MethodVisitor dest) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class Java7Compatibility extends ClassVisitor {

public Java7Compatibility(
ClassVisitor cv, ClassReaderFactory factory, ClassReaderFactory bootclasspathReader) {
super(Opcodes.ASM6, cv);
super(Opcodes.ASM7, cv);
this.factory = factory;
this.bootclasspathReader = bootclasspathReader;
}
Expand Down Expand Up @@ -128,7 +128,7 @@ private class UpdateBytecodeVersionIfNecessary extends MethodVisitor {
boolean updated = false;

public UpdateBytecodeVersionIfNecessary(MethodVisitor methodVisitor) {
super(Opcodes.ASM6, methodVisitor);
super(Opcodes.ASM7, methodVisitor);
}

@Override
Expand Down Expand Up @@ -160,7 +160,7 @@ public void visitMethodInsn(int opcode, String owner, String name, String desc,

private class InlineJacocoInit extends MethodVisitor {
public InlineJacocoInit(MethodVisitor dest) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
}

@Override
Expand All @@ -186,7 +186,7 @@ private static class InlineOneMethod extends ClassVisitor {
private int copied = 0;

public InlineOneMethod(String methodName, MethodVisitor dest) {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
this.methodName = methodName;
this.dest = dest;
}
Expand Down Expand Up @@ -220,7 +220,7 @@ private static class InlineMethodBody extends MethodVisitor {
public InlineMethodBody(MethodVisitor dest) {
// We'll set the destination visitor in visitCode() to reduce the risk of copying anything
// we didn't mean to copy
super(Opcodes.ASM6, (MethodVisitor) null);
super(Opcodes.ASM7, (MethodVisitor) null);
this.dest = dest;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public LambdaClassFixer(
ImmutableSet<String> interfaceLambdaMethods,
boolean allowDefaultMethods,
boolean copyBridgeMethods) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
checkArgument(!allowDefaultMethods || interfaceLambdaMethods.isEmpty());
checkArgument(allowDefaultMethods || copyBridgeMethods);
this.lambdaInfo = lambdaInfo;
Expand Down Expand Up @@ -241,7 +241,7 @@ private void copyBridgeMethods(ImmutableList<String> interfaces) {
/** Rewriter for methods in generated lambda classes. */
private class LambdaClassMethodRewriter extends MethodVisitor {
public LambdaClassMethodRewriter(MethodVisitor dest) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
}

@Override
Expand Down Expand Up @@ -301,7 +301,7 @@ public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
private static class LambdaClassInvokeSpecialRewriter extends MethodVisitor {

public LambdaClassInvokeSpecialRewriter(MethodVisitor dest) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
}

@Override
Expand All @@ -326,7 +326,7 @@ private class CopyBridgeMethods extends ClassVisitor {

public CopyBridgeMethods() {
// No delegate visitor; instead we'll add methods to the outer class's delegate where needed
super(Opcodes.ASM6);
super(Opcodes.ASM7);
}

@Override
Expand Down Expand Up @@ -371,7 +371,7 @@ private class CopyOneMethod extends ClassVisitor {

public CopyOneMethod(String methodName) {
// No delegate visitor; instead we'll add methods to the outer class's delegate where needed
super(Opcodes.ASM6);
super(Opcodes.ASM7);
checkState(!allowDefaultMethods, "Couldn't copy interface lambda bodies");
this.methodName = methodName;
}
Expand Down Expand Up @@ -416,7 +416,7 @@ public MethodVisitor visitMethod(
*/
private static class AvoidJacocoInit extends MethodVisitor {
public AvoidJacocoInit(MethodVisitor dest) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
}

@Override
Expand Down Expand Up @@ -445,7 +445,7 @@ public UseBridgeMethod(
String desc,
String signature,
String[] exceptions) {
super(Opcodes.ASM6, access, name, desc, signature, exceptions);
super(Opcodes.ASM7, access, name, desc, signature, exceptions);
this.dest = dest;
this.lambdaInfo = lambdaInfo;
this.classLoader = classLoader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static java.lang.invoke.MethodHandles.publicLookup;
import static org.objectweb.asm.Opcodes.ASM6;

import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableSet;
Expand Down Expand Up @@ -74,7 +73,7 @@ public LambdaDesugaring(
ImmutableSet.Builder<String> aggregateInterfaceLambdaMethods,
ImmutableSet<MethodInfo> lambdaMethodsUsedInInvokeDyanmic,
boolean allowDefaultMethods) {
super(Opcodes.ASM6, dest);
super(Opcodes.ASM7, dest);
this.targetLoader = targetLoader;
this.lambdas = lambdas;
this.aggregateInterfaceLambdaMethods = aggregateInterfaceLambdaMethods;
Expand Down Expand Up @@ -382,7 +381,7 @@ public InvokedynamicRewriter(
String desc,
String signature,
String[] exceptions) {
super(ASM6, access, name, desc, signature, exceptions);
super(Opcodes.ASM7, access, name, desc, signature, exceptions);
this.dest = checkNotNull(dest, "Null destination for %s.%s : %s", internalName, name, desc);
}

Expand Down
Loading

0 comments on commit f8be43c

Please sign in to comment.