|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.Transformation.MethodSplitter
harpoon.Analysis.Quads.InitializerTransform
public class InitializerTransform
InitializerTransform
transforms class initializers so
that they are idempotent and so that they perform all needed
initializer ordering checks before accessing non-local data.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class harpoon.Analysis.Transformation.MethodSplitter |
---|
MethodSplitter.Token |
Field Summary | |
---|---|
static MethodSplitter.Token |
CHECKED
Token for the initializer-ordering-check version of a method. |
Fields inherited from class harpoon.Analysis.Transformation.MethodSplitter |
---|
ORIGINAL |
Constructor Summary | |
---|---|
InitializerTransform(HCodeFactory parent,
ClassHierarchy ch)
Creates a InitializerTransform with no information
about which native methods are 'safe'. |
|
InitializerTransform(HCodeFactory parent,
ClassHierarchy ch,
Linker linker,
String resourceName)
Creates a InitializerTransform using the specified
named resource to specify the safe and dependent
native methods of this runtime. |
|
InitializerTransform(HCodeFactory parent,
ClassHierarchy ch,
Map dependentMethods)
Creates a InitializerTransform using the given
information about safe and dependent methods. |
Method Summary | |
---|---|
HCodeFactory |
codeFactory()
Returns a HCodeFactory containing representations for
the methods split by the MethodSplitter . |
protected boolean |
isValidToken(MethodSplitter.Token which)
Checks the token types handled by this MethodSplitter subclass. |
HMethod |
methodWithInitCheck(HMethod hm)
Return the handle for the verion of hm with "init-check" tests. |
protected HCode |
mutateHCode(HCodeAndMaps input,
MethodSplitter.Token which)
Mutate a given HCode to produce the version
specified by which . |
Methods inherited from class harpoon.Analysis.Transformation.MethodSplitter |
---|
cloneHCode, isVirtual, mutateCodeName, mutateDescriptor, select |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final MethodSplitter.Token CHECKED
Constructor Detail |
---|
public InitializerTransform(HCodeFactory parent, ClassHierarchy ch)
InitializerTransform
with no information
about which native methods are 'safe'.
public InitializerTransform(HCodeFactory parent, ClassHierarchy ch, Linker linker, String resourceName)
InitializerTransform
using the specified
named resource to specify the safe and dependent
native methods of this runtime.
public InitializerTransform(HCodeFactory parent, ClassHierarchy ch, Map dependentMethods)
InitializerTransform
using the given
information about safe and dependent methods.
parent
- The input code factory. Will be converted to QuadWithTry.ch
- A class hierarchy for the application.dependentMethods
- a map from HMethod
s specifying
native methods to a java.util.Set
of the
HInitializer
s of the classes whose static
data this method may reference. HMethod
s
which map to zero-size Set
s are 'safe'
to call within initializers (that is, they do not reference
any static data).Method Detail |
---|
public HCodeFactory codeFactory()
MethodSplitter
HCodeFactory
containing representations for
the methods split by the MethodSplitter
.
codeFactory
in class MethodSplitter
protected boolean isValidToken(MethodSplitter.Token which)
MethodSplitter
subclass.
isValidToken
in class MethodSplitter
protected HCode mutateHCode(HCodeAndMaps input, MethodSplitter.Token which)
HCode
to produce the version
specified by which
.
mutateHCode
in class MethodSplitter
public HMethod methodWithInitCheck(HMethod hm)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |