Tabnine Logo
RuntimeConfiguration.getProviders
Code IndexAdd Tabnine to your IDE (free)

How to use
getProviders
method
in
com.oracle.svm.core.graal.meta.RuntimeConfiguration

Best Java code snippets using com.oracle.svm.core.graal.meta.RuntimeConfiguration.getProviders (Showing top 13 results out of 315)

origin: com.oracle.substratevm/svm

protected Providers getProviders() {
  return runtimeConfig.getProviders();
}
origin: com.oracle.substratevm/svm

protected void callForReplacements(DebugContext debug, FeatureHandler featureHandler, @SuppressWarnings("hiding") RuntimeConfiguration runtimeConfig, SnippetReflectionProvider snippetReflection) {
  NativeImageGenerator.registerReplacements(debug, featureHandler, runtimeConfig, runtimeConfig.getProviders(), snippetReflection, true);
}
origin: com.oracle.substratevm/svm

/**
 * Regular compiled methods. Only entry points and manually marked methods are compiled, all
 * transitively reachable methods are then identified by looking at the callees of already
 * parsed methods.
 */
private void parseAheadOfTimeCompiledMethods() {
  universe.getMethods().stream()
          .filter(method -> method.isEntryPoint() || CompilationInfoSupport.singleton().isForcedCompilation(method))
          .forEach(method -> ensureParsed(method, new EntryPointReason()));
  SubstrateForeignCallsProvider foreignCallsProvider = (SubstrateForeignCallsProvider) runtimeConfig.getProviders().getForeignCalls();
  foreignCallsProvider.getForeignCalls().keySet().stream()
          .map(descriptor -> (HostedMethod) descriptor.findMethod(runtimeConfig.getProviders().getMetaAccess()))
          .filter(method -> method.wrapped.isRootMethod())
          .forEach(method -> ensureParsed(method, new EntryPointReason()));
}
origin: com.oracle.substratevm/svm

public CompileQueue(DebugContext debug, FeatureHandler featureHandler, HostedUniverse universe, SharedRuntimeConfigurationBuilder runtimeConfigBuilder, Boolean deoptimizeAll,
        SnippetReflectionProvider snippetReflection, ForkJoinPool executorService) {
  this.universe = universe;
  this.compilations = new ConcurrentHashMap<>();
  this.runtimeConfig = runtimeConfigBuilder.getRuntimeConfig();
  this.optimisticOpts = OptimisticOptimizations.ALL.remove(OptimisticOptimizations.Optimization.UseLoopLimitChecks);
  this.deoptimizeAll = deoptimizeAll;
  this.dataCache = new ConcurrentHashMap<>();
  this.executor = new CompletionExecutor(universe.getBigBang(), executorService);
  regularSuites = NativeImageGenerator.createSuites(featureHandler, runtimeConfig, snippetReflection, true);
  deoptTargetSuites = NativeImageGenerator.createSuites(featureHandler, runtimeConfig, snippetReflection, true);
  removeDeoptTargetOptimizations(deoptTargetSuites);
  regularLIRSuites = NativeImageGenerator.createLIRSuites(featureHandler, runtimeConfig.getProviders(), true);
  deoptTargetLIRSuites = NativeImageGenerator.createLIRSuites(featureHandler, runtimeConfig.getProviders(), true);
  removeDeoptTargetOptimizations(deoptTargetLIRSuites);
  // let aotjs override the replacements registration
  callForReplacements(debug, featureHandler, runtimeConfig, snippetReflection);
}
origin: com.oracle.substratevm/svm

  dest = sConstantFieldProvider;
} else if (source instanceof ForeignCallsProvider) {
  dest = GraalSupport.getRuntimeConfig().getProviders().getForeignCalls();
} else if (source instanceof HostedSnippetReflectionProvider) {
  dest = GraalSupport.getRuntimeConfig().getSnippetReflection();
origin: com.oracle.substratevm/svm

protected void ensureCompiled(HostedMethod method, CompileReason reason) {
  CompileTask task = new CompileTask(method, reason);
  CompileTask oldTask = compilations.putIfAbsent(method, task);
  if (oldTask != null) {
    // Method is already scheduled for compilation.
    if (oldTask.allReasons != null) {
      oldTask.allReasons.add(reason);
    }
    return;
  }
  if (method.compilationInfo.specializedArguments != null) {
    // Do the specialization: replace the argument locals with the constant arguments.
    StructuredGraph graph = method.compilationInfo.graph;
    int idx = 0;
    for (ConstantNode argument : method.compilationInfo.specializedArguments) {
      ParameterNode local = graph.getParameter(idx++);
      if (local != null) {
        local.replaceAndDelete(ConstantNode.forConstant(argument.asJavaConstant(), runtimeConfig.getProviders().getMetaAccess(), graph));
      }
    }
  }
  executor.execute(task);
  method.setCompiled();
}
origin: com.oracle.substratevm/library-support

public CompileFunction createCustomCompileFunction() {
  return (debug, method, identifier, reason, config) -> {
    SubstrateBackend backend = config.getBackendForNormalMethod();
    VMError.guarantee(backend.getTarget().arch instanceof AMD64, "currently only implemented on AMD64");
    // Determine register for jmethodID argument
    HostedProviders providers = (HostedProviders) config.getProviders();
    List<JavaType> parameters = new ArrayList<>();
    parameters.add(providers.getMetaAccess().lookupJavaType(JNIEnvironment.class));
    parameters.add(providers.getMetaAccess().lookupJavaType(JNIObjectHandle.class));
    if (nonVirtual) {
      parameters.add(providers.getMetaAccess().lookupJavaType(JNIObjectHandle.class));
    }
    parameters.add(providers.getMetaAccess().lookupJavaType(JNIMethodId.class));
    ResolvedJavaType returnType = providers.getWordTypes().getWordImplType();
    CallingConvention callingConvention = backend.getCodeCache().getRegisterConfig().getCallingConvention(
            SubstrateCallingConventionType.NativeCall, returnType, parameters.toArray(new JavaType[0]), backend);
    RegisterValue methodIdArg = (RegisterValue) callingConvention.getArgument(parameters.size() - 1);
    return backend.createJNITrampolineMethod(method, identifier, methodIdArg, getFieldOffset(providers));
  };
}
origin: com.oracle.substratevm/svm

@Override
public void afterCompilation(AfterCompilationAccess a) {
  CompilationAccessImpl config = (CompilationAccessImpl) a;
  HostedMetaAccess hMetaAccess = config.getMetaAccess();
  HostedUniverse hUniverse = (HostedUniverse) hMetaAccess.getUniverse();
  objectReplacer.updateSubstrateDataAfterCompilation(hUniverse);
  objectReplacer.registerImmutableObjects(config);
  GraalSupport.registerImmutableObjects(config);
  ((SubstrateReplacements) runtimeConfigBuilder.getRuntimeConfig().getProviders().getReplacements()).registerImmutableObjects(config);
}
origin: com.oracle.substratevm/svm

  @Override
  public void lower(BytecodeExceptionNode node, LoweringTool tool) {
    if (mustNotAllocatePredicate != null && mustNotAllocatePredicate.test(node.graph().method())) {
      RuntimeException exception = cachedExceptions.get(node.getExceptionKind());
      assert exception != null;
      ConstantNode exceptionNode = ConstantNode.forConstant(SubstrateObjectConstant.forObject(exception), tool.getMetaAccess(), node.graph());
      node.graph().replaceFixedWithFloating(node, exceptionNode);
    } else {
      ForeignCallDescriptor descriptor = callDescriptors.get(node.getExceptionKind());
      assert descriptor != null && descriptor.getArgumentTypes().length == node.getArguments().size();
      StructuredGraph graph = node.graph();
      ForeignCallNode foreignCallNode = graph.add(new ForeignCallNode(runtimeConfig.getProviders().getForeignCalls(), descriptor, node.stamp(NodeView.DEFAULT), node.getArguments()));
      foreignCallNode.setStateAfter(node.stateAfter());
      graph.replaceFixedWithFixed(node, foreignCallNode);
    }
  }
}
origin: com.oracle.substratevm/svm

RuntimeConfiguration runtimeConfig = runtimeConfigBuilder.getRuntimeConfig();
Providers runtimeProviders = runtimeConfig.getProviders();
WordTypes wordTypes = runtimeConfigBuilder.getWordTypes();
hostedProviders = new HostedProviders(runtimeProviders.getMetaAccess(), runtimeProviders.getCodeCache(), runtimeProviders.getConstantReflection(), runtimeProviders.getConstantFieldProvider(),
        config.getImageClassLoader(), false, false);
DebugContext debug = DebugContext.forCurrentThread();
NativeImageGenerator.registerReplacements(debug, featureHandler, runtimeConfig, runtimeConfig.getProviders(), runtimeConfig.getSnippetReflection(), false);
featureHandler.forEachGraalFeature(feature -> feature.registerCodeObserver(runtimeConfig));
Suites suites = NativeImageGenerator.createSuites(featureHandler, runtimeConfig, runtimeConfig.getSnippetReflection(), false);
LIRSuites lirSuites = NativeImageGenerator.createLIRSuites(featureHandler, runtimeConfig.getProviders(), false);
Suites firstTierSuites = NativeImageGenerator.createFirstTierSuites(featureHandler, runtimeConfig, runtimeConfig.getSnippetReflection(), false);
LIRSuites firstTierLirSuites = NativeImageGenerator.createFirstTierLIRSuites(featureHandler, runtimeConfig.getProviders(), false);
GraalSupport.setRuntimeConfig(runtimeConfig, suites, lirSuites, firstTierSuites, firstTierLirSuites);
origin: com.oracle.substratevm/svm

if (runtimeConfig != null && runtimeConfig.getProviders() instanceof HostedProviders) {
  ((HostedProviders) runtimeConfig.getProviders()).setGraphBuilderPlugins(plugins);
  for (SubstrateBackend backend : runtimeConfig.getBackends()) {
    ((HostedProviders) backend.getProviders()).setGraphBuilderPlugins(plugins);
origin: com.oracle.substratevm/svm

registerGraphBuilderPlugins(featureHandler, runtime.getRuntimeConfig(), (HostedProviders) runtime.getRuntimeConfig().getProviders(), bigbang.getMetaAccess(), aUniverse,
        hMetaAccess, hUniverse,
        nativeLibraries, loader, false, true);
origin: com.oracle.substratevm/svm

int vtableEntryOffset = runtimeConfig.getVTableOffset(method.getVTableIndex());
hub = graph.unique(new LoadHubNode(runtimeConfig.getProviders().getStampProvider(), graph.maybeAddOrUnique(PiNode.create(receiver, nullCheck))));
AddressNode address = graph.unique(new OffsetAddressNode(hub, ConstantNode.forIntegerKind(FrameAccess.getWordKind(), vtableEntryOffset, graph)));
ReadNode entry = graph.add(new ReadNode(address, NamedLocationIdentity.FINAL_LOCATION, FrameAccess.getWordStamp(), BarrierType.NONE));
com.oracle.svm.core.graal.metaRuntimeConfigurationgetProviders

Popular methods of RuntimeConfiguration

  • getBackendForNormalMethod
  • <init>
  • getBackends
  • getComponentHubOffset
  • getDebugHandlersFactories
  • getInstanceOfBitOffset
  • getSnippetReflection
  • getVTableOffset
  • isFullyInitialized
  • lookupBackend
  • setLazyState
  • setLazyState

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • Kernel (java.awt.image)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now