Commit 76941586 authored by Eric Bruneton's avatar Eric Bruneton
Browse files

Merge branch 'move-nestmates-to-experimental-api' into 'ASM7_NESTMATES'

Add an experimental suffix to the new features (also mark them deprecated and…

See merge request asm/asm!171
parents b3f72751 e6d88b10
......@@ -61,7 +61,7 @@ public class BasicInterpreter extends Interpreter<BasicValue> implements Opcodes
* version.
*/
public BasicInterpreter() {
super(ASM7);
super(ASM6);
if (getClass() != BasicInterpreter.class) {
throw new IllegalStateException();
}
......@@ -72,7 +72,7 @@ public class BasicInterpreter extends Interpreter<BasicValue> implements Opcodes
*
* @param api the ASM API version supported by this interpreter. Must be one of {@link
* org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
*/
protected BasicInterpreter(final int api) {
super(api);
......
......@@ -48,7 +48,7 @@ public class BasicVerifier extends BasicInterpreter {
* use this constructor</i>. Instead, they must use the {@link #BasicVerifier(int)} version.
*/
public BasicVerifier() {
super(ASM7);
super(ASM6);
if (getClass() != BasicVerifier.class) {
throw new IllegalStateException();
}
......@@ -59,7 +59,7 @@ public class BasicVerifier extends BasicInterpreter {
*
* @param api the ASM API version supported by this interpreter. Must be one of {@link
* org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
*/
protected BasicVerifier(final int api) {
super(api);
......
......@@ -47,7 +47,7 @@ public abstract class Interpreter<V extends Value> {
/**
* The ASM API version supported by this interpreter. The value of this field must be one of
* {@link org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
*/
protected final int api;
......@@ -56,7 +56,7 @@ public abstract class Interpreter<V extends Value> {
*
* @param api the ASM API version supported by this interpreter. Must be one of {@link
* org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
*/
protected Interpreter(final int api) {
this.api = api;
......
......@@ -94,7 +94,7 @@ public class SimpleVerifier extends BasicVerifier {
final Type currentSuperClass,
final List<Type> currentClassInterfaces,
final boolean isInterface) {
this(ASM7, currentClass, currentSuperClass, currentClassInterfaces, isInterface);
this(ASM6, currentClass, currentSuperClass, currentClassInterfaces, isInterface);
if (getClass() != SimpleVerifier.class) {
throw new IllegalStateException();
}
......@@ -106,7 +106,7 @@ public class SimpleVerifier extends BasicVerifier {
*
* @param api the ASM API version supported by this verifier. Must be one of {@link
* org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
* @param currentClass the type of the class to be verified.
* @param currentSuperClass the type of the super class of the class to be verified.
* @param currentClassInterfaces the types of the interfaces directly implemented by the class to
......
......@@ -52,7 +52,7 @@ public class SourceInterpreter extends Interpreter<SourceValue> implements Opcod
* version.
*/
public SourceInterpreter() {
super(ASM7);
super(ASM6);
if (getClass() != SourceInterpreter.class) {
throw new IllegalStateException();
}
......@@ -63,7 +63,7 @@ public class SourceInterpreter extends Interpreter<SourceValue> implements Opcod
*
* @param api the ASM API version supported by this interpreter. Must be one of {@link
* org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
*/
protected SourceInterpreter(final int api) {
super(api);
......
......@@ -478,7 +478,7 @@ public class SimpleVerifierTest extends AsmTest implements Opcodes {
Type baseType = Type.getObjectType("C");
Type superType = Type.getObjectType("D");
Type interfaceType = Type.getObjectType("I");
new SimpleVerifier(ASM7, baseType, superType, Arrays.asList(interfaceType), false) {
new SimpleVerifier(ASM6, baseType, superType, Arrays.asList(interfaceType), false) {
void test() {
assertTrue(isAssignableFrom(baseType, baseType));
......@@ -496,7 +496,7 @@ public class SimpleVerifierTest extends AsmTest implements Opcodes {
}
}.test();
new SimpleVerifier(ASM7, interfaceType, null, null, true) {
new SimpleVerifier(ASM6, interfaceType, null, null, true) {
void test() {
assertTrue(isAssignableFrom(interfaceType, baseType));
......
......@@ -77,7 +77,7 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes
* Constructs a new {@link AdviceAdapter}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
* @param mv the method visitor to which this adapter delegates calls.
* @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name.
......
......@@ -115,7 +115,7 @@ public class AnalyzerAdapter extends MethodVisitor {
final String name,
final String desc,
final MethodVisitor mv) {
this(Opcodes.ASM7, owner, access, name, desc, mv);
this(Opcodes.ASM6, owner, access, name, desc, mv);
if (getClass() != AnalyzerAdapter.class) {
throw new IllegalStateException();
}
......@@ -125,7 +125,7 @@ public class AnalyzerAdapter extends MethodVisitor {
* Constructs a new {@link AnalyzerAdapter}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
* @param owner the owner's class name.
* @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name.
......
......@@ -41,7 +41,7 @@ public class AnnotationRemapper extends AnnotationVisitor {
protected final Remapper remapper;
public AnnotationRemapper(final AnnotationVisitor av, final Remapper remapper) {
this(Opcodes.ASM7, av, remapper);
this(Opcodes.ASM6, av, remapper);
}
protected AnnotationRemapper(final int api, final AnnotationVisitor av, final Remapper remapper) {
......
......@@ -51,7 +51,7 @@ public class ClassRemapper extends ClassVisitor {
protected String className;
public ClassRemapper(final ClassVisitor cv, final Remapper remapper) {
this(Opcodes.ASM7, cv, remapper);
this(Opcodes.ASM6, cv, remapper);
}
protected ClassRemapper(final int api, final ClassVisitor cv, final Remapper remapper) {
......@@ -155,13 +155,13 @@ public class ClassRemapper extends ClassVisitor {
}
@Override
public void visitNestHost(final String nestHost) {
super.visitNestHost(remapper.mapType(nestHost));
public void visitNestHostExperimental(final String nestHost) {
super.visitNestHostExperimental(remapper.mapType(nestHost));
}
@Override
public void visitNestMember(final String nestMember) {
super.visitNestMember(remapper.mapType(nestMember));
public void visitNestMemberExperimental(final String nestMember) {
super.visitNestMemberExperimental(remapper.mapType(nestMember));
}
protected FieldVisitor createFieldRemapper(FieldVisitor fv) {
......
......@@ -44,7 +44,7 @@ public class CodeSizeEvaluator extends MethodVisitor implements Opcodes {
private int maxSize;
public CodeSizeEvaluator(final MethodVisitor mv) {
this(Opcodes.ASM7, mv);
this(Opcodes.ASM6, mv);
}
protected CodeSizeEvaluator(final int api, final MethodVisitor mv) {
......
......@@ -43,7 +43,7 @@ public class FieldRemapper extends FieldVisitor {
private final Remapper remapper;
public FieldRemapper(final FieldVisitor fv, final Remapper remapper) {
this(Opcodes.ASM7, fv, remapper);
this(Opcodes.ASM6, fv, remapper);
}
protected FieldRemapper(final int api, final FieldVisitor fv, final Remapper remapper) {
......
......@@ -198,7 +198,7 @@ public class GeneratorAdapter extends LocalVariablesSorter {
*/
public GeneratorAdapter(
final MethodVisitor mv, final int access, final String name, final String desc) {
this(Opcodes.ASM7, mv, access, name, desc);
this(Opcodes.ASM6, mv, access, name, desc);
if (getClass() != GeneratorAdapter.class) {
throw new IllegalStateException();
}
......@@ -208,7 +208,7 @@ public class GeneratorAdapter extends LocalVariablesSorter {
* Constructs a new {@link GeneratorAdapter}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
* @param mv the method visitor to which this adapter delegates calls.
* @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name.
......
......@@ -51,7 +51,7 @@ public class InstructionAdapter extends MethodVisitor {
* @throws IllegalStateException If a subclass calls this constructor.
*/
public InstructionAdapter(final MethodVisitor mv) {
this(Opcodes.ASM7, mv);
this(Opcodes.ASM6, mv);
if (getClass() != InstructionAdapter.class) {
throw new IllegalStateException();
}
......@@ -61,7 +61,7 @@ public class InstructionAdapter extends MethodVisitor {
* Constructs a new {@link InstructionAdapter}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
* @param mv the method visitor to which this adapter delegates calls.
*/
protected InstructionAdapter(final int api, final MethodVisitor mv) {
......
......@@ -102,7 +102,7 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes {
final String desc,
final String signature,
final String[] exceptions) {
this(Opcodes.ASM7, mv, access, name, desc, signature, exceptions);
this(Opcodes.ASM6, mv, access, name, desc, signature, exceptions);
if (getClass() != JSRInlinerAdapter.class) {
throw new IllegalStateException();
}
......@@ -112,7 +112,7 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes {
* Constructs a new JSRInliner.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
* @param mv the <code>MethodVisitor</code> to send the resulting inlined method code to (use
* <code>null</code> for none).
* @param access the method's access flags (see {@link Opcodes}). This parameter also indicates if
......
......@@ -76,7 +76,7 @@ public class LocalVariablesSorter extends MethodVisitor {
* @throws IllegalStateException If a subclass calls this constructor.
*/
public LocalVariablesSorter(final int access, final String desc, final MethodVisitor mv) {
this(Opcodes.ASM7, access, desc, mv);
this(Opcodes.ASM6, access, desc, mv);
if (getClass() != LocalVariablesSorter.class) {
throw new IllegalStateException();
}
......@@ -86,7 +86,7 @@ public class LocalVariablesSorter extends MethodVisitor {
* Constructs a new {@link LocalVariablesSorter}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
* @param access access flags of the adapted method.
* @param desc the method's descriptor (see {@link Type Type}).
* @param mv the method visitor to which this adapter delegates calls.
......
......@@ -45,7 +45,7 @@ public class MethodRemapper extends MethodVisitor {
protected final Remapper remapper;
public MethodRemapper(final MethodVisitor mv, final Remapper remapper) {
this(Opcodes.ASM7, mv, remapper);
this(Opcodes.ASM6, mv, remapper);
}
protected MethodRemapper(final int api, final MethodVisitor mv, final Remapper remapper) {
......
......@@ -40,7 +40,7 @@ public class ModuleRemapper extends ModuleVisitor {
private final Remapper remapper;
public ModuleRemapper(final ModuleVisitor mv, final Remapper remapper) {
this(Opcodes.ASM7, mv, remapper);
this(Opcodes.ASM6, mv, remapper);
}
protected ModuleRemapper(final int api, final ModuleVisitor mv, final Remapper remapper) {
......
......@@ -145,7 +145,7 @@ public class SerialVersionUIDAdder extends ClassVisitor {
* @throws IllegalStateException If a subclass calls this constructor.
*/
public SerialVersionUIDAdder(final ClassVisitor cv) {
this(Opcodes.ASM7, cv);
this(Opcodes.ASM6, cv);
if (getClass() != SerialVersionUIDAdder.class) {
throw new IllegalStateException();
}
......@@ -155,7 +155,7 @@ public class SerialVersionUIDAdder extends ClassVisitor {
* Constructs a new {@link SerialVersionUIDAdder}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
* @param cv a {@link ClassVisitor} to which this visitor will delegate calls.
*/
protected SerialVersionUIDAdder(final int api, final ClassVisitor cv) {
......
......@@ -47,7 +47,7 @@ public class SignatureRemapper extends SignatureVisitor {
private Stack<String> classNames = new Stack<String>();
public SignatureRemapper(final SignatureVisitor v, final Remapper remapper) {
this(Opcodes.ASM7, v, remapper);
this(Opcodes.ASM6, v, remapper);
}
protected SignatureRemapper(final int api, final SignatureVisitor v, final Remapper remapper) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment