public class LoadJavaMirrorWithKlassPhase extends BasePhase<PhaseContext>
Class reference (javaMirror)
directly. Instead the Class reference should be obtained from the Klass object.
The reason for this is, that in Class Data Sharing (CDS) a Klass object is mapped to a
fixed address in memory, but the javaMirror is not (which lives in the Java heap).
Lowering can introduce new ConstantNodes containing a Class reference, thus this
phase must be applied after LoweringPhase.AheadOfTimeVerificationPhase| Modifier and Type | Field and Description |
|---|---|
private int |
classMirrorOffset |
private HotSpotVMConfig.CompressEncoding |
oopEncoding |
BEFORE_PHASE_DUMP_LEVEL, PHASE_DUMP_LEVEL| Constructor and Description |
|---|
LoadJavaMirrorWithKlassPhase(int classMirrorOffset,
HotSpotVMConfig.CompressEncoding oopEncoding) |
| Modifier and Type | Method and Description |
|---|---|
private ValueNode |
getClassConstantReplacement(StructuredGraph graph,
PhaseContext context,
JavaConstant constant) |
protected void |
run(StructuredGraph graph,
PhaseContext context) |
apply, apply, createName, getNameprivate final int classMirrorOffset
private final HotSpotVMConfig.CompressEncoding oopEncoding
public LoadJavaMirrorWithKlassPhase(int classMirrorOffset, HotSpotVMConfig.CompressEncoding oopEncoding)
private ValueNode getClassConstantReplacement(StructuredGraph graph, PhaseContext context, JavaConstant constant)
protected void run(StructuredGraph graph, PhaseContext context)
run in class BasePhase<PhaseContext>