congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
com.oracle.truffle.api
Code IndexAdd Tabnine to your IDE (free)

How to use com.oracle.truffle.api

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

origin: org.graalvm.truffle/truffle-api

@Override
public Object createEnvContext(Env env) {
  Object context = env.getSpi().createContext(env);
  env.context = context;
  Assumption contextUnchanged = env.contextUnchangedAssumption;
  env.contextUnchangedAssumption = Truffle.getRuntime().createAssumption("Language context unchanged");
  contextUnchanged.invalidate();
  return context;
}
origin: com.oracle.truffle/truffle-api

private void outListChanged() {
  Assumption changed = outListUnchanged;
  outListUnchanged = Truffle.getRuntime().createAssumption("Unchanged list");
  changed.invalidate();
}
origin: com.oracle/truffle

/**
 * Directive for the compiler to discontinue compilation at this code position and instead
 * insert a transfer to the interpreter.
 */
public static void transferToInterpreter() {
  if (inInterpreter()) {
    Truffle.getRuntime().notifyTransferToInterpreter();
  }
}
origin: com.oracle/truffle

/**
 * Set a new value, which will be picked up the next time {@link #get} is called.
 */
public void set(T newValue) {
  CompilerDirectives.transferToInterpreter();
  value = newValue;
  final Assumption oldAssumption = assumption;
  assumption = Truffle.getRuntime().createAssumption(name);
  oldAssumption.invalidate();
}
origin: org.graalvm.truffle/truffle-api

private boolean setLevelNum(final int value) {
  if (this.levelNum != value) {
    this.levelNum = value;
    final Assumption currentAssumtion = levelNumStable;
    levelNumStable = Truffle.getRuntime().createAssumption("Log Level Value stable for: " + getName());
    currentAssumtion.invalidate();
    return true;
  }
  return false;
}
origin: com.oracle.truffle/truffle-tck

@Override
public CallTarget accessUnbox() {
  return Truffle.getRuntime().createCallTarget(new RootNode(null) {
    @Override
    public Object execute(VirtualFrame frame) {
      BoxedValue boxed = (BoxedValue) ForeignAccess.getReceiver(frame);
      return boxed.value;
    }
  });
}
origin: com.oracle.truffle/truffle-api

private synchronized Assumption getConditionUnchanged() {
  if (conditionUnchanged == null) {
    conditionUnchanged = Truffle.getRuntime().createAssumption("Breakpoint condition unchanged.");
  }
  return conditionUnchanged;
}
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: org.graalvm.truffle/truffle-api

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

/**
 * Assertion that the corresponding value is reduced to a constant during compilation.
 *
 * @param value the value that must be constant during compilation
 */
public static <T> void compilationConstant(Object value) {
  if (!CompilerDirectives.isCompilationConstant(value)) {
    neverPartOfCompilation("Value is not compilation constant");
  }
}
origin: com.oracle.truffle/truffle-api

@Option.Group(PolyglotImpl.OPTION_GROUP_ENGINE)
final class PolyglotEngineOptions {
  static final String PREINITIALIZE_CONTEXT_NAME = "PreinitializeContexts";
  @Option(name = PREINITIALIZE_CONTEXT_NAME, category = OptionCategory.EXPERT, help = "Preinitialize language contexts for given languages.") static final OptionKey<String> PreinitializeContexts = new OptionKey<>(
          null, OptionType.defaultType(String.class));
}

origin: org.graalvm.truffle/truffle-api

/**
 * Directive for the compiler to discontinue compilation at this code position and instead
 * insert a transfer to the interpreter, invalidating the currently executing machine code.
 *
 * @since 0.8 or earlier
 */
public static void transferToInterpreterAndInvalidate() {
  if (inInterpreter()) {
    Truffle.getRuntime().notifyTransferToInterpreter();
  }
}
origin: org.graalvm.truffle/truffle-api

private void outListChanged() {
  Assumption changed = outListUnchanged;
  outListUnchanged = Truffle.getRuntime().createAssumption("Unchanged list");
  changed.invalidate();
}
origin: com.oracle.truffle/truffle-api

@Override
public Object createEnvContext(Env env) {
  Object context = env.getSpi().createContext(env);
  env.context = context;
  Assumption contextUnchanged = env.contextUnchangedAssumption;
  env.contextUnchangedAssumption = Truffle.getRuntime().createAssumption("Language context unchanged");
  contextUnchanged.invalidate();
  return context;
}
origin: com.oracle.truffle/truffle-api

private synchronized Assumption getConditionExistsUnchanged() {
  if (conditionExistsUnchanged == null) {
    conditionExistsUnchanged = Truffle.getRuntime().createAssumption("Breakpoint condition existence unchanged.");
  }
  return conditionExistsUnchanged;
}
origin: com.oracle.truffle/truffle-api

/**
 * Directive for the compiler to discontinue compilation at this code position and instead
 * insert a transfer to the interpreter, invalidating the currently executing machine code.
 *
 * @since 0.8 or earlier
 */
public static void transferToInterpreterAndInvalidate() {
  if (inInterpreter()) {
    Truffle.getRuntime().notifyTransferToInterpreter();
  }
}
origin: org.graalvm.truffle/truffle-api

void set(boolean value) {
  if (this.value != value) {
    this.value = value;
    Assumption old = this.unchanged;
    unchanged = Truffle.getRuntime().createAssumption("Unchanged boolean");
    old.invalidate();
  }
}
origin: org.graalvm.truffle/truffle-api

private synchronized Assumption getConditionExistsUnchanged() {
  if (conditionExistsUnchanged == null) {
    conditionExistsUnchanged = Truffle.getRuntime().createAssumption("Breakpoint condition existence unchanged.");
  }
  return conditionExistsUnchanged;
}
origin: com.oracle/truffle

/**
 * Directive for the compiler to discontinue compilation at this code position and instead
 * insert a transfer to the interpreter, invalidating the currently executing machine code.
 */
public static void transferToInterpreterAndInvalidate() {
  if (inInterpreter()) {
    Truffle.getRuntime().notifyTransferToInterpreter();
  }
}
origin: com.oracle.truffle/truffle-api

void set(boolean value) {
  if (this.value != value) {
    this.value = value;
    Assumption old = this.unchanged;
    unchanged = Truffle.getRuntime().createAssumption("Unchanged boolean");
    old.invalidate();
  }
}
com.oracle.truffle.api

Most used classes

  • CompilerDirectives
    Directives that influence the optimizations of the Truffle compiler. All of the operations have no e
  • Truffle
    Class for obtaining the Truffle runtime singleton object of this virtual machine.
  • TruffleRuntime
    Interface representing a Truffle runtime object. The runtime is responsible for creating call target
  • VirtualFrame
    Represents a frame containing values of local variables of the guest language. Instances of this typ
  • Source
    Representation of a guest language source code unit and its contents. Sources originate in several w
  • CompilerDirectives$TruffleBoundary,
  • RootNode,
  • SourceSection,
  • CallTarget,
  • Node,
  • CompilerAsserts,
  • Specialization,
  • UnsupportedSpecializationException,
  • FrameDescriptor,
  • ForeignAccess,
  • Message,
  • DirectCallNode,
  • ExplodeLoop,
  • NodeInfo
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