Search in sources :

Example 1 with NativeImageCodeCacheFactory

use of com.oracle.svm.hosted.image.NativeImageCodeCacheFactory in project graal by oracle.

the class LLVMFeature method afterRegistration.

@Override
public void afterRegistration(AfterRegistrationAccess access) {
    ImageSingletons.add(SubstrateBackendFactory.class, new SubstrateBackendFactory() {

        @Override
        public SubstrateBackend newBackend(Providers newProviders) {
            return new SubstrateLLVMBackend(newProviders);
        }
    });
    ImageSingletons.add(SubstrateLoweringProviderFactory.class, SubstrateLLVMLoweringProvider::new);
    ImageSingletons.add(NativeImageCodeCacheFactory.class, new NativeImageCodeCacheFactory() {

        @Override
        public NativeImageCodeCache newCodeCache(CompileQueue compileQueue, NativeImageHeap heap, Platform platform, Path tempDir) {
            return new LLVMNativeImageCodeCache(compileQueue.getCompilations(), heap, platform, tempDir);
        }
    });
    ImageSingletons.add(ExceptionUnwind.class, LLVMExceptionUnwind.createRaiseExceptionHandler());
    ImageSingletons.add(TargetGraphBuilderPlugins.class, new LLVMGraphBuilderPlugins());
    ImageSingletons.add(SubstrateSuitesCreatorProvider.class, new SubstrateSuitesCreatorProvider());
}
Also used : Path(java.nio.file.Path) CompileQueue(com.oracle.svm.hosted.code.CompileQueue) Platform(org.graalvm.nativeimage.Platform) NativeImageHeap(com.oracle.svm.hosted.image.NativeImageHeap) NativeImageCodeCache(com.oracle.svm.hosted.image.NativeImageCodeCache) SubstrateBackendFactory(com.oracle.svm.core.graal.code.SubstrateBackendFactory) Providers(org.graalvm.compiler.phases.util.Providers) SubstrateBackend(com.oracle.svm.core.graal.code.SubstrateBackend) NativeImageCodeCacheFactory(com.oracle.svm.hosted.image.NativeImageCodeCacheFactory) SubstrateLLVMLoweringProvider(com.oracle.svm.core.graal.llvm.lowering.SubstrateLLVMLoweringProvider) SubstrateSuitesCreatorProvider(com.oracle.svm.core.graal.code.SubstrateSuitesCreatorProvider) LLVMGraphBuilderPlugins(com.oracle.svm.core.graal.llvm.replacements.LLVMGraphBuilderPlugins)

Aggregations

SubstrateBackend (com.oracle.svm.core.graal.code.SubstrateBackend)1 SubstrateBackendFactory (com.oracle.svm.core.graal.code.SubstrateBackendFactory)1 SubstrateSuitesCreatorProvider (com.oracle.svm.core.graal.code.SubstrateSuitesCreatorProvider)1 SubstrateLLVMLoweringProvider (com.oracle.svm.core.graal.llvm.lowering.SubstrateLLVMLoweringProvider)1 LLVMGraphBuilderPlugins (com.oracle.svm.core.graal.llvm.replacements.LLVMGraphBuilderPlugins)1 CompileQueue (com.oracle.svm.hosted.code.CompileQueue)1 NativeImageCodeCache (com.oracle.svm.hosted.image.NativeImageCodeCache)1 NativeImageCodeCacheFactory (com.oracle.svm.hosted.image.NativeImageCodeCacheFactory)1 NativeImageHeap (com.oracle.svm.hosted.image.NativeImageHeap)1 Path (java.nio.file.Path)1 Providers (org.graalvm.compiler.phases.util.Providers)1 Platform (org.graalvm.nativeimage.Platform)1