Class WritePropertyNode

All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, WriteNode, Cloneable

public class WritePropertyNode extends JSTargetableWriteNode
  • Field Details

  • Constructor Details

  • Method Details

    • create

      public static WritePropertyNode create(JavaScriptNode target, Object propertyKey, JavaScriptNode rhs, JSContext ctx, boolean isStrict)
    • create

      public static WritePropertyNode create(JavaScriptNode target, Object propertyKey, JavaScriptNode rhs, JSContext ctx, boolean isStrict, boolean isGlobal, boolean verifyHasProperty)
    • 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()
    • materializeInstrumentableNodes

      public com.oracle.truffle.api.instrumentation.InstrumentableNode materializeInstrumentableNodes(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
    • getTarget

      public final JavaScriptNode getTarget()
      Overrides:
      getTarget in class JSTargetableNode
    • getRhs

      public final JavaScriptNode getRhs()
    • getKey

      public final Object getKey()
    • isGlobal

      public final boolean isGlobal()
    • executeWithValue

      public final Object executeWithValue(Object obj, Object value)
    • execute

      public final Object 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
    • executeInt

      public final int executeInt(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException
      Description copied from class: JavaScriptNode
      Like JavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to an int. A node can override this method if it has a better way to producing a value of type int.
      Overrides:
      executeInt in class JavaScriptNode
      Parameters:
      frame - the frame of the currently executing guest language method
      Returns:
      the value of the execution as an int
      Throws:
      com.oracle.truffle.api.nodes.UnexpectedResultException - if a loss-free conversion of the result to int is not possible
    • executeDouble

      public final double executeDouble(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException
      Description copied from class: JavaScriptNode
      Like JavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to a double. A node can override this method if it has a better way to producing a value of type double.
      Overrides:
      executeDouble in class JavaScriptNode
      Parameters:
      frame - the frame of the currently executing guest language method
      Returns:
      the value of the execution as a double
      Throws:
      com.oracle.truffle.api.nodes.UnexpectedResultException - if a loss-free conversion of the result to double is not possible
    • executeVoid

      public final void executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame)
      Description copied from class: JavaScriptNode
      Like JavaScriptNode.execute(VirtualFrame) except that it throws away the result. A node can override this method if it has a better way to execute without producing a value.
      Overrides:
      executeVoid in class JavaScriptNode
      Parameters:
      frame - the frame of the currently executing guest language method
    • executeWrite

      public final void executeWrite(com.oracle.truffle.api.frame.VirtualFrame frame, Object value)
    • executeWithTarget

      public final Object executeWithTarget(com.oracle.truffle.api.frame.VirtualFrame frame, Object target)
      Specified by:
      executeWithTarget in class JSTargetableNode
    • evaluateTarget

      public final Object evaluateTarget(com.oracle.truffle.api.frame.VirtualFrame frame)
      Overrides:
      evaluateTarget in class JSTargetableNode
    • copyUninitialized

      protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
      Overrides:
      copyUninitialized in class JavaScriptNode
    • isResultAlwaysOfType

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