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 EnsureClassInitializedNode
for
every load, store, call, and instantiation in the bytecode. These dependencies are collected in
SVMHost.getInitializedClasses(com.oracle.graal.pointsto.meta.AnalysisMethod)
.Modifier and Type | Method and Description |
---|---|
void |
setUnsafe(com.oracle.graal.pointsto.meta.AnalysisType t) |