|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectweb.asm.tree.MemberNode
org.objectweb.asm.tree.MethodNode
org.objectweb.asm.commons.JSRInlinerAdapter
public class JSRInlinerAdapter
A MethodAdapter that removes JSR instructions and
inlines the referenced subroutines.
Explanation of how it works TODO
| Nested Class Summary | |
|---|---|
protected static class |
JSRInlinerAdapter.Subroutine
|
| Field Summary |
|---|
| Fields inherited from class org.objectweb.asm.tree.MethodNode |
|---|
access, annotationDefault, desc, exceptions, instructions, invisibleParameterAnnotations, localVariables, maxLocals, maxStack, name, signature, tryCatchBlocks, visibleParameterAnnotations |
| Fields inherited from class org.objectweb.asm.tree.MemberNode |
|---|
attrs, invisibleAnnotations, visibleAnnotations |
| Constructor Summary | |
|---|---|
JSRInlinerAdapter(MethodVisitor mv,
int access,
String name,
String desc,
String signature,
String[] exceptions)
Creates a new JSRInliner. |
|
| Method Summary | |
|---|---|
void |
visitEnd()
If any JSRs were seen, triggers the inlining process. |
void |
visitJumpInsn(int opcode,
Label lbl)
Detects a JSR instruction and sets a flag to indicate we will need to do inlining. |
| Methods inherited from class org.objectweb.asm.tree.MethodNode |
|---|
accept, accept, getLabelNode, visitAnnotationDefault, visitCode, visitFieldInsn, visitFrame, visitIincInsn, visitInsn, visitIntInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLookupSwitchInsn, visitMaxs, visitMethodInsn, visitMultiANewArrayInsn, visitParameterAnnotation, visitTableSwitchInsn, visitTryCatchBlock, visitTypeInsn, visitVarInsn |
| Methods inherited from class org.objectweb.asm.tree.MemberNode |
|---|
visitAnnotation, visitAttribute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.objectweb.asm.MethodVisitor |
|---|
visitAnnotation, visitAttribute |
| Constructor Detail |
|---|
public JSRInlinerAdapter(MethodVisitor mv,
int access,
String name,
String desc,
String signature,
String[] exceptions)
mv - the MethodVisitor to send the resulting inlined
method code to (use null for none).access - the method's access flags (see Opcodes). This
parameter also indicates if the method is synthetic and/or
deprecated.name - the method's name.desc - the method's descriptor (see Type).signature - the method's signature. May be null.exceptions - the internal names of the method's exception classes
(see getInternalName). May be
null.| Method Detail |
|---|
public void visitJumpInsn(int opcode,
Label lbl)
visitJumpInsn in interface MethodVisitorvisitJumpInsn in class MethodNodeopcode - the opcode of the type instruction to be visited. This
opcode is either IFEQ, IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ,
IF_ICMPNE, IF_ICMPLT, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ACMPEQ,
IF_ACMPNE, GOTO, JSR, IFNULL or IFNONNULL.lbl - the operand of the instruction to be visited. This operand
is a label that designates the instruction to which the jump
instruction may jump.public void visitEnd()
visitEnd in interface MethodVisitorvisitEnd in class MemberNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||