Class StringPrototypeBuiltins.JSStringIncludesNode

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

public abstract static class StringPrototypeBuiltins.JSStringIncludesNode extends JSBuiltinNode
Implementation of the String.prototype.contains() or .includes() method of ECMAScript6/Harmony.
  • Constructor Details

    • JSStringIncludesNode

      public JSStringIncludesNode(JSContext context, JSBuiltin builtin)
  • Method Details

    • includesString

      protected boolean includesString(com.oracle.truffle.api.strings.TruffleString thisStr, com.oracle.truffle.api.strings.TruffleString searchStr, Object position, com.oracle.truffle.api.strings.TruffleString.ByteIndexOfStringNode indexOfStringNode)
    • includesGeneric

      protected boolean includesGeneric(Object thisObj, Object searchString, Object position, JSToStringNode toString2Node, IsRegExpNode isRegExpNode, com.oracle.truffle.api.strings.TruffleString.ByteIndexOfStringNode indexOfStringNode, com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch)
    • 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)