v8/test
jgruber c0fe56e63d [regexp] Correct lastIndex behavior in RegExp.prototype[@@replace]
@@replace has a pretty complex implementation, taking different paths
for various situations (e.g.: global/nonglobal regexp, functional/string
replace argument, etc.). Each of these paths must implement similar
logic for calling into the RegExpBuiltinExec spec operation, and many
paths get this subtly wrong.

This CL fixes a couple of issues related to the way @@replace handles lastIndex:
* All paths now respect lastIndex when calling into exec (some used to assume 0).
* lastIndex is now advanced after a successful match for sticky regexps.
* lastIndex is now only reset to 0 on failure for sticky regexps.

BUG=v8:5361

Review-Url: https://codereview.chromium.org/2685183003
Cr-Commit-Position: refs/heads/master@{#43234}
2017-02-16 09:21:37 +00:00
..
benchmarks [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
cctest [debugger] implement inspector-facing API for code coverage. 2017-02-16 08:36:12 +00:00
common [iwyu, wasm] Remove unallowed includes to objects-inl.h from wasm. 2017-02-13 15:05:37 +00:00
debugger Disable flaky debugger/debug/harmony/modules-debug-scopes1 2017-02-13 14:44:55 +00:00
fuzzer [iwyu, wasm] Remove unallowed includes to objects-inl.h from wasm. 2017-02-13 15:05:37 +00:00
inspector [debugger] expose side-effect free evaluate to inspector. 2017-02-10 17:06:22 +00:00
intl NumberFormat: default mnsd value is 1 2017-02-14 17:12:49 +00:00
js-perf-test [tests] Add js-perf-test for %TypedArray%.prototype.sort 2017-02-15 14:48:42 +00:00
memory [snapshot] support multiple contexts in the same snapshot. 2016-06-15 15:39:06 +00:00
message Enable --harmony-trailing-commas 2017-01-31 23:30:57 +00:00
mjsunit [regexp] Correct lastIndex behavior in RegExp.prototype[@@replace] 2017-02-16 09:21:37 +00:00
mozilla [regexp] Correct lastIndex behavior in RegExp.prototype[@@replace] 2017-02-16 09:21:37 +00:00
preparser [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
promises-aplus Make test262 test runner check for which exception is thrown 2016-03-14 21:20:37 +00:00
test262 [regexp] Correct lastIndex behavior in RegExp.prototype[@@replace] 2017-02-16 09:21:37 +00:00
unittests [turbofan] Handle some arithmetic ops in early lowering. 2017-02-15 15:10:02 +00:00
webkit Unify TypeError messages 2017-02-13 10:27:03 +00:00
bot_default.gyp Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
bot_default.isolate [debugger] basic test infrastructure for new debugger test api. 2016-10-21 06:38:05 +00:00
BUILD.gn Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00
default.gyp Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
default.isolate Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
optimize_for_size.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
optimize_for_size.isolate [debugger] basic test infrastructure for new debugger test api. 2016-10-21 06:38:05 +00:00
perf.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
perf.isolate Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00