From fd25fb7399d22130b40a936f29a37b1af688d358 Mon Sep 17 00:00:00 2001
From: barracuda156 <vital.had@gmail.com>
Date: Thu, 9 Nov 2023 03:19:08 +0800
Subject: [PATCH] tnode.h: backport fix for is_convertible

---
 src/codegen/tnode.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/codegen/tnode.h b/src/codegen/tnode.h
index ecf9afab482..90592c98475 100644
--- a/v8/src/codegen/tnode.h
+++ b/v8/src/codegen/tnode.h
@@ -252,8 +252,9 @@ class int31_t {
 template <class T, class U>
 struct is_subtype {
   static const bool value =
-      std::is_base_of<U, T>::value || (std::is_same<U, MaybeObject>::value &&
-                                       std::is_convertible<T, Object>::value);
+      std::disjunction<std::is_base_of<U, T>,
+                       std::conjunction<std::is_same<U, MaybeObject>,
+                                        std::is_convertible<T, Object>>>::value;
 };
 template <class T1, class T2, class U>
 struct is_subtype<UnionT<T1, T2>, U> {
