Class StringPrototypeBuiltins.JSStringSubstrNode

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

public abstract static class StringPrototypeBuiltins.JSStringSubstrNode extends JSBuiltinNode
Implementation of the String.prototype.substr() method as specified by ECMAScript 5.1 in Annex B.2.3.
  • Constructor Details

  • Method Details

    • substrInt

      protected Object substrInt(com.oracle.truffle.api.strings.TruffleString thisStr, int start, int length, com.oracle.truffle.api.strings.TruffleString.SubstringByteIndexNode substringNode, com.oracle.truffle.api.profiles.InlinedBranchProfile startNegativeBranch, com.oracle.truffle.api.profiles.InlinedBranchProfile finalLenEmptyBranch)
    • substrLenUndef

      protected Object substrLenUndef(com.oracle.truffle.api.strings.TruffleString thisStr, int start, Object length, com.oracle.truffle.api.strings.TruffleString.SubstringByteIndexNode substringNode, com.oracle.truffle.api.profiles.InlinedBranchProfile startNegativeBranch, com.oracle.truffle.api.profiles.InlinedBranchProfile finalLenEmptyBranch)
    • substrGeneric

      protected Object substrGeneric(Object thisObj, Object start, Object length, com.oracle.truffle.api.strings.TruffleString.SubstringByteIndexNode substringNode, com.oracle.truffle.api.profiles.InlinedBranchProfile startNegativeBranch, com.oracle.truffle.api.profiles.InlinedBranchProfile finalLenEmptyBranch)
    • 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)