| Interface | Description |
|---|---|
| InlineContext |
An InlineContext gives access to the CallGraph for the
program whose classes are being operated on by BLOAT.
|
| Class | Description |
|---|---|
| CallGraph |
Grants access to certain information about a Java program.
|
| Inline |
Inlines the code of non-virtual method call sites.
|
| InlineStats |
This class is used to gather statistics about inlining.
|
| InstructionStack |
The of InstructionStack keeps track of which instructions pushed a
certain element of the stack.
|
| Specialize |
Performs call site specialization for virtual method invocations.
|
| StackHeightCounter |
Used to keep track of the height of the stack.
|
Classes for performing method inlining. The first step in method ininling is to create the call graph for a Java "program". Rapid Type Analysis [Bacon 1997] is used to keep the size of the call graph managable. RTA uses the class hierarchy to determine all possible methods that may be invoked at a given call site. Methods are only considered to be live if their class is instantiated somewhere in the program.
Call sites are specialized using the resolves-to information supplied by the call graph. Each virtual method call is transformed into a "switch" statement on the possible receiver types. The receiver is cast to a given type and a static method is invoked in place of the virtual method.