Class StringPrototypeBuiltins.JSStringPadNode

All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, Cloneable
Enclosing class:
StringPrototypeBuiltins

public abstract static class StringPrototypeBuiltins.JSStringPadNode extends JSBuiltinNode
Implementation of the String.prototype.padStart() and padEnd() method as proposed for ECMAScript 2016 (ES7).
  • Constructor Details

    • JSStringPadNode

      public JSStringPadNode(JSContext context, JSBuiltin builtin, boolean atStart)
  • Method Details

    • pad

      protected Object pad(Object thisObj, Object[] args, JSToStringNode toString2Node, com.oracle.truffle.api.strings.TruffleStringBuilder.AppendStringNode appendStringNode, com.oracle.truffle.api.strings.TruffleStringBuilder.AppendSubstringByteIndexNode appendSubStringNode, com.oracle.truffle.api.strings.TruffleStringBuilder.ToStringNode builderToStringNode)
    • within

      protected static int within(int value, int min, int max)
    • withinNumber

      protected static int withinNumber(Number value, int min, int max)
    • requireObjectCoercible

      protected final void requireObjectCoercible(Object target)
    • toString

      protected com.oracle.truffle.api.strings.TruffleString toString(Object target)
    • toIntegerAsInt

      protected int toIntegerAsInt(Object target)