Tabnine Logo
VirtualFrame.getFrameDescriptor
Code IndexAdd Tabnine to your IDE (free)

How to use
getFrameDescriptor
method
in
com.oracle.truffle.api.frame.VirtualFrame

Best Java code snippets using com.oracle.truffle.api.frame.VirtualFrame.getFrameDescriptor (Showing top 11 results out of 315)

origin: com.oracle.truffle/truffle-api

@ExplodeLoop
private void clearSlots(VirtualFrame frame) {
  FrameSlot[] slots = inputSlots;
  if (slots != null) {
    if (frame.getFrameDescriptor() == sourceFrameDescriptor) {
      for (int i = 0; i < slots.length; i++) {
        frame.setObject(slots[i], null);
      }
    }
  }
}
origin: org.graalvm.truffle/truffle-api

@Override
public Object execute(VirtualFrame frame) {
  assert frameDescriptor == null || frameDescriptor == frame.getFrameDescriptor();
  assureAdopted();
  Object ret = fragment.execute(frame);
  assert checkNullOrInterop(ret);
  return ret;
}
origin: org.graalvm.truffle/truffle-api

@ExplodeLoop
private void clearSlots(VirtualFrame frame) {
  FrameSlot[] slots = inputSlots;
  if (slots != null) {
    if (frame.getFrameDescriptor() == sourceFrameDescriptor) {
      for (int i = 0; i < slots.length; i++) {
        frame.setObject(slots[i], null);
      }
    }
  }
}
origin: com.oracle.truffle/truffle-api

@Override
public Object execute(VirtualFrame frame) {
  assert frameDescriptor == null || frameDescriptor == frame.getFrameDescriptor();
  Object ret = fragment.execute(frame);
  assert checkNullOrInterop(ret);
  return ret;
}
origin: org.graalvm.truffle/truffle-api

@ExplodeLoop
protected final Object[] getSavedInputValues(VirtualFrame frame) {
  FrameSlot[] slots = inputSlots;
  if (slots == null) {
    return EMPTY_ARRAY;
  }
  Object[] inputValues;
  if (frame.getFrameDescriptor() == sourceFrameDescriptor) {
    inputValues = new Object[slots.length];
    for (int i = 0; i < slots.length; i++) {
      try {
        inputValues[i] = frame.getObject(slots[i]);
      } catch (FrameSlotTypeException e) {
        CompilerDirectives.transferToInterpreter();
        throw new AssertionError(e);
      }
    }
  } else {
    inputValues = new Object[inputSlots.length];
  }
  return inputValues;
}
origin: com.oracle.truffle/truffle-api

@ExplodeLoop
protected final Object[] getSavedInputValues(VirtualFrame frame) {
  FrameSlot[] slots = inputSlots;
  if (slots == null) {
    return EMPTY_ARRAY;
  }
  Object[] inputValues;
  if (frame.getFrameDescriptor() == sourceFrameDescriptor) {
    inputValues = new Object[slots.length];
    for (int i = 0; i < slots.length; i++) {
      try {
        inputValues[i] = frame.getObject(slots[i]);
      } catch (FrameSlotTypeException e) {
        CompilerDirectives.transferToInterpreter();
        throw new AssertionError(e);
      }
    }
  } else {
    inputValues = new Object[inputSlots.length];
  }
  return inputValues;
}
origin: org.graalvm.truffle/truffle-api

final void saveInputValue(VirtualFrame frame, int inputIndex, Object value) {
  verifyIndex(inputIndex);
  if (inputSlots == null) {
    CompilerDirectives.transferToInterpreterAndInvalidate();
    initializeSlots(frame);
  }
  assert sourceFrameDescriptor == frame.getFrameDescriptor() : "Unstable frame descriptor used by the language.";
  frame.setObject(inputSlots[inputIndex], value);
}
origin: com.oracle.truffle/truffle-api

final void saveInputValue(VirtualFrame frame, int inputIndex, Object value) {
  verifyIndex(inputIndex);
  if (inputSlots == null) {
    CompilerDirectives.transferToInterpreterAndInvalidate();
    initializeSlots(frame);
  }
  assert sourceFrameDescriptor == frame.getFrameDescriptor() : "Unstable frame descriptor used by the language.";
  frame.setObject(inputSlots[inputIndex], value);
}
origin: com.oracle.truffle/truffle-api

private void initializeSlots(VirtualFrame frame) {
  Lock lock = getLock();
  lock.lock();
  try {
    if (this.inputSlots == null) {
      if (InstrumentationHandler.TRACE) {
        InstrumentationHandler.trace("SLOTS: Adding %s save slots for binding %s%n", inputCount, getBinding().getElement());
      }
      FrameDescriptor frameDescriptor = frame.getFrameDescriptor();
      FrameSlot[] slots = new FrameSlot[inputCount];
      for (int i = 0; i < inputCount; i++) {
        int slotIndex = inputBaseIndex + i;
        slots[i] = frameDescriptor.findOrAddFrameSlot(new SavedInputValueID(getBinding(), slotIndex));
      }
      this.sourceFrameDescriptor = frameDescriptor;
      this.inputSlots = slots;
    }
  } finally {
    lock.unlock();
  }
}
origin: org.graalvm.truffle/truffle-api

private void initializeSlots(VirtualFrame frame) {
  Lock lock = getLock();
  lock.lock();
  try {
    if (this.inputSlots == null) {
      if (InstrumentationHandler.TRACE) {
        InstrumentationHandler.trace("SLOTS: Adding %s save slots for binding %s%n", inputCount, getBinding().getElement());
      }
      FrameDescriptor frameDescriptor = frame.getFrameDescriptor();
      FrameSlot[] slots = new FrameSlot[inputCount];
      for (int i = 0; i < inputCount; i++) {
        int slotIndex = inputBaseIndex + i;
        slots[i] = frameDescriptor.findOrAddFrameSlot(new SavedInputValueID(getBinding(), slotIndex));
      }
      this.sourceFrameDescriptor = frameDescriptor;
      this.inputSlots = slots;
    }
  } finally {
    lock.unlock();
  }
}
origin: cesquivias/mumbler

private static void addGlobalFunctions(VirtualFrame virtualFrame) {
  FrameDescriptor frameDescriptor = virtualFrame.getFrameDescriptor();
  virtualFrame.setObject(frameDescriptor.addFrameSlot("println"),
      createBuiltinFunction(PrintlnBuiltinNodeFactory.getInstance(),
com.oracle.truffle.api.frameVirtualFramegetFrameDescriptor

Popular methods of VirtualFrame

  • getArguments
  • setObject
  • getObject
  • materialize
  • getLong
  • setLong
  • getBoolean
  • getValue
  • setBoolean
  • setInt

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • getResourceAsStream (ClassLoader)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • 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