@@ -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)
0 commit comments