Top Description Fields Constructors Methods
org.objectweb.asm.tree.analysis

pack-priv final Class Subroutine

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, org.objectweb.asm.tree.JumpInsnNode, .LabelNode

A method subroutine (corresponds to a JSR instruction).
Author
Eric Bruneton

Field Summary

Modifier and TypeField and Description
pack-priv final List<JumpInsnNode>
callers

The JSR instructions that jump to this subroutine.

pack-priv final boolean[]
localsUsed

The local variables that are read or written by this subroutine.

pack-priv final LabelNode
start

The start of this subroutine.

Constructor Summary

AccessConstructor and Description
pack-priv
Subroutine(final LabelNode
the start of this subroutine.
start
,
final int
the local variables that are read or written by this subroutine.
maxLocals
,
final JumpInsnNode
a JSR instruction that jump to this subroutine.
caller
)

Constructs a new Subroutine.

pack-priv
Subroutine(final Subroutine
the subroutine to copy.
subroutine
)

Constructs a copy of the given Subroutine.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

whether this subroutine has been modified by this method.
merge
(final Subroutine
another subroutine. This subroutine is left unchanged by this method.
subroutine
)

Merges the given subroutine into this subroutine.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

callersback to summary
pack-priv final List<JumpInsnNode> callers

The JSR instructions that jump to this subroutine.

localsUsedback to summary
pack-priv final boolean[] localsUsed

The local variables that are read or written by this subroutine. The i-th element is true if and only if the local variable at index i is read or written by this subroutine.

startback to summary
pack-priv final LabelNode start

The start of this subroutine.

Constructor Detail

Subroutineback to summary
pack-priv Subroutine(final LabelNode start, final int maxLocals, final JumpInsnNode caller)

Constructs a new Subroutine.

Parameters
start:LabelNode

the start of this subroutine.

maxLocals:int

the local variables that are read or written by this subroutine.

caller:JumpInsnNode

a JSR instruction that jump to this subroutine.

Subroutineback to summary
pack-priv Subroutine(final Subroutine subroutine)

Constructs a copy of the given Subroutine.

Parameters
subroutine:Subroutine

the subroutine to copy.

Method Detail

mergeback to summary
public boolean merge(final Subroutine subroutine)

Merges the given subroutine into this subroutine. The local variables read or written by the given subroutine are marked as read or written by this one, and the callers of the given subroutine are added as callers of this one (if both have the same start).

Parameters
subroutine:Subroutine

another subroutine. This subroutine is left unchanged by this method.

Returns:boolean

whether this subroutine has been modified by this method.