Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1acd8df

Browse filesBrowse files
abmussetargos
andcommitted
deps: V8: backport fed47445bbdd
Original commit message: Fix build on gcc This commit fixes two issues 1. ``` In file included from ../../src/compiler/turboshaft/assembler.h:37, from ../../src/wasm/turboshaft-graph-interface.h:13, from ../../src/wasm/function-compiler.cc:20: ../../src/compiler/turboshaft/builtin-call-descriptors.h:26:55: error: declaration of 'static constexpr v8::internal::compiler::turboshaft::detail::IndexTag<1> v8::internal::compiler::turboshaft::builtin::BigIntAdd::Arguments::index_counter(v8::internal::compiler::turboshaft::detail::IndexTag<1>)' changes meaning of 'index_counter' [-fpermissive] ``` GCC is more strict on accessing the fields from a inner struct. The fix was to wrap the base declarations in a struct and have Arguments struct inheirt from the base. 2. In maglev-ir.h and maglev-range-analysis.h fixed up `error: call to non-'constexpr'` issues. Change-Id: I175700665c7bbb4f07588e9cac3d55d9afce44d0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6987408 Reviewed-by: Jakob Linke <jgruber@chromium.org> Commit-Queue: Jakob Linke <jgruber@chromium.org> Reviewed-by: Milad Farazmand <mfarazma@ibm.com> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/main@{#103041} Refs: v8/v8@fed4744 Co-authored-by: Michaël Zasso <targos@protonmail.com> PR-URL: #60111 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent de8386d commit 1acd8df
Copy full SHA for 1acd8df

3 files changed

+46-43Lines changed: 46 additions & 43 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

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

4343
##### V8 defaults for Node.js #####
4444

Collapse file

‎deps/v8/src/compiler/turboshaft/builtin-call-descriptors.h‎

Copy file name to clipboardExpand all lines: deps/v8/src/compiler/turboshaft/builtin-call-descriptors.h
+44-41Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,15 @@ struct builtin {
6666
// if necessary.
6767
static constexpr std::size_t kMaxArgumentCount = 8;
6868
using arguments_vector_t = base::SmallVector<OpIndex, kMaxArgumentCount>;
69-
static constexpr inline detail::IndexTag<0> index_counter(
70-
detail::IndexTag<0>);
71-
static constexpr base::tmp::list<> make_args_type_list_n(detail::IndexTag<0>);
69+
// TODO(abmusse): use ArgumentsBase (until we can use GCC 13 or better)
70+
struct ArgumentsBase {
71+
static constexpr inline detail::IndexTag<0> index_counter(
72+
detail::IndexTag<0>);
73+
static constexpr base::tmp::list<> make_args_type_list_n(
74+
detail::IndexTag<0>);
75+
};
7276

7377
static constexpr OpEffects base_effects = OpEffects().CanDependOnChecks();
74-
7578
template <typename A>
7679
static arguments_vector_t ArgumentsToVector(const A& args) {
7780
arguments_vector_t result;
@@ -169,7 +172,7 @@ struct builtin {
169172

170173
struct BigIntAdd : public Descriptor<BigIntAdd> {
171174
static constexpr auto kFunction = Builtin::kBigIntAdd;
172-
struct Arguments {
175+
struct Arguments : ArgumentsBase {
173176
ARG(V<Numeric>, left)
174177
ARG(V<Numeric>, right)
175178
};
@@ -183,7 +186,7 @@ struct builtin {
183186

184187
struct CheckTurbofanType : public Descriptor<CheckTurbofanType> {
185188
static constexpr auto kFunction = Builtin::kCheckTurbofanType;
186-
struct Arguments {
189+
struct Arguments : ArgumentsBase {
187190
ARG(V<Object>, value)
188191
ARG(V<TurbofanType>, expected_type)
189192
ARG(V<Smi>, node_id)
@@ -201,7 +204,7 @@ struct builtin {
201204
#define DECL_GENERIC_BINOP(Name) \
202205
struct Name : public Descriptor<Name> { \
203206
static constexpr auto kFunction = Builtin::k##Name; \
204-
struct Arguments { \
207+
struct Arguments : ArgumentsBase { \
205208
ARG(V<Object>, left) \
206209
ARG(V<Object>, right) \
207210
}; \
@@ -219,7 +222,7 @@ struct builtin {
219222
#define DECL_GENERIC_UNOP(Name) \
220223
struct Name : public Descriptor<Name> { \
221224
static constexpr auto kFunction = Builtin::k##Name; \
222-
struct Arguments { \
225+
struct Arguments : ArgumentsBase { \
223226
ARG(V<Object>, input) \
224227
}; \
225228
using returns_t = std::tuple<V<Object>>; \
@@ -235,7 +238,7 @@ struct builtin {
235238

236239
struct DetachContextCell : public Descriptor<DetachContextCell> {
237240
static constexpr auto kFunction = Builtin::kDetachContextCell;
238-
struct Arguments {
241+
struct Arguments : ArgumentsBase {
239242
ARG(V<Context>, the_context)
240243
ARG(V<Object>, new_value)
241244
ARG(V<WordPtr>, i)
@@ -251,7 +254,7 @@ struct builtin {
251254

252255
struct ToNumber : public Descriptor<ToNumber> {
253256
static constexpr auto kFunction = Builtin::kToNumber;
254-
struct Arguments {
257+
struct Arguments : ArgumentsBase {
255258
ARG(V<Object>, input)
256259
};
257260
using returns_t = std::tuple<V<Number>>;
@@ -264,7 +267,7 @@ struct builtin {
264267

265268
struct NonNumberToNumber : public Descriptor<NonNumberToNumber> {
266269
static constexpr auto kFunction = Builtin::kNonNumberToNumber;
267-
struct Arguments {
270+
struct Arguments : ArgumentsBase {
268271
ARG(V<JSAnyNotNumber>, input)
269272
};
270273
using returns_t = std::tuple<V<Number>>;
@@ -277,7 +280,7 @@ struct builtin {
277280

278281
struct ToNumeric : public Descriptor<ToNumeric> {
279282
static constexpr auto kFunction = Builtin::kToNumeric;
280-
struct Arguments {
283+
struct Arguments : ArgumentsBase {
281284
ARG(V<Object>, input)
282285
};
283286
using returns_t = std::tuple<V<Numeric>>;
@@ -290,7 +293,7 @@ struct builtin {
290293

291294
struct NonNumberToNumeric : public Descriptor<NonNumberToNumeric> {
292295
static constexpr auto kFunction = Builtin::kNonNumberToNumeric;
293-
struct Arguments {
296+
struct Arguments : ArgumentsBase {
294297
ARG(V<JSAnyNotNumber>, input)
295298
};
296299
using returns_t = std::tuple<V<Numeric>>;
@@ -304,7 +307,7 @@ struct builtin {
304307
struct CopyFastSmiOrObjectElements
305308
: public Descriptor<CopyFastSmiOrObjectElements> {
306309
static constexpr auto kFunction = Builtin::kCopyFastSmiOrObjectElements;
307-
struct Arguments {
310+
struct Arguments : ArgumentsBase {
308311
ARG(V<Object>, object)
309312
};
310313
using returns_t = std::tuple<V<Object>>;
@@ -321,7 +324,7 @@ struct builtin {
321324
static constexpr auto kFunction = B;
322325
using StringOrSmi = Union<String, Smi>;
323326
// We use smi:0 for an empty label.
324-
struct Arguments {
327+
struct Arguments : ArgumentsBase {
325328
ARG(V<StringOrSmi>, label_or_0)
326329
ARG(V<Input>, value)
327330
};
@@ -343,7 +346,7 @@ struct builtin {
343346
template <Builtin B>
344347
struct FindOrderedHashEntry : public Descriptor<FindOrderedHashEntry<B>> {
345348
static constexpr auto kFunction = B;
346-
struct Arguments {
349+
struct Arguments : ArgumentsBase {
347350
ARG(V<Object>, table)
348351
ARG(V<Smi>, key)
349352
};
@@ -363,7 +366,7 @@ struct builtin {
363366
template <Builtin B>
364367
struct GrowFastElements : public Descriptor<GrowFastElements<B>> {
365368
static constexpr auto kFunction = B;
366-
struct Arguments {
369+
struct Arguments : ArgumentsBase {
367370
ARG(V<Object>, object)
368371
ARG(V<Smi>, size)
369372
};
@@ -383,7 +386,7 @@ struct builtin {
383386
template <Builtin B>
384387
struct NewArgumentsElements : public Descriptor<NewArgumentsElements<B>> {
385388
static constexpr auto kFunction = B;
386-
struct Arguments {
389+
struct Arguments : ArgumentsBase {
387390
// TODO(nicohartmann@): First argument should be replaced by a proper
388391
// RawPtr.
389392
ARG(V<WordPtr>, frame)
@@ -406,7 +409,7 @@ struct builtin {
406409

407410
struct NumberToString : public Descriptor<NumberToString> {
408411
static constexpr auto kFunction = Builtin::kNumberToString;
409-
struct Arguments {
412+
struct Arguments : ArgumentsBase {
410413
ARG(V<Number>, input)
411414
};
412415
using returns_t = std::tuple<V<String>>;
@@ -420,7 +423,7 @@ struct builtin {
420423

421424
struct ToString : public Descriptor<ToString> {
422425
static constexpr auto kFunction = Builtin::kToString;
423-
struct Arguments {
426+
struct Arguments : ArgumentsBase {
424427
ARG(V<Object>, o)
425428
};
426429
using returns_t = std::tuple<V<String>>;
@@ -433,7 +436,7 @@ struct builtin {
433436

434437
struct PlainPrimitiveToNumber : public Descriptor<PlainPrimitiveToNumber> {
435438
static constexpr auto kFunction = Builtin::kPlainPrimitiveToNumber;
436-
struct Arguments {
439+
struct Arguments : ArgumentsBase {
437440
ARG(V<PlainPrimitive>, input)
438441
};
439442
using returns_t = std::tuple<V<Number>>;
@@ -447,7 +450,7 @@ struct builtin {
447450

448451
struct SameValue : public Descriptor<SameValue> {
449452
static constexpr auto kFunction = Builtin::kSameValue;
450-
struct Arguments {
453+
struct Arguments : ArgumentsBase {
451454
ARG(V<Object>, left)
452455
ARG(V<Object>, right)
453456
};
@@ -462,7 +465,7 @@ struct builtin {
462465

463466
struct SameValueNumbersOnly : public Descriptor<SameValueNumbersOnly> {
464467
static constexpr auto kFunction = Builtin::kSameValueNumbersOnly;
465-
struct Arguments {
468+
struct Arguments : ArgumentsBase {
466469
ARG(V<Object>, left)
467470
ARG(V<Object>, right)
468471
};
@@ -476,7 +479,7 @@ struct builtin {
476479

477480
struct StringAdd_CheckNone : public Descriptor<StringAdd_CheckNone> {
478481
static constexpr auto kFunction = Builtin::kStringAdd_CheckNone;
479-
struct Arguments {
482+
struct Arguments : ArgumentsBase {
480483
ARG(V<String>, left)
481484
ARG(V<String>, right)
482485
};
@@ -494,7 +497,7 @@ struct builtin {
494497

495498
struct StringEqual : public Descriptor<StringEqual> {
496499
static constexpr auto kFunction = Builtin::kStringEqual;
497-
struct Arguments {
500+
struct Arguments : ArgumentsBase {
498501
ARG(V<String>, left)
499502
ARG(V<String>, right)
500503
ARG(V<WordPtr>, length)
@@ -512,7 +515,7 @@ struct builtin {
512515

513516
struct StringFromCodePointAt : public Descriptor<StringFromCodePointAt> {
514517
static constexpr auto kFunction = Builtin::kStringFromCodePointAt;
515-
struct Arguments {
518+
struct Arguments : ArgumentsBase {
516519
ARG(V<String>, receiver)
517520
ARG(V<WordPtr>, position)
518521
};
@@ -527,7 +530,7 @@ struct builtin {
527530

528531
struct StringIndexOf : public Descriptor<StringIndexOf> {
529532
static constexpr auto kFunction = Builtin::kStringIndexOf;
530-
struct Arguments {
533+
struct Arguments : ArgumentsBase {
531534
ARG(V<String>, s)
532535
ARG(V<String>, search_string)
533536
ARG(V<Smi>, start)
@@ -545,7 +548,7 @@ struct builtin {
545548

546549
struct StringCompare : public Descriptor<StringCompare> {
547550
static constexpr auto kFunction = Builtin::kStringCompare;
548-
struct Arguments {
551+
struct Arguments : ArgumentsBase {
549552
ARG(V<String>, left)
550553
ARG(V<String>, right)
551554
};
@@ -561,7 +564,7 @@ struct builtin {
561564
template <Builtin B>
562565
struct StringComparison : public Descriptor<StringComparison<B>> {
563566
static constexpr auto kFunction = B;
564-
struct Arguments {
567+
struct Arguments : ArgumentsBase {
565568
ARG(V<String>, left)
566569
ARG(V<String>, right)
567570
};
@@ -579,7 +582,7 @@ struct builtin {
579582

580583
struct StringSubstring : public Descriptor<StringSubstring> {
581584
static constexpr auto kFunction = Builtin::kStringSubstring;
582-
struct Arguments {
585+
struct Arguments : ArgumentsBase {
583586
ARG(V<String>, string)
584587
ARG(V<WordPtr>, from)
585588
ARG(V<WordPtr>, to)
@@ -596,7 +599,7 @@ struct builtin {
596599
#ifdef V8_INTL_SUPPORT
597600
struct StringToLowerCaseIntl : public Descriptor<StringToLowerCaseIntl> {
598601
static constexpr auto kFunction = Builtin::kStringToLowerCaseIntl;
599-
struct Arguments {
602+
struct Arguments : ArgumentsBase {
600603
ARG(V<String>, string)
601604
};
602605
using returns_t = std::tuple<V<String>>;
@@ -612,7 +615,7 @@ struct builtin {
612615

613616
struct StringToNumber : public Descriptor<StringToNumber> {
614617
static constexpr auto kFunction = Builtin::kStringToNumber;
615-
struct Arguments {
618+
struct Arguments : ArgumentsBase {
616619
ARG(V<String>, input)
617620
};
618621
using returns_t = std::tuple<V<Number>>;
@@ -626,7 +629,7 @@ struct builtin {
626629

627630
struct ToBoolean : public Descriptor<ToBoolean> {
628631
static constexpr auto kFunction = Builtin::kToBoolean;
629-
struct Arguments {
632+
struct Arguments : ArgumentsBase {
630633
ARG(V<Object>, input)
631634
};
632635
using returns_t = std::tuple<V<Boolean>>;
@@ -639,7 +642,7 @@ struct builtin {
639642

640643
struct ToObject : public Descriptor<ToObject> {
641644
static constexpr auto kFunction = Builtin::kToObject;
642-
struct Arguments {
645+
struct Arguments : ArgumentsBase {
643646
ARG(V<Object>, input)
644647
};
645648
using returns_t = std::tuple<V<JSReceiver>>;
@@ -654,7 +657,7 @@ struct builtin {
654657
template <Builtin B>
655658
struct CreateFunctionContext : public Descriptor<CreateFunctionContext<B>> {
656659
static constexpr auto kFunction = B;
657-
struct Arguments {
660+
struct Arguments : ArgumentsBase {
658661
ARG(V<ScopeInfo>, scope_info)
659662
ARG(V<Word32>, slots)
660663
};
@@ -674,7 +677,7 @@ struct builtin {
674677

675678
struct FastNewClosure : public Descriptor<FastNewClosure> {
676679
static constexpr auto kFunction = Builtin::kFastNewClosure;
677-
struct Arguments {
680+
struct Arguments : ArgumentsBase {
678681
ARG(V<SharedFunctionInfo>, shared_function_info)
679682
ARG(V<FeedbackCell>, feedback_cell)
680683
};
@@ -690,7 +693,7 @@ struct builtin {
690693

691694
struct Typeof : public Descriptor<Typeof> {
692695
static constexpr auto kFunction = Builtin::kTypeof;
693-
struct Arguments {
696+
struct Arguments : ArgumentsBase {
694697
ARG(V<Object>, object)
695698
};
696699
using returns_t = std::tuple<V<String>>;
@@ -704,7 +707,7 @@ struct builtin {
704707
struct CheckTurboshaftWord32Type
705708
: public Descriptor<CheckTurboshaftWord32Type> {
706709
static constexpr auto kFunction = Builtin::kCheckTurboshaftWord32Type;
707-
struct Arguments {
710+
struct Arguments : ArgumentsBase {
708711
ARG(V<Word32>, value)
709712
ARG(V<TurboshaftWord32Type>, expected_type)
710713
ARG(V<Smi>, node_id)
@@ -720,7 +723,7 @@ struct builtin {
720723
struct CheckTurboshaftWord64Type
721724
: public Descriptor<CheckTurboshaftWord64Type> {
722725
static constexpr auto kFunction = Builtin::kCheckTurboshaftWord64Type;
723-
struct Arguments {
726+
struct Arguments : ArgumentsBase {
724727
ARG(V<Word32>, value_high)
725728
ARG(V<Word32>, value_low)
726729
ARG(V<TurboshaftWord64Type>, expected_type)
@@ -737,7 +740,7 @@ struct builtin {
737740
struct CheckTurboshaftFloat32Type
738741
: public Descriptor<CheckTurboshaftFloat32Type> {
739742
static constexpr auto kFunction = Builtin::kCheckTurboshaftFloat32Type;
740-
struct Arguments {
743+
struct Arguments : ArgumentsBase {
741744
ARG(V<Float32>, value)
742745
ARG(V<TurboshaftFloat64Type>, expected_type)
743746
ARG(V<Smi>, node_id)
@@ -753,7 +756,7 @@ struct builtin {
753756
struct CheckTurboshaftFloat64Type
754757
: public Descriptor<CheckTurboshaftFloat64Type> {
755758
static constexpr auto kFunction = Builtin::kCheckTurboshaftFloat64Type;
756-
struct Arguments {
759+
struct Arguments : ArgumentsBase {
757760
ARG(V<Float64>, value)
758761
ARG(V<TurboshaftFloat64Type>, expected_type)
759762
ARG(V<Smi>, node_id)
Collapse file

‎deps/v8/src/maglev/maglev-ir.h‎

Copy file name to clipboardExpand all lines: deps/v8/src/maglev/maglev-ir.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6477,7 +6477,7 @@ class VirtualObject : public FixedInputValueNodeT<0, VirtualObject> {
64776477

64786478
int slot_count() const { return slots_.length(); }
64796479

6480-
vobj::ObjectType object_type() const {
6480+
constexpr vobj::ObjectType object_type() const {
64816481
return object_layout_->object_type;
64826482
}
64836483

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.