Tabnine Logo
Assumption.isValid
Code IndexAdd Tabnine to your IDE (free)

How to use
isValid
method
in
com.oracle.truffle.api.Assumption

Best Java code snippets using com.oracle.truffle.api.Assumption.isValid (Showing top 20 results out of 315)

origin: org.graalvm.truffle/truffle-api

/** @since 0.17 or earlier */
@Override
public final boolean isLeaf() {
  Assumption assumption = leafAssumption;
  return assumption == null || assumption.isValid();
}
origin: com.oracle.truffle/truffle-api

/** @since 0.8 or earlier */
@Override
public boolean isValid() {
  return first.isValid() && second.isValid();
}
origin: org.graalvm.truffle/truffle-api

/** @since 0.8 or earlier */
@Override
public boolean isValid() {
  return first.isValid() && second.isValid();
}
origin: com.oracle.truffle/truffle-api

  void notifyEngineDisposed() {
    if (singleContext.isValid()) {
      // do not invalidate assumptions if engine is disposed anyway
      cachedSingleContext = UNSET_CONTEXT;
    }
  }
}
origin: org.graalvm.truffle/truffle-api

private synchronized Object getImplSlowPath() {
  if (!singleThread.isValid()) {
    return getTL();
  }
  return null;
}
origin: org.graalvm.truffle/truffle-api

OutputStreamList getOutList() {
  if (outListUnchanged.isValid()) {
    return outList;
  } else {
    CompilerDirectives.transferToInterpreterAndInvalidate();
    return outList;
  }
}
origin: com.oracle.truffle/truffle-api

OutputStreamList getOutList() {
  if (outListUnchanged.isValid()) {
    return outList;
  } else {
    CompilerDirectives.transferToInterpreterAndInvalidate();
    return outList;
  }
}
origin: com.oracle.truffle/truffle-api

public boolean isSet() {
  if (singleThread.isValid()) {
    boolean set = firstContext != null;
    return Thread.currentThread() == firstThread && set;
  } else {
    return getTL() != null;
  }
}
origin: com.oracle.truffle/truffle-api

/** @since 0.17 or earlier */
@Override
public final boolean isValid() {
  return getValidAssumption().isValid();
}
origin: org.graalvm.truffle/truffle-api

private boolean assertGet(Object cachedSingle) {
  // avoid race between current context and single context assertion
  PolyglotContextImpl context = PolyglotContextImpl.requireContext();
  if (!singleContext.isValid()) {
    return true;
  }
  Object verifyContext = lookupLanguageContext(context);
  if (cachedSingle != verifyContext) {
    throw new AssertionError(String.format("Expected %s but got %s.", cachedSingle, verifyContext));
  }
  return true;
}
origin: org.graalvm.truffle/truffle-api

public boolean isSet() {
  if (singleThread.isValid()) {
    boolean set = firstContext != null;
    return (TruffleOptions.AOT ? currentThread() : Thread.currentThread()) == firstThread && set;
  } else {
    return getTL() != null;
  }
}
origin: org.graalvm.compiler/compiler

void profileIndirectCall() {
  Assumption argumentTypesAssumption = profiledArgumentTypesAssumption;
  if (argumentTypesAssumption != null && argumentTypesAssumption.isValid()) {
    // Argument profiling is not possible for targets of indirect calls.
    CompilerDirectives.transferToInterpreter();
    argumentTypesAssumption.invalidate();
    profiledArgumentTypes = null;
  }
}
origin: com.oracle.truffle/truffle-api

boolean needsEnter() {
  if (SINGLE_CONTEXT_STATE.singleContextAssumption.isValid()) {
    // if its a single context we know which one to enter
    return !SINGLE_CONTEXT_STATE.contextThreadLocal.isSet();
  } else {
    return current() != this;
  }
}
origin: com.oracle.truffle/truffle-api

EventChainNode lazyUpdate(VirtualFrame frame) {
  Assumption localVersion = this.version;
  if (localVersion == null || !localVersion.isValid()) {
    CompilerDirectives.transferToInterpreterAndInvalidate();
    // Ok to pass in the virtual frame as its instances are always materialized
    return lazyUpdatedImpl(frame);
  }
  return this.chain;
}
origin: com.oracle.truffle/truffle-api

private boolean assertGet(Object cachedSingle) {
  // avoid race between current context and single context assertion
  PolyglotContextImpl context = PolyglotContextImpl.requireContext();
  if (!singleContext.isValid()) {
    return true;
  }
  return cachedSingle == lookupLanguageContext(context);
}
origin: org.graalvm.truffle/truffle-api

EventChainNode lazyUpdate(VirtualFrame frame) {
  Assumption localVersion = this.version;
  if (localVersion == null || !localVersion.isValid()) {
    CompilerDirectives.transferToInterpreterAndInvalidate();
    // Ok to pass in the virtual frame as its instances are always materialized
    return lazyUpdatedImpl(frame);
  }
  return this.chain;
}
origin: org.graalvm.truffle/truffle-api

void initializeMultiContext() {
  assert !language.engine.singleContext.isValid();
  if (language.cache.getPolicy() != ContextPolicy.EXCLUSIVE) {
    LANGUAGE.initializeMultiContext(spi);
  }
}
origin: com.oracle.truffle/truffle-api

private void transitionToMultiThreaded() {
  assert singleThreaded.isValid();
  assert Thread.holdsLock(this);
  for (PolyglotLanguageContext context : contexts) {
    if (!context.isInitialized()) {
      continue;
    }
    LANGUAGE.initializeMultiThreading(context.env);
  }
  singleThreaded.invalidate();
  singleThreadedConstant.invalidate();
}
origin: org.graalvm.compiler/compiler

Object[] injectArgumentProfile(Object[] originalArguments) {
  Assumption argumentTypesAssumption = profiledArgumentTypesAssumption;
  Object[] args = originalArguments;
  if (argumentTypesAssumption != null && argumentTypesAssumption.isValid()) {
    args = OptimizedCallTarget.unsafeCast(OptimizedCallTarget.castArrayFixedLength(args, profiledArgumentTypes.length), Object[].class, true, true, true);
    args = castArgumentsImpl(args);
  }
  return args;
}
origin: com.oracle.truffle/truffle-api

static PolyglotContextImpl current() {
  if (SINGLE_CONTEXT_STATE.singleContextAssumption.isValid()) {
    if (SINGLE_CONTEXT_STATE.contextThreadLocal.isSet()) {
      return SINGLE_CONTEXT_STATE.singleContext;
    } else {
      CompilerDirectives.transferToInterpreter();
      return null;
    }
  } else {
    return (PolyglotContextImpl) SINGLE_CONTEXT_STATE.contextThreadLocal.get();
  }
}
com.oracle.truffle.apiAssumptionisValid

Javadoc

Checks whether the assumption is still valid.

Popular methods of Assumption

  • invalidate
    Invalidates this assumption. Performs no operation, if the assumption is already invalid.
  • check
    Checks that this assumption is still valid. The method throws an exception, if this is no longer the
  • getName
    A name for the assumption that is used for debug output.

Popular in Java

  • Updating database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • startActivity (Activity)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JPanel (javax.swing)
  • From CI to AI: The AI layer in your organization
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