Class StringPrototypeBuiltins.JSStringReplaceES5Node

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

public abstract static class StringPrototypeBuiltins.JSStringReplaceES5Node extends StringPrototypeBuiltins.JSStringReplaceBaseNode
Implementation of the String.prototype.replace() method as specified by ECMAScript 5.1 in 15.5.4.11.
  • Constructor Details

    • JSStringReplaceES5Node

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

    • replace

      protected Object replace(Object thisObj, Object searchValue, Object replaceValue, com.oracle.truffle.api.nodes.Node node, JSToStringNode toString2Node, JSToStringNode toString3Node, com.oracle.truffle.api.profiles.InlinedCountingConditionProfile ifIsMatch, com.oracle.truffle.api.profiles.InlinedConditionProfile isRegExp, com.oracle.truffle.api.profiles.InlinedCountingConditionProfile isFnRepl, TRegexUtil.InteropReadIntMemberNode readGroupCount, TRegexUtil.InteropReadBooleanMemberNode readIsMatch, TRegexUtil.TRegexCompiledRegexSingleFlagAccessorNode getGlobalFlag, com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch)
    • match

      protected final Object match(JSRegExpObject regExp, com.oracle.truffle.api.strings.TruffleString input)
    • 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)