v8/test
jgruber 9403edfa83 [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-Original-Commit-Position: refs/heads/master@{#44171}
Committed: 17f13863b6
Review-Url: https://codereview.chromium.org/2775303002
Cr-Commit-Position: refs/heads/master@{#44182}
2017-03-28 09:09:42 +00:00
..
benchmarks
cctest [regexp] Named capture support for string replacements 2017-03-28 09:09:42 +00:00
common [wasm] [interpreter] Implement indirect function calls 2017-03-23 10:54:58 +00:00
debugger [asm.js] Widen test coverage to cctest and friends. 2017-03-28 08:00:40 +00:00
fuzzer Make isolate explicit param of parsing:: functions 2017-03-28 08:20:56 +00:00
inspector [asm.js] Widen test coverage to cctest and friends. 2017-03-28 08:00:40 +00:00
intl [asm.js] Widen test coverage to cctest and friends. 2017-03-28 08:00:40 +00:00
js-perf-test [JSPerfTests] New tests for Array.prototype.filter and map. 2017-03-24 17:39:34 +00:00
memory
message [type-profile] Constant TypeProfileSlot index. 2017-03-27 13:24:53 +00:00
mjsunit [regexp] Named capture support for string replacements 2017-03-28 09:09:42 +00:00
mozilla [asm.js] Widen test coverage to cctest and friends. 2017-03-28 08:00:40 +00:00
preparser
promises-aplus
simdjs Store the FunctionTemplateInfo used to create remote objects in the map 2017-03-15 15:57:38 +00:00
test262 [asm.js] Widen test coverage to cctest and friends. 2017-03-28 08:00:40 +00:00
unittests Make isolate explicit param of parsing:: functions 2017-03-28 08:20:56 +00:00
webkit Better error for accessing 'this' in derived constructor. 2017-03-27 20:42:38 +00:00
bot_default.gyp
bot_default.isolate
BUILD.gn Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00
default.gyp
default.isolate
optimize_for_size.gyp
optimize_for_size.isolate
perf.gyp
perf.isolate Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00