Skip to content

Commit

Permalink
deps: patch V8 to support older Clang versions
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#54536
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
targos authored and nodejs-github-bot committed Nov 22, 2024
1 parent 21ff67d commit d41a54e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.6',
'v8_embedder_string': '-node.7',

##### V8 defaults for Node.js #####

Expand Down
12 changes: 6 additions & 6 deletions deps/v8/src/base/template-meta-programming/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ template <template <typename, typename> typename F, typename T, typename Head,
typename... Tail>
struct fold_right_impl<F, T, list<Head, Tail...>> {
using type =
F<Head, typename fold_right_impl<F, T, list<Tail...>>::type>::type;
typename F<Head, typename fold_right_impl<F, T, list<Tail...>>::type>::type;
};
template <template <typename, typename> typename F, typename T>
struct fold_right_impl<F, T, list<>> {
Expand All @@ -146,7 +146,7 @@ template <template <TYPENAME1, typename> typename F, typename T, TYPENAME1 Head,
TYPENAME1... Tail>
struct fold_right1_impl<F, T, list1<Head, Tail...>> {
using type =
F<Head, typename fold_right1_impl<F, T, list1<Tail...>>::type>::type;
typename F<Head, typename fold_right1_impl<F, T, list1<Tail...>>::type>::type;
};
template <template <TYPENAME1, typename> typename F, typename T>
struct fold_right1_impl<F, T, list1<>> {
Expand Down Expand Up @@ -216,11 +216,11 @@ constexpr bool all_equal_v = all_equal<List, Cmp>::value;
template <typename List, size_t I, typename T>
struct insert_at : public detail::insert_at_impl<I, T, list<>, List> {};
template <typename List, size_t I, typename T>
using insert_at_t = insert_at<List, I, T>::type;
using insert_at_t = typename insert_at<List, I, T>::type;
template <typename List1, size_t I, TYPENAME1 T>
struct insert_at1 : public detail::insert_at1_impl<I, T, list1<>, List1> {};
template <typename List1, size_t I, TYPENAME1 T>
using insert_at1_t = insert_at1<List1, I, T>::type;
using insert_at1_t = typename insert_at1<List1, I, T>::type;

// fold_right recursively applies binary function {F} to elements of the {List}
// and the previous result, starting from the right. The initial value is {T}.
Expand All @@ -231,11 +231,11 @@ using insert_at1_t = insert_at1<List1, I, T>::type;
template <template <typename, typename> typename F, typename List, typename T>
struct fold_right : public detail::fold_right_impl<F, T, List> {};
template <template <typename, typename> typename F, typename List, typename T>
using fold_right_t = fold_right<F, List, T>::type;
using fold_right_t = typename fold_right<F, List, T>::type;
template <template <TYPENAME1, typename> typename F, typename List1, typename T>
struct fold_right1 : public detail::fold_right1_impl<F, T, List1> {};
template <template <TYPENAME1, typename> typename F, typename List1, typename T>
using fold_right1_t = fold_right1<F, List1, T>::type;
using fold_right1_t = typename fold_right1<F, List1, T>::type;

} // namespace v8::base::tmp

Expand Down
17 changes: 9 additions & 8 deletions deps/v8/src/compiler/turboshaft/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef V8_COMPILER_TURBOSHAFT_ASSEMBLER_H_
#define V8_COMPILER_TURBOSHAFT_ASSEMBLER_H_

#include <concepts>
#include <cstring>
#include <iomanip>
#include <iterator>
Expand Down Expand Up @@ -193,8 +194,8 @@ template <typename T>
class IndexRange : public Range<T> {
public:
using base = Range<T>;
using value_type = base::value_type;
using iterator_type = base::iterator_type;
using value_type = typename base::value_type;
using iterator_type = typename base::iterator_type;

explicit IndexRange(ConstOrV<T> count) : Range<T>(0, count, 1) {}
};
Expand Down Expand Up @@ -222,8 +223,8 @@ class Sequence : private Range<T> {
using base = Range<T>;

public:
using value_type = base::value_type;
using iterator_type = base::iterator_type;
using value_type = typename base::value_type;
using iterator_type = typename base::iterator_type;

explicit Sequence(ConstOrV<T> begin, ConstOrV<T> stride = 1)
: base(begin, 0, stride) {}
Expand Down Expand Up @@ -727,7 +728,7 @@ struct LoopLabelForHelper<std::tuple<V<Ts>...>> {
} // namespace detail

template <typename T>
using LoopLabelFor = detail::LoopLabelForHelper<T>::type;
using LoopLabelFor = typename detail::LoopLabelForHelper<T>::type;

Handle<Code> BuiltinCodeHandle(Builtin builtin, Isolate* isolate);

Expand Down Expand Up @@ -786,19 +787,19 @@ struct ReducerStack {
static_assert(base_index == length - 1);
// Insert a GenericReducerBase before that.
using WithGeneric =
reducer_list_insert_at<ReducerList, base_index, GenericReducerBase>::type;
typename reducer_list_insert_at<ReducerList, base_index, GenericReducerBase>::type;
// If we have a ValueNumberingReducer in the list, we insert at that index,
// otherwise before the reducer_base.
static constexpr size_t ep_index =
reducer_list_index_of<WithGeneric, ValueNumberingReducer,
base_index>::value;
using WithGenericAndEmitProjection =
reducer_list_insert_at<WithGeneric, ep_index,
typename reducer_list_insert_at<WithGeneric, ep_index,
EmitProjectionReducer>::type;
static_assert(reducer_list_length<WithGenericAndEmitProjection>::value ==
length + 2);

using type = reducer_list_to_stack<WithGenericAndEmitProjection,
using type = typename reducer_list_to_stack<WithGenericAndEmitProjection,
StackBottom<ReducerList>>::type;
};

Expand Down

0 comments on commit d41a54e

Please sign in to comment.