Updated to ASM4 final.

This commit is contained in:
Reinier Zwitserloot committed 2012-01-09 23:47:45 +01:00
1 parent 2ddf708b37
commit a59a2c482b
5 files changed
+18 -20

No files matched your search

@@ -1,14 +1,14 @@
<ivy-module version="2.0">
<info organisation="org.projectlombok" module="lombok.patcher" revision="0.5" publication="20110607001300">
<info organisation="org.projectlombok" module="lombok.patcher" revision="0.6" publication="20120109234200">
<license name="MIT License" url="http://www.opensource.org/licenses/mit-license.php" />
<ivyauthor name="rzwitserloot" url="http://zwitserloot.com/" />
<ivyauthor name="rspilker" url="http://github.com/rspilker" />
<description homepage="http://projectlombok.org/" />
</info>
<configurations>
<conf name="build" />
<conf name="default" />
</configurations>
<publications>
<artifact conf="build" url="http://projectlombok.org/downloads/lombok.patcher-0.5.jar" />
<artifact conf="default" url="http://projectlombok.org/downloads/lombok.patcher-0.6.jar" />
</publications>
</ivy-module>
+1 -1
View File
@@ -11,7 +11,7 @@
<conf name="javac7" />
</configurations>
<dependencies>
<dependency org="org.projectlombok" name="lombok.patcher" rev="0.5" conf="build; runtime->build" />
<dependency org="org.projectlombok" name="lombok.patcher" rev="0.6" conf="build->default; runtime->default" />
<dependency org="zwitserloot.com" name="cmdreader" rev="1.2" conf="build->runtime; runtime" />
<dependency org="junit" name="junit" rev="4.8.2" conf="test->default; contrib->sources" />
+3 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 The Project Lombok Authors.
* Copyright (C) 2010-2012 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -21,11 +21,11 @@
*/
package lombok.bytecode;
import org.objectweb.asm.ClassAdapter;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.commons.JSRInlinerAdapter;
class AsmUtil {
@@ -38,7 +38,7 @@ class AsmUtil {
ClassReader reader = new ClassReader(byteCode);
ClassWriter writer = new FixedClassWriter(reader, 0);
ClassVisitor visitor = new ClassAdapter(writer) {
ClassVisitor visitor = new ClassVisitor(Opcodes.ASM4, writer) {
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
return new JSRInlinerAdapter(super.visitMethod(access, name, desc, signature, exceptions), access, name, desc, signature, exceptions);
}
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 The Project Lombok Authors.
* Copyright (C) 2010-2012 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -29,10 +29,9 @@ import lombok.core.DiagnosticsReceiver;
import lombok.core.PostCompilerTransformation;
import org.mangosdk.spi.ProviderFor;
import org.objectweb.asm.ClassAdapter;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.MethodAdapter;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
@@ -49,9 +48,9 @@ public class PreventNullAnalysisRemover implements PostCompilerTransformation {
final AtomicBoolean changesMade = new AtomicBoolean();
class PreventNullanalysisVisitor extends MethodAdapter {
class PreventNullanalysisVisitor extends MethodVisitor {
PreventNullanalysisVisitor(MethodVisitor mv) {
super(mv);
super(Opcodes.ASM4, mv);
}
@Override public void visitMethodInsn(int opcode, String owner, String name, String desc) {
@@ -68,7 +67,7 @@ public class PreventNullAnalysisRemover implements PostCompilerTransformation {
}
}
reader.accept(new ClassAdapter(writer) {
reader.accept(new ClassVisitor(Opcodes.ASM4, writer) {
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
return new PreventNullanalysisVisitor(super.visitMethod(access, name, desc, signature, exceptions));
}
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 The Project Lombok Authors.
* Copyright (C) 2010-2012 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -21,7 +21,7 @@
*/
package lombok.bytecode;
import static lombok.bytecode.AsmUtil.*;
import static lombok.bytecode.AsmUtil.fixJSRInlining;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -31,11 +31,10 @@ import lombok.core.PostCompilerTransformation;
import org.mangosdk.spi.ProviderFor;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.Attribute;
import org.objectweb.asm.ClassAdapter;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodAdapter;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
@@ -52,11 +51,11 @@ public class SneakyThrowsRemover implements PostCompilerTransformation {
final AtomicBoolean changesMade = new AtomicBoolean();
class SneakyThrowsRemoverVisitor extends MethodAdapter {
class SneakyThrowsRemoverVisitor extends MethodVisitor {
boolean justAddedAthrow = false;
SneakyThrowsRemoverVisitor(MethodVisitor mv) {
super(mv);
super(Opcodes.ASM4, mv);
}
@Override public void visitMethodInsn(int opcode, String owner, String name, String desc) {
@@ -168,7 +167,7 @@ public class SneakyThrowsRemover implements PostCompilerTransformation {
}
}
reader.accept(new ClassAdapter(writer) {
reader.accept(new ClassVisitor(Opcodes.ASM4, writer) {
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
return new SneakyThrowsRemoverVisitor(super.visitMethod(access, name, desc, signature, exceptions));
}