Tabnine Logo
NodeField.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.oracle.truffle.api.dsl.NodeField
constructor

Best Java code snippets using com.oracle.truffle.api.dsl.NodeField.<init> (Showing top 9 results out of 315)

origin: cesquivias/mumbler

@NodeField(name = "slot", type = FrameSlot.class)
public abstract class SymbolNode extends MumblerNode {

  public abstract FrameSlot getSlot();

  @Override
  public String toString() {
    return "'" + this.getSlot().getIdentifier();
  }
}

origin: sh286/LuaTruffle

/**
 * Created by Lucas Allan Amorim on 2014-09-14.
 */
@NodeField(name = "slot", type = FrameSlot.class)
public class LuaReadArgumentNode extends LuaExpressionNode {

  private final int index;

  public LuaReadArgumentNode(int index) {
    this.index = index;
  }

  @Override
  public Object execute(VirtualFrame frame) {
    Object[] args = frame.getArguments();
    if (index < args.length) {
      return args[index];
    } else {
      return LuaNull.SINGLETON;
    }
  }

}

origin: cesquivias/mumbler

@NodeField(name = "globalFrame", type = MaterializedFrame.class)
public abstract class GlobalSymbolNode extends SymbolNode {

  public abstract MaterializedFrame getGlobalFrame();

  @Specialization(rewriteOn = FrameSlotTypeException.class)
  protected long readLong(VirtualFrame virtualFrame)
      throws FrameSlotTypeException {
    return this.getGlobalFrame().getLong(this.getSlot());
  }

  @Specialization(rewriteOn = FrameSlotTypeException.class)
  protected boolean readBoolean(VirtualFrame virtualFrame)
      throws FrameSlotTypeException {
    return this.getGlobalFrame().getBoolean(this.getSlot());
  }

  @Specialization(rewriteOn = FrameSlotTypeException.class)
  protected Object readObject(VirtualFrame virtualFrame)
      throws FrameSlotTypeException {
    return this.getGlobalFrame().getObject(this.getSlot());
  }

  @Specialization(contains = { "readLong", "readBoolean", "readObject", })
  protected Object read(VirtualFrame virtualFrame) {
    return this.getGlobalFrame().getValue(this.getSlot());
  }
}

origin: sh286/LuaTruffle

/**
 * Created by Lucas Allan Amorim on 2014-09-15.
 */
@NodeField(name = "slot", type = FrameSlot.class)
public abstract class LuaReadLocalVariableNode extends LuaExpressionNode {

  protected abstract FrameSlot getSlot();

  @Specialization(rewriteOn = FrameSlotTypeException.class)
  protected long readLong(VirtualFrame frame) throws FrameSlotTypeException {
    return frame.getLong(getSlot());
  }

  @Specialization(rewriteOn = FrameSlotTypeException.class)
  protected boolean readBoolean(VirtualFrame frame) throws FrameSlotTypeException {
    return frame.getBoolean(getSlot());
  }

  @Specialization(rewriteOn = FrameSlotTypeException.class)
  protected Object readObject(VirtualFrame frame) throws FrameSlotTypeException {
    return frame.getObject(getSlot());
  }

  @Specialization(contains = {"readLong", "readBoolean", "readObject"})
  protected Object read(VirtualFrame frame) {
    return frame.getValue(getSlot());
  }
}

origin: cesquivias/mumbler

@NodeField(name = "function", type = MumblerFunction.class)
public abstract class LambdaNode extends MumblerNode {
  public abstract MumblerFunction getFunction();
origin: cesquivias/mumbler

@NodeField(name = "depth", type = int.class)
public abstract class ClosureSymbolNode extends SymbolNode {
origin: cesquivias/mumbler

@NodeChild("literalNode")
@NodeField(name = "kind", type = QuoteKind.class)
public abstract class QuoteNode extends MumblerNode {
  public static enum QuoteKind {
origin: sh286/LuaTruffle

@NodeField(name = "slot", type = FrameSlot.class)
public abstract class LuaWriteLocalVariableNode extends LuaExpressionNode {
origin: cesquivias/mumbler

@NodeChild("valueNode")
@NodeField(name = "slot", type = FrameSlot.class)
public abstract class DefineNode extends MumblerNode {
  protected abstract FrameSlot getSlot();
com.oracle.truffle.api.dslNodeField<init>

Popular methods of NodeField

    Popular in Java

    • Running tasks concurrently on multiple threads
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • findViewById (Activity)
    • onRequestPermissionsResult (Fragment)
    • InputStreamReader (java.io)
      A class for turning a byte stream into a character stream. Data read from the source input stream is
    • BigDecimal (java.math)
      An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
    • URLConnection (java.net)
      A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
    • ArrayList (java.util)
      ArrayList is an implementation of List, backed by an array. All optional operations including adding
    • BitSet (java.util)
      The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
    • NoSuchElementException (java.util)
      Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
    • Github Copilot alternatives
    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