Search in sources :

Example 1 with WrappedSignature

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

the class UniverseBuilder method makeSignature.

private Signature makeSignature(Signature aSignature, WrappedJavaType defaultAccessingClass) {
    WrappedSignature hSignature = hUniverse.signatures.get(aSignature);
    if (hSignature == null) {
        hSignature = new WrappedSignature(hUniverse, aSignature, defaultAccessingClass);
        hUniverse.signatures.put(aSignature, hSignature);
        for (int i = 0; i < aSignature.getParameterCount(false); i++) {
            makeType((AnalysisType) aSignature.getParameterType(i, null));
        }
        makeType((AnalysisType) aSignature.getReturnType(null));
    }
    return hSignature;
}
Also used : WrappedSignature(com.oracle.graal.pointsto.infrastructure.WrappedSignature)

Example 2 with WrappedSignature

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

the class AnalysisUniverse method lookup.

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

Aggregations

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