Search in sources :

Example 1 with DuringSetupAccessImpl

use of com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl in project graal by oracle.

the class RuntimeStrengthenStampsPhase method duringSetup.

@Override
public void duringSetup(DuringSetupAccess c) {
    DuringSetupAccessImpl config = (DuringSetupAccessImpl) c;
    try {
        /*
             * Check early that the classpath is set up correctly. The base class of SubstrateType
             * is the NodeClass from Truffle. So we require Truffle on the class path for any images
             * and tests that use Graal at run time.
             */
        config.getMetaAccess().lookupJavaType(SubstrateType.class);
    } catch (NoClassDefFoundError ex) {
        throw VMError.shouldNotReachHere("Building a native image with Graal support requires Truffle on the class path. For unit tests run with 'svmtest', add the option '--truffle'.");
    }
    ImageSingletons.add(GraalSupport.class, new GraalSupport());
    objectReplacer = new GraalObjectReplacer(config.getUniverse(), config.getMetaAccess());
    config.registerObjectReplacer(objectReplacer);
}
Also used : GraalSupport(com.oracle.svm.graal.GraalSupport) DuringSetupAccessImpl(com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl)

Example 2 with DuringSetupAccessImpl

use of com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl in project graal by oracle.

the class Target_org_graalvm_nativeimage_c_function_CEntryPointLiteral method duringSetup.

@Override
public void duringSetup(DuringSetupAccess a) {
    DuringSetupAccessImpl config = (DuringSetupAccessImpl) a;
    metaAccess = config.getMetaAccess();
    bb = config.getBigBang();
    config.registerObjectReplacer(new CEntryPointLiteralObjectReplacer());
}
Also used : DuringSetupAccessImpl(com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl)

Example 3 with DuringSetupAccessImpl

use of com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl in project graal by oracle.

the class JNICallWrapperFeature method duringSetup.

@Override
public void duringSetup(DuringSetupAccess access) {
    DuringSetupAccessImpl config = (DuringSetupAccessImpl) access;
    config.registerNativeSubstitutionProcessor(new JNINativeCallWrapperSubstitutionProcessor());
}
Also used : DuringSetupAccessImpl(com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl)

Example 4 with DuringSetupAccessImpl

use of com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl in project graal by oracle.

the class ReflectionFeature method duringSetup.

@Override
public void duringSetup(DuringSetupAccess a) {
    DuringSetupAccessImpl access = (DuringSetupAccessImpl) a;
    ReflectionSubstitution subst = new ReflectionSubstitution(access.getMetaAccess().getWrapped(), access.getImageClassLoader());
    access.registerSubstitutionProcessor(subst);
    ImageSingletons.add(ReflectionSubstitution.class, subst);
    reflectionData = new ReflectionDataBuilder();
    ImageSingletons.add(RuntimeReflectionSupport.class, reflectionData);
    ReflectionConfigurationParser parser = new ReflectionConfigurationParser(reflectionData, access.getImageClassLoader());
    parser.parseAndRegisterConfigurations("reflection", Options.ReflectionConfigurationFiles, Options.ReflectionConfigurationResources);
}
Also used : DuringSetupAccessImpl(com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl) ReflectionConfigurationParser(com.oracle.svm.hosted.config.ReflectionConfigurationParser)

Example 5 with DuringSetupAccessImpl

use of com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl in project graal by oracle.

the class CEntryPointCallStubFeature method duringSetup.

@Override
public void duringSetup(DuringSetupAccess arg) {
    DuringSetupAccessImpl access = (DuringSetupAccessImpl) arg;
    CEntryPointCallStubSupport.initialize(access.getBigBang());
}
Also used : DuringSetupAccessImpl(com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl)

Aggregations

DuringSetupAccessImpl (com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl)7 AnalysisPolicy (com.oracle.graal.pointsto.AnalysisPolicy)1 UnsupportedFeatureException (com.oracle.graal.pointsto.constraints.UnsupportedFeatureException)1 SubstitutionProcessor (com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor)1 AnalysisMetaAccess (com.oracle.graal.pointsto.meta.AnalysisMetaAccess)1 AnalysisMethod (com.oracle.graal.pointsto.meta.AnalysisMethod)1 AnalysisType (com.oracle.graal.pointsto.meta.AnalysisType)1 AnalysisUniverse (com.oracle.graal.pointsto.meta.AnalysisUniverse)1 HostedProviders (com.oracle.graal.pointsto.meta.HostedProviders)1 TypeState (com.oracle.graal.pointsto.typestate.TypeState)1 Timer (com.oracle.graal.pointsto.util.Timer)1 StopTimer (com.oracle.graal.pointsto.util.Timer.StopTimer)1 AllocationCounter (com.oracle.svm.core.allocationprofile.AllocationCounter)1 AllocationSite (com.oracle.svm.core.allocationprofile.AllocationSite)1 ObjectLayout (com.oracle.svm.core.config.ObjectLayout)1 DeoptTester (com.oracle.svm.core.deopt.DeoptTester)1 ArraycopySnippets (com.oracle.svm.core.graal.jdk.ArraycopySnippets)1 SubstrateForeignCallsProvider (com.oracle.svm.core.graal.meta.SubstrateForeignCallsProvider)1 SubstrateLoweringProvider (com.oracle.svm.core.graal.meta.SubstrateLoweringProvider)1 SubstrateReplacements (com.oracle.svm.core.graal.meta.SubstrateReplacements)1