Commit f47a8a88 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[compiler] Optimize Instruction::IsTailCall

Moves the TailCall instruction codes to the start of the enum, and
changes the test for IsTailCall from 4 equality tests to a single
inequality.

Bug: v8:10051
Change-Id: I679d6377161bd4f9a05f6202763d52c0a67b7900
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1964075Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65440}
parent b577c1fe
This diff is collapsed.
......@@ -861,10 +861,7 @@ class V8_EXPORT_PRIVATE Instruction final {
bool IsJump() const { return arch_opcode() == ArchOpcode::kArchJmp; }
bool IsRet() const { return arch_opcode() == ArchOpcode::kArchRet; }
bool IsTailCall() const {
return arch_opcode() == ArchOpcode::kArchTailCallCodeObject ||
arch_opcode() == ArchOpcode::kArchTailCallCodeObjectFromJSFunction ||
arch_opcode() == ArchOpcode::kArchTailCallAddress ||
arch_opcode() == ArchOpcode::kArchTailCallWasm;
return arch_opcode() <= ArchOpcode::kArchTailCallWasm;
}
bool IsThrow() const {
return arch_opcode() == ArchOpcode::kArchThrowTerminator;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment