Class ArrayLiteralNode

java.lang.Object
com.oracle.truffle.api.nodes.Node
All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, Cloneable

public abstract class ArrayLiteralNode extends JavaScriptNode
  • Field Details

    • context

      protected final JSContext context
  • Constructor Details

    • ArrayLiteralNode

      public ArrayLiteralNode(ArrayLiteralNode copy)
    • ArrayLiteralNode

      protected ArrayLiteralNode(JSContext context)
  • Method Details

    • execute

      public abstract JSArrayObject execute(com.oracle.truffle.api.frame.VirtualFrame frame)
      Description copied from class: JavaScriptNode
      Executes this node using the specified context and frame and returns the result value.
      Specified by:
      execute in class JavaScriptNode
      Parameters:
      frame - the frame of the currently executing guest language method
      Returns:
      the value of the execution
    • hasTag

      public boolean hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag)
      Specified by:
      hasTag in interface com.oracle.truffle.api.instrumentation.InstrumentableNode
      Overrides:
      hasTag in class JavaScriptNode
    • getNodeObject

      public Object getNodeObject()
    • createWrapper

      public com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNode createWrapper(com.oracle.truffle.api.instrumentation.ProbeNode probe)
      Specified by:
      createWrapper in interface com.oracle.truffle.api.instrumentation.InstrumentableNode
      Overrides:
      createWrapper in class JavaScriptNode
    • create

      public static ArrayLiteralNode create(JSContext context, JavaScriptNode[] elements)
    • createWithSpread

      public static ArrayLiteralNode createWithSpread(JSContext context, JavaScriptNode[] elements)
    • identifyPrimitiveContentType

      public static ArrayLiteralNode.ArrayContentType identifyPrimitiveContentType(Object[] values, boolean createBytes)
    • createDoubleArray

      public static double[] createDoubleArray(Object[] values)
    • createIntArray

      public static int[] createIntArray(Object[] values)
    • createByteArray

      public static byte[] createByteArray(Object[] values)
    • isResultAlwaysOfType

      public boolean isResultAlwaysOfType(Class<?> clazz)
      Overrides:
      isResultAlwaysOfType in class JavaScriptNode