Class JSToStringNode

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

public abstract class JSToStringNode extends JavaScriptBaseNode
This implements ECMA 9.8. ToString.
  • Constructor Details

    • JSToStringNode

      protected JSToStringNode()
    • JSToStringNode

      protected JSToStringNode(boolean undefinedToEmpty, boolean symbolToString)
  • Method Details

    • create

      public static JSToStringNode create()
    • createUndefinedToEmpty

      public static JSToStringNode createUndefinedToEmpty()
      Creates a node that returns the empty string for undefined.
    • createSymbolToString

      public static JSToStringNode createSymbolToString()
      Creates a ToString node that returns the SymbolDescriptiveString for a symbol. Used by the String function if called without new (ES6 21.1.1.1 "String(value)").
    • executeString

      public abstract com.oracle.truffle.api.strings.TruffleString executeString(Object operand)
    • doString

      protected com.oracle.truffle.api.strings.TruffleString doString(com.oracle.truffle.api.strings.TruffleString value)
    • doNull

      protected com.oracle.truffle.api.strings.TruffleString doNull(Object value)
    • doUndefined

      protected com.oracle.truffle.api.strings.TruffleString doUndefined(Object value)
    • doBoolean

      protected com.oracle.truffle.api.strings.TruffleString doBoolean(boolean value)
    • doInteger

      protected com.oracle.truffle.api.strings.TruffleString doInteger(int value, JSDoubleToStringNode doubleToStringNode)
    • doBigInt

      protected com.oracle.truffle.api.strings.TruffleString doBigInt(BigInt value)
    • doLong

      protected com.oracle.truffle.api.strings.TruffleString doLong(long value, JSDoubleToStringNode doubleToStringNode)
    • doDouble

      protected com.oracle.truffle.api.strings.TruffleString doDouble(double d, JSDoubleToStringNode doubleToStringNode)
    • doJSObject

      protected com.oracle.truffle.api.strings.TruffleString doJSObject(JSDynamicObject value, JSToPrimitiveNode toPrimitiveHintStringNode, JSToStringNode toStringNode)
    • doSymbol

      protected com.oracle.truffle.api.strings.TruffleString doSymbol(Symbol value)
    • doTruffleObject

      protected com.oracle.truffle.api.strings.TruffleString doTruffleObject(Object object, JSToPrimitiveNode toPrimitiveHintStringNode, JSToStringNode toStringNode)