Skip to content

Commit

Permalink
deps: V8: fix debug build
Browse files Browse the repository at this point in the history
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 c892f35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deps/v8/src/codegen/register.h
Expand Up @@ -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;
}
Expand Down

0 comments on commit c892f35

Please sign in to comment.