harpoon.Analysis.Quads
Class NewMover
java.lang.Object
harpoon.Analysis.Transformation.MethodMutator
harpoon.Analysis.Quads.NewMover
- All Implemented Interfaces:
- Serializable
public class NewMover
- extends MethodMutator
The NewMover
class moves NEW
operations
as close as possible to the CALL
to their initializers.
In java bytecode, these two operations can be arbitrarily far apart
in expressions such as:
new Foo(new Bar(blah(), 2+5, ...), ...)
This movement is illegal if a OutOfMemoryException
may
ever be thrown, as moving the NEW
changes where the
exception would be thrown. However, FLEX operates under the assumption
that such exceptions are never thrown.
NewMover
works best on QuadWithTry
form.
- Version:
- $Id: NewMover.java,v 1.7 2004/02/08 03:20:10 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NewMover
public NewMover(HCodeFactory hcf)
- Creates a
NewMover
that uses the given
HCodeFactory
hcf
.
mutateHCode
protected HCode mutateHCode(HCodeAndMaps input)
- Description copied from class:
MethodMutator
- Override this method to effect transformations on split
methods.
- Overrides:
mutateHCode
in class MethodMutator