Skip to content
Permalink
Browse files
deps: V8: fix debug build
This is a (very) partial cherry-pick of upstream change v8/v8@f8fddd6b13
that fixes the following debug mode build error with clang:

    ../deps/v8/src/codegen/register.h:29:48: error: member reference
    base type 'RegListBase' is not a structure or union
      int num_different_regs = RegListBase{regs...}.Count();

Fixes: #44371
PR-URL: #44392
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
  • Loading branch information
bnoordhuis authored and danielleadams committed Oct 5, 2022
1 parent 576ccdf commit c892f35815566a97ab25a30cedeb66c5b9265d61
Showing 1 changed file with 2 additions and 1 deletion.
@@ -26,7 +26,8 @@ template <typename... RegTypes,
std::conjunction_v<std::is_same<Register, RegTypes>...> ||
std::conjunction_v<std::is_same<DoubleRegister, RegTypes>...>>>
inline constexpr bool AreAliased(RegTypes... regs) {
int num_different_regs = RegListBase{regs...}.Count();
using FirstRegType = std::tuple_element_t<0, std::tuple<RegTypes...>>;
int num_different_regs = RegListBase<FirstRegType>{regs...}.Count();
int num_given_regs = (... + (regs.is_valid() ? 1 : 0));
return num_different_regs < num_given_regs;
}

0 comments on commit c892f35

Please sign in to comment.