Search in sources :

Example 1 with SubstrateCompiledCode

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;
}
Also used : SubstrateInstalledCode(com.oracle.svm.core.deopt.SubstrateInstalledCode) SubstrateCompiledCode(com.oracle.svm.core.graal.code.SubstrateCompiledCode) CompilationResult(org.graalvm.compiler.code.CompilationResult) SuppressFBWarnings(org.graalvm.compiler.core.common.SuppressFBWarnings)

Aggregations

SubstrateInstalledCode (com.oracle.svm.core.deopt.SubstrateInstalledCode)1 SubstrateCompiledCode (com.oracle.svm.core.graal.code.SubstrateCompiledCode)1 CompilationResult (org.graalvm.compiler.code.CompilationResult)1 SuppressFBWarnings (org.graalvm.compiler.core.common.SuppressFBWarnings)1