• jgruber's avatar
    Revert of [regexp] Named capture support for string replacements (patchset #5... · 34ffdd62
    jgruber authored
    Revert of [regexp] Named capture support for string replacements (patchset #5 id:80001 of https://codereview.chromium.org/2775303002/ )
    
    Reason for revert:
    Invalid DCHECKs for non-matched groups.
    
    Original issue's description:
    > [regexp] Named capture support for string replacements
    >
    > This implements support for named captures in
    > RegExp.prototype[@@replace] for when the replaceValue is not callable.
    >
    > Named captures can be referenced from replacement strings by using the
    > "$<name>" syntax. A couple of examples:
    >
    > let re = /(?<fst>.)(?<snd>.)/u;
    > "abcd".replace(re, "$<snd>$<fst>")  // "bacd"
    > "abcd".replace(re, "$2$1")     // "bacd" (numbered refs work as always)
    > "abcd".replace(re, "$<snd")    // SyntaxError (unterminated named ref)
    > "abcd".replace(re, "$<42$1>")  // "cd" (invalid name)
    > "abcd".replace(re, "$<thd>")   // "cd" (non-existent name)
    > "abcd".replace(/(?<fst>.)|(?<snd>.)/u, "$<snd>")  // "cd" (non-matched capture)
    >
    > Support is currently behind the --harmony-regexp-named-captures flag.
    >
    > BUG=v8:5437
    >
    > Review-Url: https://codereview.chromium.org/2775303002
    > Cr-Commit-Position: refs/heads/master@{#44171}
    > Committed: https://chromium.googlesource.com/v8/v8/+/17f13863b64b25eccf565e0aa9c4c441f0562b84
    
    TBR=yangguo@chromium.org,littledan@chromium.org
    # Skipping CQ checks because original CL landed less than 1 days ago.
    NOPRESUBMIT=true
    NOTREECHECKS=true
    NOTRY=true
    BUG=v8:5437
    
    Review-Url: https://codereview.chromium.org/2776293003
    Cr-Commit-Position: refs/heads/master@{#44180}
    34ffdd62
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...