62632c0805
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} |
||
---|---|---|
.. | ||
bytecode_expectations | ||
bytecode-expectations-printer.cc | ||
bytecode-expectations-printer.h | ||
generate-bytecode-expectations.cc | ||
interpreter-tester.cc | ||
interpreter-tester.h | ||
source-position-matcher.cc | ||
source-position-matcher.h | ||
test-bytecode-generator.cc | ||
test-interpreter-intrinsics.cc | ||
test-interpreter.cc | ||
test-source-positions.cc |