Class LongToIntOrDoubleNode

java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.js.nodes.JavaScriptBaseNode
com.oracle.truffle.js.nodes.cast.LongToIntOrDoubleNode
All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface, Cloneable

public abstract class LongToIntOrDoubleNode extends JavaScriptBaseNode
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node

    com.oracle.truffle.api.nodes.Node.Child, com.oracle.truffle.api.nodes.Node.Children
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    abstract Number
    execute(com.oracle.truffle.api.nodes.Node node, long longValue)
     
    final Number
    fromIndex(com.oracle.truffle.api.nodes.Node node, long index)
    To be used with non-negative integers that are known to be in the safe integer range, like those that come from ToIndex or ToLength.
    protected static Number
    toIntOrDouble(com.oracle.truffle.api.nodes.Node node, long value, com.oracle.truffle.api.profiles.InlinedBranchProfile toDoubleBranch)
     

    Methods inherited from class com.oracle.truffle.api.nodes.Node

    accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecialize, reportReplace, toString

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LongToIntOrDoubleNode

      public LongToIntOrDoubleNode()
  • Method Details

    • execute

      public abstract Number execute(com.oracle.truffle.api.nodes.Node node, long longValue)
    • fromIndex

      public final Number fromIndex(com.oracle.truffle.api.nodes.Node node, long index)
      To be used with non-negative integers that are known to be in the safe integer range, like those that come from ToIndex or ToLength.
    • toIntOrDouble

      protected static Number toIntOrDouble(com.oracle.truffle.api.nodes.Node node, long value, com.oracle.truffle.api.profiles.InlinedBranchProfile toDoubleBranch)
    • create

      public static LongToIntOrDoubleNode create()