mirror of
https://github.com/alibaba/arthas.git
synced 2026-10-21 10:19:43 +00:00
upgrade asm to 8.0.1
This commit is contained in:
@@ -17,7 +17,7 @@ public class InliningAdapter extends LocalVariablesSorter {
|
||||
private LocalVariablesSorter lvs;
|
||||
|
||||
public InliningAdapter(LocalVariablesSorter mv, int access, String desc, Label end) {
|
||||
super(Opcodes.ASM7, access, desc, mv);
|
||||
super(Opcodes.ASM8, access, desc, mv);
|
||||
this.end = end;
|
||||
this.lvs = mv;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class MethodCallInliner extends GeneratorAdapter {
|
||||
|
||||
public MethodCallInliner(int access, String name, String desc, MethodVisitor mv,
|
||||
MethodNode toBeInlined) {
|
||||
super(Opcodes.ASM7, mv, access, name, desc);
|
||||
super(Opcodes.ASM8, mv, access, name, desc);
|
||||
this.toBeInlined = toBeInlined;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class AsmUtils {
|
||||
|
||||
public static ClassNode toClassNode(byte[] classBytes) {
|
||||
ClassReader reader = new ClassReader(classBytes);
|
||||
ClassNode result = new ClassNode(Opcodes.ASM7);
|
||||
ClassNode result = new ClassNode(Opcodes.ASM8);
|
||||
reader.accept(result, ClassReader.SKIP_FRAMES);
|
||||
return result;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ public class AsmUtils {
|
||||
}
|
||||
|
||||
public static MethodNode newMethodNode(MethodNode source) {
|
||||
return new MethodNode(Opcodes.ASM7, source.access, source.name, source.desc, source.signature,
|
||||
return new MethodNode(Opcodes.ASM8, source.access, source.name, source.desc, source.signature,
|
||||
source.exceptions.toArray(new String[source.exceptions.size()]));
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public class AsmUtils {
|
||||
|
||||
public static MethodNode removeLineNumbers(MethodNode methodNode) {
|
||||
MethodNode result = newMethodNode(methodNode);
|
||||
methodNode.accept(new MethodVisitor(Opcodes.ASM7, result) {
|
||||
methodNode.accept(new MethodVisitor(Opcodes.ASM8, result) {
|
||||
public void visitLineNumber(int line, Label start) {
|
||||
}
|
||||
});
|
||||
@@ -330,8 +330,8 @@ public class AsmUtils {
|
||||
}
|
||||
|
||||
public static ClassNode copy(ClassNode source) {
|
||||
ClassNode result = new ClassNode(Opcodes.ASM7);
|
||||
source.accept(new ClassVisitor(Opcodes.ASM7, result) {
|
||||
ClassNode result = new ClassNode(Opcodes.ASM8);
|
||||
source.accept(new ClassVisitor(Opcodes.ASM8, result) {
|
||||
@Override
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature,
|
||||
String[] exceptions) {
|
||||
|
||||
@@ -363,7 +363,7 @@ public class AdviceWeaver extends ClassVisitor implements Opcodes {
|
||||
* @param cv ClassVisitor for ASM
|
||||
*/
|
||||
public AdviceWeaver(int adviceId, boolean isTracing, boolean skipJDKTrace, String className, Matcher matcher, EnhancerAffect affect, ClassVisitor cv) {
|
||||
super(Opcodes.ASM7, cv);
|
||||
super(Opcodes.ASM8, cv);
|
||||
this.adviceId = adviceId;
|
||||
this.isTracing = isTracing;
|
||||
this.skipJDKTrace = skipJDKTrace;
|
||||
@@ -418,7 +418,7 @@ public class AdviceWeaver extends ClassVisitor implements Opcodes {
|
||||
// 编织方法计数
|
||||
affect.mCnt(1);
|
||||
|
||||
return new AdviceAdapter(Opcodes.ASM7, new JSRInlinerAdapter(mv, access, name, desc, signature, exceptions), access, name, desc) {
|
||||
return new AdviceAdapter(Opcodes.ASM8, new JSRInlinerAdapter(mv, access, name, desc, signature, exceptions), access, name, desc) {
|
||||
|
||||
// -- Label for try...catch block
|
||||
private final Label beginLabel = new Label();
|
||||
|
||||
@@ -133,12 +133,12 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba.arthas</groupId>
|
||||
<artifactId>arthas-repackage-logger</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<version>0.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.arthas</groupId>
|
||||
<artifactId>arthas-repackage-asm</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<version>0.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
|
||||
Reference in New Issue
Block a user