Search in sources :

Example 1 with WrappedConstantPool

use of com.oracle.graal.pointsto.infrastructure.WrappedConstantPool in project graal by oracle.

the class UniverseBuilder method makeConstantPool.

private ConstantPool makeConstantPool(ConstantPool aConstantPool, WrappedJavaType defaultAccessingClass) {
    WrappedConstantPool hConstantPool = hUniverse.constantPools.get(aConstantPool);
    if (hConstantPool == null) {
        hConstantPool = new WrappedConstantPool(hUniverse, aConstantPool, defaultAccessingClass);
        hUniverse.constantPools.put(aConstantPool, hConstantPool);
    }
    return hConstantPool;
}
Also used : WrappedConstantPool(com.oracle.graal.pointsto.infrastructure.WrappedConstantPool)

Example 2 with WrappedConstantPool

use of com.oracle.graal.pointsto.infrastructure.WrappedConstantPool in project graal by oracle.

the class AnalysisUniverse method lookup.

@Override
public WrappedConstantPool lookup(ConstantPool constantPool, WrappedJavaType defaultAccessingClass) {
    assert !(constantPool instanceof WrappedConstantPool);
    WrappedConstantPool result = constantPools.get(constantPool);
    if (result == null) {
        WrappedConstantPool newValue = new WrappedConstantPool(this, constantPool, defaultAccessingClass);
        WrappedConstantPool oldValue = constantPools.putIfAbsent(constantPool, newValue);
        result = oldValue != null ? oldValue : newValue;
    }
    return result;
}
Also used : WrappedConstantPool(com.oracle.graal.pointsto.infrastructure.WrappedConstantPool)

Aggregations

WrappedConstantPool (com.oracle.graal.pointsto.infrastructure.WrappedConstantPool)2