FLEX API documentation

This document is the API specification for the FLEX Java compiler infrastructure, created by the Program Analysis and Compilation Group at MIT.


Basic Class/Method/Field handling
harpoon.ClassFile Representations of class hierarchy, object structure, and method code.


Intermediate Representations
harpoon.IR Parent package for implementations of intermediate representations.
harpoon.IR.Assem An opaque representation of machine-specific assembly instructions for use in register-allocation.
harpoon.IR.Bytecode An analysis-oriented representation of Java bytecode.
harpoon.IR.Jasmin This package contains code to output Quad form with explicit tries to Jasmin assembly code.
harpoon.IR.LowQuad A low-level quadruple-based IR with explicit pointers.
harpoon.IR.Properties This package contains interfaces defining various properties of an intermediate representation.
harpoon.IR.Quads A flat, typed, high-level quadruple-based IR.
harpoon.IR.RawClass A representation of the on-disk format of a bytecode file.
harpoon.IR.Tree An expression-tree oriented low-level IR, intended to facilitate machine-specific pattern-matching code-generation.
harpoon.Temp Provides the classes for uniquely generating and manipulating Temporaries that represent variables or symbolic addresses.


Interpreters for IRs
harpoon.Interpret.Quads An interpreter for quad form.
harpoon.Interpret.Tree An interpreter for tree form.


Analyses and Transformations
harpoon.Analysis This package contains analysis routines applicable to a variety of intermediate representations.
harpoon.Analysis.Companions This package contains code to implement the "Points-To Analysis with Companion Objects" described in my whitepaper.
harpoon.Analysis.Counters This package defines a facility for simple counters which can easily be spliced into a quad-form code for instrumentation purposes and enabled/disabled individually or in groups by properties on the command-line.
harpoon.Analysis.DataFlow Provides the classes for performing Data-Flow Analysis on a number of Intermediate Representations.
harpoon.Analysis.DynamicSyncRemoval This package defines a transformation that inserts a dynamic check before every synchronization operation, skipping the synchronization if the check returns true.
harpoon.Analysis.GraphColoring Provides the classes for coloring generic Graphs.
harpoon.Analysis.Instr Provides the classes for performing general analyses on code in the Instr intermediate representation.
harpoon.Analysis.Loops This package contains the Loops interface for representing nested loops trees.
harpoon.Analysis.LowQuad This package contains analysis routines applicable only to the IR.LowQuad intermediate representation.
harpoon.Analysis.LowQuad.Loop This package contains code to do loop invariant hoisting, strength reduction, and induction variable elimination.
harpoon.Analysis.MemOpt This package contains an (in)compatibility analysis and a related memory preallocation optimization.
harpoon.Analysis.Quads This package contains analysis routines applicable only to the IR.Quads intermediate representation.
harpoon.Analysis.Quads.DeepInliner This package contains code that perform inlining.
harpoon.Analysis.Quads.SCC An implementation of Sparse Conditional Constant propagation for SSI form, extended to do predicated optimizations.
harpoon.Analysis.Realtime Classes to implement and optimize the MemoryArea pointer access restrictions described in Sun's Realtime Java Specification.
harpoon.Analysis.SizeOpt This package contains various size optimizations, most of which operate on quad form.
harpoon.Analysis.Transactions This package defines a transformation that converts synchronization into fully-atomic operations.
harpoon.Analysis.Transformation General-purpose code transformation helpers not specific to an IR.
harpoon.Analysis.Tree This package contains analysis routines applicable only to the IR.Tree intermediate representation.
harpoon.Runtime This package contains runtime-support classes for any FLEX optimizations/transformations which need them.
harpoon.Runtime.Transactions Runtime support for the atomic-transactions transformation implemented in the harpoon.Analysis.LowQuad.Transactions package.


Backends (including code selection and runtime support)
harpoon.Backend.Analysis This package contains the various analyses needed for the backend.
harpoon.Backend.Generic Abstract superclasses for machine- or runtime-dependent classes.
harpoon.Backend.Maps Various maps used by the backend, including interface, field, and method numbering maps, symbol mangling maps, and backend-specific type maps.
harpoon.Backend.MIPS Provides the classes for generating assembly code targetting the MIPS architecture.
harpoon.Backend.PreciseC Provides the classes for generating extremely-ugly C code supporting precise garbage collection from Tree codeviews.
harpoon.Backend.Runtime1 Runtime1 is the first implementation of a FLEX backend runtime system.
harpoon.Backend.RuntimeTiny RuntimeTiny is a size-optimized version of the FLEX backend.
harpoon.Backend.Sparc Provides the classes for generating assembly code targetting the SPARC architecture.
harpoon.Backend.StrongARM Provides the classes for generating assembly code targetting the StrongARM platform.


Tools and Utilities
harpoon.Tools.Annotation Source-code annotation tool.
harpoon.Tools.Annotation.Lex Java lexer for the source-code annotation tool.
harpoon.Tools.PatMat Pattern-matching instruction-selector-generator tool.
harpoon.Util Useful utility classes, including general-purpose algorithms and data-types as well as FLEX-specific utility functions.
harpoon.Util.Collections Provides the classes for working with and generating Collections and Graphs of Objects (mostly migrated to the stand-alone JUtil package).


Contributed packages
gnu.getopt This is a Java port of the GNU getopt functions for command-line parsing.


Other Packages
harpoon.Instrumentation.AllocationStatistics This package contains code for instrumenting the allocation sites from a program in order to measure how many times each allocation site is executed (ie, how many objects are allocated at each allocation site).


This document is the API specification for the FLEX Java compiler infrastructure, created by the Program Analysis and Compilation Group at MIT.