use of com.oracle.svm.graal.meta.SubstrateSignature in project graal by oracle.
the class GraalObjectReplacer method registerImmutableObjects.
public void registerImmutableObjects(CompilationAccess access) {
for (SubstrateMethod method : methods.values()) {
access.registerAsImmutable(method);
access.registerAsImmutable(method.getRawImplementations());
access.registerAsImmutable(method.getEncodedLineNumberTable());
}
for (SubstrateField field : fields.values()) {
access.registerAsImmutable(field);
}
for (FieldLocationIdentity fieldLocationIdentity : fieldLocationIdentities.values()) {
access.registerAsImmutable(fieldLocationIdentity);
}
for (SubstrateType type : types.values()) {
access.registerAsImmutable(type);
access.registerAsImmutable(type.getRawInstanceFields());
}
for (SubstrateSignature signature : signatures.values()) {
access.registerAsImmutable(signature);
access.registerAsImmutable(signature.getRawParameterTypes());
}
}
use of com.oracle.svm.graal.meta.SubstrateSignature in project graal by oracle.
the class GraalObjectReplacer method createSignature.
private SubstrateSignature createSignature(Signature original) {
SubstrateSignature sSignature = signatures.get(original);
if (sSignature == null) {
sSignature = new SubstrateSignature();
signatures.put(original, sSignature);
SubstrateType[] parameterTypes = new SubstrateType[original.getParameterCount(false)];
for (int index = 0; index < original.getParameterCount(false); index++) {
parameterTypes[index] = createType(original.getParameterType(index, null));
}
/*
* The links to other meta objects must be set after adding to the signatures to avoid
* infinite recursion.
*/
sSignature.setTypes(parameterTypes, createType(original.getReturnType(null)));
}
return sSignature;
}
Aggregations