v8/test
Jakob Gruber 232bf1ffe4 Clamp properly in the String.p.indexOf reduction
This fixes a bug introduced in crrev.com/c/2660995.
String.prototype.indexOf must clamp the `position` argument as per
step:

  7. Let start be the result of clamping pos between 0 and len.

Source: tc39.es/ecma262/#sec-string.prototype.indexof

Previously, this was done in the StringIndexOf builtin, but the recent
refactor changed builtin implementations to match the spec more
closely (i.e. to clamp in String.prototype.indexOf, not
StringIndexOf). This means we now have to clamp in
JSCallReducer::ReduceStringPrototypeIndexOf.

Tbr: neis@chromium.org
Bug: chromium:1194869
Change-Id: I5af8d41b50f4905453f03079e3ee6d46186536db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2799359
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73772}
2021-04-01 13:03:24 +00:00
..
benchmarks IWYU: Added missing include: include/cppgc/persistent.h 2021-02-17 17:37:29 +00:00
cctest Reland "[dict-proto] SIMD support for SwissNameDictionary in Torque" 2021-03-31 13:01:34 +00:00
common [wasm][fuzzer] Stack overflow is nondeterministic 2021-03-30 11:05:11 +00:00
debugger [debugger] Consider close-by functions when setting a breakpoint 2021-03-15 07:00:49 +00:00
debugging [wasm] Rename kWasmStmt -> kWasmVoid 2021-03-22 07:58:18 +00:00
fuzzer [wasm] Install the exception constructor in InstallConditionalFeatures 2021-03-25 16:28:53 +00:00
fuzzilli Fix unhandled promise rejections in REPRL mode 2020-09-30 13:34:23 +00:00
inspector [test] Update comment on skipped test 2021-04-01 10:02:13 +00:00
intl Revert "[test] Disable tests failing with new msan roll" 2021-03-02 00:00:03 +00:00
js-perf-test Update OWNERS in test/* 2021-02-25 14:26:24 +00:00
memory Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
message [wasm] Rename kWasmStmt -> kWasmVoid 2021-03-22 07:58:18 +00:00
mjsunit Clamp properly in the String.p.indexOf reduction 2021-04-01 13:03:24 +00:00
mkgrokdump [build] Fold v8_wrappers into v8_libbase 2021-02-25 10:56:20 +00:00
mozilla [compiler, infra] Add a --stress-concurrent-inlining flag and a bot 2021-01-29 12:05:03 +00:00
test262 [language] Fix Array.prototype.sort 2021-03-24 11:20:58 +00:00
torque [torque] Add LazyNode support 2021-02-23 16:51:53 +00:00
unittests [compiler][arm64] fabs(fsub(x, y)) to fabd(x, y) 2021-04-01 09:57:33 +00:00
wasm-api-tests Reland "[no-wasm] Exclude src/wasm from compilation" 2021-03-11 14:29:26 +00:00
wasm-js [wasm] Update spec tests and un-fail SIMD tests 2021-03-29 23:00:21 +00:00
wasm-spec-tests [wasm] Update spec tests and un-fail SIMD tests 2021-03-29 23:00:21 +00:00
webkit Disallow \8 and \9 in strict mode and template literals 2020-08-03 18:05:14 +00:00
BUILD.gn [no-wasm] Exclude more targets from build 2021-03-09 11:25:54 +00:00
OWNERS Use relative paths to OWNERS files 2019-08-12 13:52:52 +00:00