public class TypeInitializerGraph extends Object
AnalysisType
s from universe
. Each
type carries the information if it Safety#SAFE
or Safety#UNSAFE
to execute during
native-image generation.
The algorithm assigns all types ( TypeInitializerGraph.initialTypeInitializerSafety(com.oracle.graal.pointsto.meta.AnalysisType)
) and all methods (
TypeInitializerGraph.initialMethodSafety(com.oracle.graal.pointsto.meta.AnalysisMethod)
) with their initial safety.
Then the information about unsafety is iteratively propagated through the graph in
TypeInitializerGraph.computeInitializerSafety()
.
NOTE: the dependency between methods and type initializers is maintained by the
SubstrateClassInitializationPlugin
that emits calls to
DynamicHub.ensureInitialized()
for every load, store, call, and instantiation in the
bytecode. We extract those dependencies here by using the
TypeInitializerGraph.getInitializerType(InvokeTypeFlow)
method.Modifier and Type | Method and Description |
---|---|
void |
setUnsafe(com.oracle.graal.pointsto.meta.AnalysisType t) |