use of com.oracle.svm.core.graal.code.SubstrateCompiledCode in project graal by oracle.
the class SubstrateCodeCacheProvider method installCode.
@Override
@SuppressFBWarnings(value = { "BC_UNCONFIRMED_CAST" }, justification = "We know what we are doing.")
public InstalledCode installCode(ResolvedJavaMethod method, CompiledCode compiledCode, InstalledCode predefinedInstalledCode, SpeculationLog log, boolean isDefault) {
VMError.guarantee(!isDefault);
SubstrateInstalledCode substrateInstalledCode;
if (predefinedInstalledCode instanceof SubstrateInstalledCode.Access) {
substrateInstalledCode = ((SubstrateInstalledCode.Access) predefinedInstalledCode).getSubstrateInstalledCode();
} else {
substrateInstalledCode = (SubstrateInstalledCode) predefinedInstalledCode;
}
CompilationResult compResult = ((SubstrateCompiledCode) compiledCode).getCompilationResult();
InstalledCodeBuilder builder = new InstalledCodeBuilder((SharedRuntimeMethod) method, compResult, substrateInstalledCode, null);
builder.install();
return predefinedInstalledCode;
}
Aggregations