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);
}
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());
}
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());
}
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);
}
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());
}
Aggregations