Top Description Fields Constructors Methods
org.droidparts.dexmaker.dx.ssa

public Class LocalVariableExtractor

extends Object
Class Inheritance
Imports
org.droidparts.dexmaker.dx.rop.code.RegisterSpec, .RegisterSpecSet, org.droidparts.dexmaker.dx.util.IntList, java.util.ArrayList, .BitSet, .List

Code to figure out which local variables are active at which points in a method. Stolen and retrofitted from org.droidparts.dexmaker.dx.rop.code.LocalVariableExtractor TODO remove this. Allow Rop-form LocalVariableInfo to be passed in, converted, and adapted through edge-splitting.

Field Summary

Modifier and TypeField and Description
private final ArrayList<SsaBasicBlock>
blocks

non-null; block list for the method

private final SsaMethod
method

non-null; method being extracted from

private final LocalVariableInfo
resultInfo

non-null; result in-progress

private final BitSet
workSet

non-null; work set indicating blocks needing to be processed

Constructor Summary

AccessConstructor and Description
private
LocalVariableExtractor(SsaMethod
non-null; the method to extract from
method
)

Constructs an instance.

Method Summary

Modifier and TypeMethod and Description
private LocalVariableInfo

Returns:

non-null; the extracted information
doit
()

Does the extraction.

public static LocalVariableInfo

Returns:

non-null; the extracted information
extract
(SsaMethod
non-null; the method to extract from
method
)

Extracts out all the local variable information from the given method.

private void
processBlock(int
>= 0; block index of the block to process
blockIndex
)

Processes a single block.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

blocksback to summary
private final ArrayList<SsaBasicBlock> blocks

non-null; block list for the method

methodback to summary
private final SsaMethod method

non-null; method being extracted from

resultInfoback to summary
private final LocalVariableInfo resultInfo

non-null; result in-progress

workSetback to summary
private final BitSet workSet

non-null; work set indicating blocks needing to be processed

Constructor Detail

LocalVariableExtractorback to summary
private LocalVariableExtractor(SsaMethod method)

Constructs an instance. This method is private. Use extract.

Parameters
method:SsaMethod

non-null; the method to extract from

Method Detail

doitback to summary
private LocalVariableInfo doit()

Does the extraction.

Returns:LocalVariableInfo

non-null; the extracted information

extractback to summary
public static LocalVariableInfo extract(SsaMethod method)

Extracts out all the local variable information from the given method.

Parameters
method:SsaMethod

non-null; the method to extract from

Returns:LocalVariableInfo

non-null; the extracted information

processBlockback to summary
private void processBlock(int blockIndex)

Processes a single block.

Parameters
blockIndex:int

>= 0; block index of the block to process