v8/test/cctest/interpreter
jameslahm fce1047f00 Reland "[interpreter] Optimize strict equal boolean"
This is a reland of commit 62632c0805.
Reason for previous revert: Performance regressions crbug.com/1315724.
The reland only optimizes strict equal boolean literal like "a===true"
or "a===false", and we generate TestReferenceEqual rather than
TestStrictEqual for the comparasion. And also add typed optimization
for ReferenceEqual when all inputs are boolean with boolean constant.

Original change's description:
> [interpreter] Optimize strict equal boolean
>
> For strict equal boolean literal like "a===true"
> or "a===false", we could generate TestReferenceEqual
> rather than TestStrictEqual. And in `execution_result()->IsTest()`
> case, we could directly emit JumpIfTrue/JumpIfFalse.
>
> E.g.
> ```
> a === true
> ```
> Generated Bytecode From:
> ```
> LdaGlobal
> Star1
> LdaTrue
> TestEqualStrict
> ```
> To:
> ```
> LdaGlobal
> Star1
> LdaTrue
> TestReferenceEqual
> ```
>
> E.g.
> ```
> if (a === true)
> ```
> Generated Bytecode From:
> ```
> LdaGlobal
> Star1
> LdaTrue
> TestEqualStrict
> JumpIfFalse
> ```
> To
> ```
> LdaGlobal
> JumpIfTrue
> Jump
> ```
>
>
> Bug: v8:6403
> Change-Id: Ieaca147acd2d523ac0d2466e7861afb2d29a1310
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568923
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: 王澳 <wangao.james@bytedance.com>
> Cr-Commit-Position: refs/heads/main@{#79935}

Bug: v8:6403
Change-Id: I2ae3ab57dce85313af200fa522e3632af5c3a554
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3592039
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80141}
2022-04-25 10:02:05 +00:00
..
bytecode_expectations Reland "[interpreter] Optimize strict equal boolean" 2022-04-25 10:02:05 +00:00
bytecode-expectations-printer.cc [ignition] Remove unused count from param index getters 2021-12-16 15:43:22 +00:00
bytecode-expectations-printer.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
generate-bytecode-expectations.cc Reland "[top-level-await] Remove --harmony-top-level-await" 2021-12-06 23:02:33 +00:00
interpreter-tester.cc [runtime] Move string table off-heap 2020-08-06 12:27:18 +00:00
interpreter-tester.h Refactor tiering-related JSFunction methods 2022-03-01 14:33:09 +00:00
source-position-matcher.cc Fix most instances of -Wunreachable-code-aggressive. 2021-07-01 03:03:25 +00:00
source-position-matcher.h Move remaining files in src/ 2019-05-24 18:24:36 +00:00
test-bytecode-generator.cc Reland "[interpreter] Optimize strict equal boolean" 2022-04-25 10:02:05 +00:00
test-interpreter-intrinsics.cc [interpreter] Remove %_Call 2021-06-17 15:16:41 +00:00
test-interpreter.cc [osr] Add JumpLoop feedback slot operand 2022-04-20 12:57:44 +00:00
test-source-positions.cc Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00