v8/test
Mihir Shah 9711289d06 A jump-table implementation for constant case switch statements
The change is made since for switch statements with lots of cases,
where each case is a constant integer, the emitted bytecode is still
a series of jumps, when we can instead use a jump table.

If there are 6 or more cases (similar to GCC) of Smi literals, and
if the max Smi case minus the min Smi case is not more than 3 times
the number of cases, we use a jump table up front to handle Smi's,
and then use traditional if-else logic for the rest of the cases.

We then use the jump table in interpreter/bytecode-jump-table to
do the optimization.

This tries to go off issue 9738 in v8's issue tracker. It is not
exactly the same, since that recommends doing the work at JIT-time,
but has similar ideas. It also partially goes off issue 10764.

Bug: v8:9738
Change-Id: Ic805682ee3abf9ce464bb733b427fa0c83a6e10c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904926
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75323}
2021-06-23 09:26:23 +00:00
..
benchmarks [test] Mark more tests as SLOW for TSAN builds 2021-06-18 11:18:52 +00:00
bigint [bigint] Burnikel-Ziegler division 2021-06-22 17:58:21 +00:00
cctest [base] Create base/strings.h 2021-06-22 16:55:32 +00:00
common [isolate][cleanup] Remove pointer to WasmEngine 2021-06-21 09:09:25 +00:00
debugger Revert "Improve error messages for property access on null/undefined" 2021-06-21 23:06:41 +00:00
debugging [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
fuzzer [isolate][cleanup] Remove pointer to WasmEngine 2021-06-21 09:09:25 +00:00
fuzzilli
inspector [debug] Default to last break index. 2021-06-22 05:06:31 +00:00
intl Reland "[intl] Improve test coverage of "best fit" localeMatcher" 2021-06-21 17:37:31 +00:00
js-perf-test A jump-table implementation for constant case switch statements 2021-06-23 09:26:23 +00:00
memory [snapshot] Fix the Memory.json benchmark 2021-04-28 07:54:34 +00:00
message Revert "Improve error messages for property access on null/undefined" 2021-06-21 23:06:41 +00:00
mjsunit A jump-table implementation for constant case switch statements 2021-06-23 09:26:23 +00:00
mkgrokdump
mozilla [test] Mark more tests as SLOW for TSAN builds 2021-06-18 11:18:52 +00:00
test262 [parser] Ignore parenthesized identifiers when setting function name 2021-06-23 08:23:03 +00:00
torque
unittests [base] Create base/strings.h 2021-06-22 16:55:32 +00:00
wasm-api-tests [isolate][cleanup] Remove pointer to WasmEngine 2021-06-21 09:09:25 +00:00
wasm-js [wasm] Update spec tests 2021-06-07 11:45:44 +00:00
wasm-spec-tests [compiler] Add TSAN support for generated code movl and movq 2021-06-17 08:46:41 +00:00
webkit Revert "Improve error messages for property access on null/undefined" 2021-06-21 23:06:41 +00:00
BUILD.gn Reland^2 "[bigint] Karatsuba multiplication" 2021-06-07 11:01:14 +00:00
OWNERS