Import Tint changes from Dawn
Changes:
- c58a889b687b6a5f34689e4bda476677fa3618b6 [spirv-reader] Handle Uniform storage class by James Price <jrprice@google.com>
- 447fb8d75b7337b088260a18793549e74cc70d1f [spirv-reader] Emit struct types and constants by James Price <jrprice@google.com>
- a938b6619bd507b89442fa241a0a3e14bbf01ad6 [spirv-reader] Handle array types and constants by James Price <jrprice@google.com>
- 71c7de7bc58a69182ecc3c966f32bccfdc33ab67 [spirv-reader] Handle matrix types and constants by James Price <jrprice@google.com>
- c031d59c4ebff1edd1c80fc575c0675be12bc7d1 [spirv-reader] Handle vector types and constants by James Price <jrprice@google.com>
- cf05e9289b482131e76143ce5835a71fe12f0f8d [tint] intrinsic table: use Result failures by Ben Clayton <bclayton@google.com>
- 066a05ada3e9acf00208ee64188ced2782f15a64 [tint] Add intrinsic table support for unary * and & by Ben Clayton <bclayton@google.com>
- 0a40886644dafce88a19b124aec9829e5b6eebdd Tint: implement pack4x{U|I}8Clamp and unpack4x{U|I}8 by Jiawei Shao <jiawei.shao@intel.com>
GitOrigin-RevId: c58a889b687b6a5f34689e4bda476677fa3618b6
Change-Id: Ief2b02714ed3901d95caf395b3896b2492c30b59
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/168440
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/lang/core/builtin_fn.cc b/src/tint/lang/core/builtin_fn.cc
index 8020b24..5344117 100644
--- a/src/tint/lang/core/builtin_fn.cc
+++ b/src/tint/lang/core/builtin_fn.cc
@@ -225,6 +225,12 @@
if (name == "pack4xU8") {
return BuiltinFn::kPack4XU8;
}
+ if (name == "pack4xI8Clamp") {
+ return BuiltinFn::kPack4XI8Clamp;
+ }
+ if (name == "pack4xU8Clamp") {
+ return BuiltinFn::kPack4XU8Clamp;
+ }
if (name == "pow") {
return BuiltinFn::kPow;
}
@@ -300,6 +306,12 @@
if (name == "unpack4x8unorm") {
return BuiltinFn::kUnpack4X8Unorm;
}
+ if (name == "unpack4xI8") {
+ return BuiltinFn::kUnpack4XI8;
+ }
+ if (name == "unpack4xU8") {
+ return BuiltinFn::kUnpack4XU8;
+ }
if (name == "workgroupBarrier") {
return BuiltinFn::kWorkgroupBarrier;
}
@@ -524,6 +536,10 @@
return "pack4xI8";
case BuiltinFn::kPack4XU8:
return "pack4xU8";
+ case BuiltinFn::kPack4XI8Clamp:
+ return "pack4xI8Clamp";
+ case BuiltinFn::kPack4XU8Clamp:
+ return "pack4xU8Clamp";
case BuiltinFn::kPow:
return "pow";
case BuiltinFn::kQuantizeToF16:
@@ -574,6 +590,10 @@
return "unpack4x8snorm";
case BuiltinFn::kUnpack4X8Unorm:
return "unpack4x8unorm";
+ case BuiltinFn::kUnpack4XI8:
+ return "unpack4xI8";
+ case BuiltinFn::kUnpack4XU8:
+ return "unpack4xU8";
case BuiltinFn::kWorkgroupBarrier:
return "workgroupBarrier";
case BuiltinFn::kTextureBarrier:
@@ -701,7 +721,9 @@
bool IsPacked4x8IntegerDotProductBuiltin(BuiltinFn f) {
return f == BuiltinFn::kDot4I8Packed || f == BuiltinFn::kDot4U8Packed ||
- f == BuiltinFn::kPack4XI8 || f == BuiltinFn::kPack4XU8;
+ f == BuiltinFn::kPack4XI8 || f == BuiltinFn::kPack4XU8 ||
+ f == BuiltinFn::kPack4XI8Clamp || f == BuiltinFn::kPack4XU8Clamp ||
+ f == BuiltinFn::kUnpack4XI8 || f == BuiltinFn::kUnpack4XU8;
}
bool IsSubgroup(BuiltinFn f) {
diff --git a/src/tint/lang/core/builtin_fn.cc.tmpl b/src/tint/lang/core/builtin_fn.cc.tmpl
index 4f0e7e6..7b47108 100644
--- a/src/tint/lang/core/builtin_fn.cc.tmpl
+++ b/src/tint/lang/core/builtin_fn.cc.tmpl
@@ -102,7 +102,9 @@
bool IsPacked4x8IntegerDotProductBuiltin(BuiltinFn f) {
return f == BuiltinFn::kDot4I8Packed || f == BuiltinFn::kDot4U8Packed ||
- f == BuiltinFn::kPack4XI8 || f == BuiltinFn::kPack4XU8;
+ f == BuiltinFn::kPack4XI8 || f == BuiltinFn::kPack4XU8 ||
+ f == BuiltinFn::kPack4XI8Clamp || f == BuiltinFn::kPack4XU8Clamp ||
+ f == BuiltinFn::kUnpack4XI8 || f == BuiltinFn::kUnpack4XU8;
}
bool IsSubgroup(BuiltinFn f) {
diff --git a/src/tint/lang/core/builtin_fn.h b/src/tint/lang/core/builtin_fn.h
index 95249bd..277b908 100644
--- a/src/tint/lang/core/builtin_fn.h
+++ b/src/tint/lang/core/builtin_fn.h
@@ -109,6 +109,8 @@
kPack4X8Unorm,
kPack4XI8,
kPack4XU8,
+ kPack4XI8Clamp,
+ kPack4XU8Clamp,
kPow,
kQuantizeToF16,
kRadians,
@@ -134,6 +136,8 @@
kUnpack2X16Unorm,
kUnpack4X8Snorm,
kUnpack4X8Unorm,
+ kUnpack4XI8,
+ kUnpack4XU8,
kWorkgroupBarrier,
kTextureBarrier,
kTextureDimensions,
@@ -249,6 +253,8 @@
BuiltinFn::kPack4X8Unorm,
BuiltinFn::kPack4XI8,
BuiltinFn::kPack4XU8,
+ BuiltinFn::kPack4XI8Clamp,
+ BuiltinFn::kPack4XU8Clamp,
BuiltinFn::kPow,
BuiltinFn::kQuantizeToF16,
BuiltinFn::kRadians,
@@ -274,6 +280,8 @@
BuiltinFn::kUnpack2X16Unorm,
BuiltinFn::kUnpack4X8Snorm,
BuiltinFn::kUnpack4X8Unorm,
+ BuiltinFn::kUnpack4XI8,
+ BuiltinFn::kUnpack4XU8,
BuiltinFn::kWorkgroupBarrier,
BuiltinFn::kTextureBarrier,
BuiltinFn::kTextureDimensions,
@@ -371,6 +379,8 @@
"pack4x8unorm",
"pack4xI8",
"pack4xU8",
+ "pack4xI8Clamp",
+ "pack4xU8Clamp",
"pow",
"quantizeToF16",
"radians",
@@ -396,6 +406,8 @@
"unpack2x16unorm",
"unpack4x8snorm",
"unpack4x8unorm",
+ "unpack4xI8",
+ "unpack4xU8",
"workgroupBarrier",
"textureBarrier",
"textureDimensions",
diff --git a/src/tint/lang/core/constant/eval.cc b/src/tint/lang/core/constant/eval.cc
index d86e0a1..91fd4f0 100644
--- a/src/tint/lang/core/constant/eval.cc
+++ b/src/tint/lang/core/constant/eval.cc
@@ -3306,6 +3306,37 @@
return CreateScalar(source, ty, ret);
}
+Eval::Result Eval::pack4xI8Clamp(const core::type::Type* ty,
+ VectorRef<const Value*> args,
+ const Source& source) {
+ auto calc = [&](i32 val) -> i32 { return Clamp(source, val, i32(-128), i32(127)).Get(); };
+
+ auto* e = args[0];
+ auto e0 = calc(e->Index(0)->ValueAs<i32>());
+ auto e1 = calc(e->Index(1)->ValueAs<i32>());
+ auto e2 = calc(e->Index(2)->ValueAs<i32>());
+ auto e3 = calc(e->Index(3)->ValueAs<i32>());
+
+ int32_t mask = 0xff;
+ u32 ret = u32((e0 & mask) | ((e1 & mask) << 8) | ((e2 & mask) << 16) | ((e3 & mask) << 24));
+ return CreateScalar(source, ty, ret);
+}
+
+Eval::Result Eval::pack4xU8Clamp(const core::type::Type* ty,
+ VectorRef<const Value*> args,
+ const Source& source) {
+ auto calc = [&](u32 val) -> u32 { return Clamp(source, val, u32(0), u32(255)).Get(); };
+
+ auto* e = args[0];
+ auto e0 = calc(e->Index(0)->ValueAs<u32>());
+ auto e1 = calc(e->Index(1)->ValueAs<u32>());
+ auto e2 = calc(e->Index(2)->ValueAs<u32>());
+ auto e3 = calc(e->Index(3)->ValueAs<u32>());
+
+ u32 ret = u32(e0 | (e1 << 8) | (e2 << 16) | (e3 << 24));
+ return CreateScalar(source, ty, ret);
+}
+
Eval::Result Eval::pow(const core::type::Type* ty,
VectorRef<const Value*> args,
const Source& source) {
@@ -3886,6 +3917,47 @@
return mgr.Composite(ty, std::move(els));
}
+Eval::Result Eval::unpack4xI8(const core::type::Type* ty,
+ VectorRef<const Value*> args,
+ const Source& source) {
+ auto* inner_ty = ty->DeepestElement();
+ auto e = args[0]->ValueAs<u32>().value;
+
+ Vector<const Value*, 4> els;
+ els.Reserve(4);
+
+ for (size_t i = 0; i < 4; ++i) {
+ uint8_t e_i = (e >> (8 * i)) & 0xff;
+ auto val = i32(*reinterpret_cast<int8_t*>(&e_i));
+ auto el = CreateScalar(source, inner_ty, val);
+ if (el != Success) {
+ return el;
+ }
+ els.Push(el.Get());
+ }
+ return mgr.Composite(ty, std::move(els));
+}
+
+Eval::Result Eval::unpack4xU8(const core::type::Type* ty,
+ VectorRef<const Value*> args,
+ const Source& source) {
+ auto* inner_ty = ty->DeepestElement();
+ auto e = args[0]->ValueAs<u32>().value;
+
+ Vector<const Value*, 4> els;
+ els.Reserve(4);
+
+ for (size_t i = 0; i < 4; ++i) {
+ auto val = u32((e >> (8 * i)) & 0xff);
+ auto el = CreateScalar(source, inner_ty, val);
+ if (el != Success) {
+ return el;
+ }
+ els.Push(el.Get());
+ }
+ return mgr.Composite(ty, std::move(els));
+}
+
Eval::Result Eval::quantizeToF16(const core::type::Type* ty,
VectorRef<const Value*> args,
const Source& source) {
diff --git a/src/tint/lang/core/constant/eval.h b/src/tint/lang/core/constant/eval.h
index 00114fa..51b93bf 100644
--- a/src/tint/lang/core/constant/eval.h
+++ b/src/tint/lang/core/constant/eval.h
@@ -791,6 +791,24 @@
/// @return the result value, or null if the value cannot be calculated
Result pack4xU8(const core::type::Type* ty, VectorRef<const Value*> args, const Source& source);
+ /// pack4xI8Clamp builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location
+ /// @return the result value, or null if the value cannot be calculated
+ Result pack4xI8Clamp(const core::type::Type* ty,
+ VectorRef<const Value*> args,
+ const Source& source);
+
+ /// pack4xU8Clamp builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location
+ /// @return the result value, or null if the value cannot be calculated
+ Result pack4xU8Clamp(const core::type::Type* ty,
+ VectorRef<const Value*> args,
+ const Source& source);
+
/// pow builtin
/// @param ty the expression type
/// @param args the input arguments
@@ -979,6 +997,24 @@
VectorRef<const Value*> args,
const Source& source);
+ /// unpack4xI8 builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location
+ /// @return the result value, or null if the value cannot be calculated
+ Result unpack4xI8(const core::type::Type* ty,
+ VectorRef<const Value*> args,
+ const Source& source);
+
+ /// unpack4xU8 builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location
+ /// @return the result value, or null if the value cannot be calculated
+ Result unpack4xU8(const core::type::Type* ty,
+ VectorRef<const Value*> args,
+ const Source& source);
+
/// quantizeToF16 builtin
/// @param ty the expression type
/// @param args the input arguments
diff --git a/src/tint/lang/core/constant/eval_builtin_test.cc b/src/tint/lang/core/constant/eval_builtin_test.cc
index f0a1e27..81c593c 100644
--- a/src/tint/lang/core/constant/eval_builtin_test.cc
+++ b/src/tint/lang/core/constant/eval_builtin_test.cc
@@ -3016,5 +3016,90 @@
testing::Combine(testing::Values(core::BuiltinFn::kPack4XU8),
testing::ValuesIn(Pack4xU8Cases())));
+std::vector<Case> Pack4xI8ClampCases() {
+ return {
+ C({Vec(i32(0), i32(0), i32(0), i32(0))}, Val(u32(0x0000'0000))),
+ C({Vec(i32(1), i32(2), i32(3), i32(4))}, Val(u32(0x0403'0201))),
+ C({Vec(i32(-1), i32(-2), i32(-3), i32(-4))}, Val(u32(0xFCFD'FEFF))),
+ C({Vec(i32(-1), i32(2), i32(3), i32(4))}, Val(u32(0x0403'02FF))),
+ C({Vec(i32(1), i32(-2), i32(3), i32(4))}, Val(u32(0x0403'FE01))),
+ C({Vec(i32(1), i32(2), i32(-3), i32(4))}, Val(u32(0x04FD'0201))),
+ C({Vec(i32(1), i32(2), i32(3), i32(-4))}, Val(u32(0xFC03'0201))),
+ C({Vec(i32(1), i32(-2), i32(-3), i32(-4))}, Val(u32(0xFCFD'FE01))),
+ C({Vec(i32(-1), i32(2), i32(-3), i32(-4))}, Val(u32(0xFCFD'02FF))),
+ C({Vec(i32(-1), i32(-2), i32(3), i32(-4))}, Val(u32(0xFC03'FEFF))),
+ C({Vec(i32(-1), i32(-2), i32(-3), i32(4))}, Val(u32(0x04FD'FEFF))),
+ C({Vec(i32(-1), i32(-2), i32(3), i32(4))}, Val(u32(0x0403'FEFF))),
+ C({Vec(i32(-1), i32(2), i32(-3), i32(4))}, Val(u32(0x04FD'02FF))),
+ C({Vec(i32(-1), i32(2), i32(3), i32(-4))}, Val(u32(0xFC03'02FF))),
+ C({Vec(i32(1), i32(-2), i32(-3), i32(4))}, Val(u32(0x04FD'FE01))),
+ C({Vec(i32(1), i32(-2), i32(3), i32(-4))}, Val(u32(0xFC03'FE01))),
+ C({Vec(i32(1), i32(2), i32(-3), i32(-4))}, Val(u32(0xFCFD'0201))),
+ C({Vec(i32(127), i32(128), i32(-128), i32(-129))}, Val(u32(0x8080'7F7F))),
+ C({Vec(i32(-32768), i32(-65536), i32(32767), i32(65535))}, Val(u32(0x7F7F'8080))),
+ };
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Pack4xI8Clamp,
+ ConstEvalBuiltinTest,
+ testing::Combine(testing::Values(core::BuiltinFn::kPack4XI8Clamp),
+ testing::ValuesIn(Pack4xI8ClampCases())));
+
+std::vector<Case> Pack4xU8ClampCases() {
+ return {
+ C({Vec(u32(0), u32(0), u32(0), u32(0))}, Val(u32(0x0000'0000))),
+ C({Vec(u32(2), u32(4), u32(6), u32(8))}, Val(u32(0x0806'0402))),
+ C({Vec(u32(255), u32(255), u32(255), u32(255))}, Val(u32(0xFFFF'FFFF))),
+ C({Vec(u32(254), u32(255), u32(256), u32(257))}, Val(u32(0xFFFF'FFFE))),
+ C({Vec(u32(65535), u32(65536), u32(255), u32(254))}, Val(u32(0xFEFF'FFFF))),
+ };
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Pack4xU8Clamp,
+ ConstEvalBuiltinTest,
+ testing::Combine(testing::Values(core::BuiltinFn::kPack4XU8Clamp),
+ testing::ValuesIn(Pack4xU8ClampCases())));
+
+std::vector<Case> Unpack4xI8Cases() {
+ return {
+ C({Val(u32(0x0000'0000))}, Vec(i32(0), i32(0), i32(0), i32(0))),
+ C({Val(u32(0x0102'0304))}, Vec(i32(4), i32(3), i32(2), i32(1))),
+ C({Val(u32(0xFCFD'FEFF))}, Vec(i32(-1), i32(-2), i32(-3), i32(-4))),
+ C({Val(u32(0x0403'02FF))}, Vec(i32(-1), i32(2), i32(3), i32(4))),
+ C({Val(u32(0x0403'FE01))}, Vec(i32(1), i32(-2), i32(3), i32(4))),
+ C({Val(u32(0x04FD'0201))}, Vec(i32(1), i32(2), i32(-3), i32(4))),
+ C({Val(u32(0xFC03'0201))}, Vec(i32(1), i32(2), i32(3), i32(-4))),
+ C({Val(u32(0xFCFD'FE01))}, Vec(i32(1), i32(-2), i32(-3), i32(-4))),
+ C({Val(u32(0xFCFD'02FF))}, Vec(i32(-1), i32(2), i32(-3), i32(-4))),
+ C({Val(u32(0xFC03'FEFF))}, Vec(i32(-1), i32(-2), i32(3), i32(-4))),
+ C({Val(u32(0x04FD'FEFF))}, Vec(i32(-1), i32(-2), i32(-3), i32(4))),
+ C({Val(u32(0x0403'FEFF))}, Vec(i32(-1), i32(-2), i32(3), i32(4))),
+ C({Val(u32(0x04FD'02FF))}, Vec(i32(-1), i32(2), i32(-3), i32(4))),
+ C({Val(u32(0xFC03'02FF))}, Vec(i32(-1), i32(2), i32(3), i32(-4))),
+ C({Val(u32(0x04FD'FE01))}, Vec(i32(1), i32(-2), i32(-3), i32(4))),
+ C({Val(u32(0xFC03'FE01))}, Vec(i32(1), i32(-2), i32(3), i32(-4))),
+ C({Val(u32(0xFCFD'0201))}, Vec(i32(1), i32(2), i32(-3), i32(-4))),
+ C({Val(u32(0x8081'7F7E))}, Vec(i32(126), i32(127), i32(-127), i32(-128))),
+ };
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Unpack4xI8,
+ ConstEvalBuiltinTest,
+ testing::Combine(testing::Values(core::BuiltinFn::kUnpack4XI8),
+ testing::ValuesIn(Unpack4xI8Cases())));
+
+std::vector<Case> Unpack4xU8Cases() {
+ return {
+ C({Val(u32(0x0000'0000))}, Vec(u32(0), u32(0), u32(0), u32(0))),
+ C({Val(u32(0x0806'0402))}, Vec(u32(2), u32(4), u32(6), u32(8))),
+ C({Val(u32(0xFFFF'FFFF))}, Vec(u32(255), u32(255), u32(255), u32(255))),
+ C({Val(u32(0xFFFE'FDFC))}, Vec(u32(252), u32(253), u32(254), u32(255))),
+ };
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Unpack4xU8,
+ ConstEvalBuiltinTest,
+ testing::Combine(testing::Values(core::BuiltinFn::kUnpack4XU8),
+ testing::ValuesIn(Unpack4xU8Cases())));
} // namespace
} // namespace tint::core::constant::test
diff --git a/src/tint/lang/core/core.def b/src/tint/lang/core/core.def
index 137caf5..20eb59e 100644
--- a/src/tint/lang/core/core.def
+++ b/src/tint/lang/core/core.def
@@ -634,6 +634,8 @@
@must_use @const fn pack4x8unorm(vec4<f32>) -> u32
@must_use @const fn pack4xI8(vec4<i32>) -> u32
@must_use @const fn pack4xU8(vec4<u32>) -> u32
+@must_use @const fn pack4xI8Clamp(vec4<i32>) -> u32
+@must_use @const fn pack4xU8Clamp(vec4<u32>) -> u32
@must_use @const fn pow<T: fa_f32_f16>(T, T) -> T
@must_use @const fn pow<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T>
@must_use @const fn quantizeToF16(f32) -> f32
@@ -676,6 +678,8 @@
@must_use @const fn unpack2x16unorm(u32) -> vec2<f32>
@must_use @const fn unpack4x8snorm(u32) -> vec4<f32>
@must_use @const fn unpack4x8unorm(u32) -> vec4<f32>
+@must_use @const fn unpack4xI8(u32) -> vec4<i32>
+@must_use @const fn unpack4xU8(u32) -> vec4<u32>
@stage("compute") fn workgroupBarrier()
@stage("compute") fn textureBarrier()
diff --git a/src/tint/lang/core/intrinsic/data.cc b/src/tint/lang/core/intrinsic/data.cc
index 72dd318..bf2983c 100644
--- a/src/tint/lang/core/intrinsic/data.cc
+++ b/src/tint/lang/core/intrinsic/data.cc
@@ -4830,63 +4830,67 @@
/* [47] */ &core::constant::Eval::pack4x8unorm,
/* [48] */ &core::constant::Eval::pack4xI8,
/* [49] */ &core::constant::Eval::pack4xU8,
- /* [50] */ &core::constant::Eval::pow,
- /* [51] */ &core::constant::Eval::quantizeToF16,
- /* [52] */ &core::constant::Eval::radians,
- /* [53] */ &core::constant::Eval::reflect,
- /* [54] */ &core::constant::Eval::refract,
- /* [55] */ &core::constant::Eval::reverseBits,
- /* [56] */ &core::constant::Eval::round,
- /* [57] */ &core::constant::Eval::saturate,
- /* [58] */ &core::constant::Eval::select_bool,
- /* [59] */ &core::constant::Eval::select_boolvec,
- /* [60] */ &core::constant::Eval::sign,
- /* [61] */ &core::constant::Eval::sin,
- /* [62] */ &core::constant::Eval::sinh,
- /* [63] */ &core::constant::Eval::smoothstep,
- /* [64] */ &core::constant::Eval::sqrt,
- /* [65] */ &core::constant::Eval::step,
- /* [66] */ &core::constant::Eval::tan,
- /* [67] */ &core::constant::Eval::tanh,
- /* [68] */ &core::constant::Eval::transpose,
- /* [69] */ &core::constant::Eval::trunc,
- /* [70] */ &core::constant::Eval::unpack2x16float,
- /* [71] */ &core::constant::Eval::unpack2x16snorm,
- /* [72] */ &core::constant::Eval::unpack2x16unorm,
- /* [73] */ &core::constant::Eval::unpack4x8snorm,
- /* [74] */ &core::constant::Eval::unpack4x8unorm,
- /* [75] */ &core::constant::Eval::Identity,
- /* [76] */ &core::constant::Eval::Not,
- /* [77] */ &core::constant::Eval::Complement,
- /* [78] */ &core::constant::Eval::UnaryMinus,
- /* [79] */ &core::constant::Eval::Plus,
- /* [80] */ &core::constant::Eval::Minus,
- /* [81] */ &core::constant::Eval::Multiply,
- /* [82] */ &core::constant::Eval::MultiplyMatVec,
- /* [83] */ &core::constant::Eval::MultiplyVecMat,
- /* [84] */ &core::constant::Eval::MultiplyMatMat,
- /* [85] */ &core::constant::Eval::Divide,
- /* [86] */ &core::constant::Eval::Modulo,
- /* [87] */ &core::constant::Eval::Xor,
- /* [88] */ &core::constant::Eval::And,
- /* [89] */ &core::constant::Eval::Or,
- /* [90] */ &core::constant::Eval::LogicalAnd,
- /* [91] */ &core::constant::Eval::LogicalOr,
- /* [92] */ &core::constant::Eval::Equal,
- /* [93] */ &core::constant::Eval::NotEqual,
- /* [94] */ &core::constant::Eval::LessThan,
- /* [95] */ &core::constant::Eval::GreaterThan,
- /* [96] */ &core::constant::Eval::LessThanEqual,
- /* [97] */ &core::constant::Eval::GreaterThanEqual,
- /* [98] */ &core::constant::Eval::ShiftLeft,
- /* [99] */ &core::constant::Eval::ShiftRight,
- /* [100] */ &core::constant::Eval::Zero,
- /* [101] */ &core::constant::Eval::Conv,
- /* [102] */ &core::constant::Eval::VecSplat,
- /* [103] */ &core::constant::Eval::VecInitS,
- /* [104] */ &core::constant::Eval::VecInitM,
- /* [105] */ &core::constant::Eval::MatInitS,
- /* [106] */ &core::constant::Eval::MatInitV,
+ /* [50] */ &core::constant::Eval::pack4xI8Clamp,
+ /* [51] */ &core::constant::Eval::pack4xU8Clamp,
+ /* [52] */ &core::constant::Eval::pow,
+ /* [53] */ &core::constant::Eval::quantizeToF16,
+ /* [54] */ &core::constant::Eval::radians,
+ /* [55] */ &core::constant::Eval::reflect,
+ /* [56] */ &core::constant::Eval::refract,
+ /* [57] */ &core::constant::Eval::reverseBits,
+ /* [58] */ &core::constant::Eval::round,
+ /* [59] */ &core::constant::Eval::saturate,
+ /* [60] */ &core::constant::Eval::select_bool,
+ /* [61] */ &core::constant::Eval::select_boolvec,
+ /* [62] */ &core::constant::Eval::sign,
+ /* [63] */ &core::constant::Eval::sin,
+ /* [64] */ &core::constant::Eval::sinh,
+ /* [65] */ &core::constant::Eval::smoothstep,
+ /* [66] */ &core::constant::Eval::sqrt,
+ /* [67] */ &core::constant::Eval::step,
+ /* [68] */ &core::constant::Eval::tan,
+ /* [69] */ &core::constant::Eval::tanh,
+ /* [70] */ &core::constant::Eval::transpose,
+ /* [71] */ &core::constant::Eval::trunc,
+ /* [72] */ &core::constant::Eval::unpack2x16float,
+ /* [73] */ &core::constant::Eval::unpack2x16snorm,
+ /* [74] */ &core::constant::Eval::unpack2x16unorm,
+ /* [75] */ &core::constant::Eval::unpack4x8snorm,
+ /* [76] */ &core::constant::Eval::unpack4x8unorm,
+ /* [77] */ &core::constant::Eval::unpack4xI8,
+ /* [78] */ &core::constant::Eval::unpack4xU8,
+ /* [79] */ &core::constant::Eval::Identity,
+ /* [80] */ &core::constant::Eval::Not,
+ /* [81] */ &core::constant::Eval::Complement,
+ /* [82] */ &core::constant::Eval::UnaryMinus,
+ /* [83] */ &core::constant::Eval::Plus,
+ /* [84] */ &core::constant::Eval::Minus,
+ /* [85] */ &core::constant::Eval::Multiply,
+ /* [86] */ &core::constant::Eval::MultiplyMatVec,
+ /* [87] */ &core::constant::Eval::MultiplyVecMat,
+ /* [88] */ &core::constant::Eval::MultiplyMatMat,
+ /* [89] */ &core::constant::Eval::Divide,
+ /* [90] */ &core::constant::Eval::Modulo,
+ /* [91] */ &core::constant::Eval::Xor,
+ /* [92] */ &core::constant::Eval::And,
+ /* [93] */ &core::constant::Eval::Or,
+ /* [94] */ &core::constant::Eval::LogicalAnd,
+ /* [95] */ &core::constant::Eval::LogicalOr,
+ /* [96] */ &core::constant::Eval::Equal,
+ /* [97] */ &core::constant::Eval::NotEqual,
+ /* [98] */ &core::constant::Eval::LessThan,
+ /* [99] */ &core::constant::Eval::GreaterThan,
+ /* [100] */ &core::constant::Eval::LessThanEqual,
+ /* [101] */ &core::constant::Eval::GreaterThanEqual,
+ /* [102] */ &core::constant::Eval::ShiftLeft,
+ /* [103] */ &core::constant::Eval::ShiftRight,
+ /* [104] */ &core::constant::Eval::Zero,
+ /* [105] */ &core::constant::Eval::Conv,
+ /* [106] */ &core::constant::Eval::VecSplat,
+ /* [107] */ &core::constant::Eval::VecInitS,
+ /* [108] */ &core::constant::Eval::VecInitM,
+ /* [109] */ &core::constant::Eval::MatInitS,
+ /* [110] */ &core::constant::Eval::MatInitV,
};
static_assert(ConstEvalFunctionIndex::CanIndex(kConstEvalFunctions),
@@ -5528,7 +5532,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(94),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [49] */
@@ -5541,7 +5545,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(52),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [50] */
@@ -5554,7 +5558,7 @@
/* parameters */ ParameterIndex(217),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(52),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [51] */
@@ -5567,7 +5571,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(52),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [52] */
@@ -5580,7 +5584,7 @@
/* parameters */ ParameterIndex(205),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(52),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [53] */
@@ -5593,7 +5597,7 @@
/* parameters */ ParameterIndex(295),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(52),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(104),
+ /* const_eval_fn */ ConstEvalFunctionIndex(108),
},
{
/* [54] */
@@ -5606,7 +5610,7 @@
/* parameters */ ParameterIndex(298),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(52),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(104),
+ /* const_eval_fn */ ConstEvalFunctionIndex(108),
},
{
/* [55] */
@@ -5619,7 +5623,7 @@
/* parameters */ ParameterIndex(301),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(52),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(104),
+ /* const_eval_fn */ ConstEvalFunctionIndex(108),
},
{
/* [56] */
@@ -5632,7 +5636,7 @@
/* parameters */ ParameterIndex(362),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(52),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(104),
+ /* const_eval_fn */ ConstEvalFunctionIndex(108),
},
{
/* [57] */
@@ -5645,7 +5649,7 @@
/* parameters */ ParameterIndex(364),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(52),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(104),
+ /* const_eval_fn */ ConstEvalFunctionIndex(108),
},
{
/* [58] */
@@ -5658,7 +5662,7 @@
/* parameters */ ParameterIndex(366),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(52),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(104),
+ /* const_eval_fn */ ConstEvalFunctionIndex(108),
},
{
/* [59] */
@@ -5671,7 +5675,7 @@
/* parameters */ ParameterIndex(384),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(28),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [60] */
@@ -5684,7 +5688,7 @@
/* parameters */ ParameterIndex(384),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(98),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [61] */
@@ -5697,7 +5701,7 @@
/* parameters */ ParameterIndex(384),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(30),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [62] */
@@ -5710,7 +5714,7 @@
/* parameters */ ParameterIndex(384),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(32),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [63] */
@@ -5723,7 +5727,7 @@
/* parameters */ ParameterIndex(384),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(100),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [64] */
@@ -6425,7 +6429,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(88),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [118] */
@@ -6438,7 +6442,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [119] */
@@ -6451,7 +6455,7 @@
/* parameters */ ParameterIndex(213),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [120] */
@@ -6464,7 +6468,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [121] */
@@ -6477,7 +6481,7 @@
/* parameters */ ParameterIndex(205),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [122] */
@@ -6490,7 +6494,7 @@
/* parameters */ ParameterIndex(295),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(104),
+ /* const_eval_fn */ ConstEvalFunctionIndex(108),
},
{
/* [123] */
@@ -6503,7 +6507,7 @@
/* parameters */ ParameterIndex(298),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(104),
+ /* const_eval_fn */ ConstEvalFunctionIndex(108),
},
{
/* [124] */
@@ -6516,7 +6520,7 @@
/* parameters */ ParameterIndex(383),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(56),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [125] */
@@ -6529,7 +6533,7 @@
/* parameters */ ParameterIndex(383),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(90),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [126] */
@@ -6542,7 +6546,7 @@
/* parameters */ ParameterIndex(383),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(66),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [127] */
@@ -6555,7 +6559,7 @@
/* parameters */ ParameterIndex(383),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(42),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [128] */
@@ -6568,7 +6572,7 @@
/* parameters */ ParameterIndex(383),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(92),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [129] */
@@ -6711,7 +6715,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(82),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [140] */
@@ -6724,7 +6728,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(72),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [141] */
@@ -6737,7 +6741,7 @@
/* parameters */ ParameterIndex(209),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(72),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [142] */
@@ -6750,7 +6754,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(72),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [143] */
@@ -6763,7 +6767,7 @@
/* parameters */ ParameterIndex(205),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(72),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [144] */
@@ -6776,7 +6780,7 @@
/* parameters */ ParameterIndex(382),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(26),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [145] */
@@ -6789,7 +6793,7 @@
/* parameters */ ParameterIndex(382),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(84),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [146] */
@@ -6802,7 +6806,7 @@
/* parameters */ ParameterIndex(382),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(54),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [147] */
@@ -6815,7 +6819,7 @@
/* parameters */ ParameterIndex(382),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(36),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [148] */
@@ -6828,7 +6832,7 @@
/* parameters */ ParameterIndex(382),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(86),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [149] */
@@ -6841,7 +6845,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(81),
+ /* const_eval_fn */ ConstEvalFunctionIndex(85),
},
{
/* [150] */
@@ -6854,7 +6858,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(81),
+ /* const_eval_fn */ ConstEvalFunctionIndex(85),
},
{
/* [151] */
@@ -6867,7 +6871,7 @@
/* parameters */ ParameterIndex(223),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(81),
+ /* const_eval_fn */ ConstEvalFunctionIndex(85),
},
{
/* [152] */
@@ -6880,7 +6884,7 @@
/* parameters */ ParameterIndex(350),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(81),
+ /* const_eval_fn */ ConstEvalFunctionIndex(85),
},
{
/* [153] */
@@ -6893,7 +6897,7 @@
/* parameters */ ParameterIndex(355),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(2),
- /* const_eval_fn */ ConstEvalFunctionIndex(81),
+ /* const_eval_fn */ ConstEvalFunctionIndex(85),
},
{
/* [154] */
@@ -6906,7 +6910,7 @@
/* parameters */ ParameterIndex(354),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(2),
- /* const_eval_fn */ ConstEvalFunctionIndex(81),
+ /* const_eval_fn */ ConstEvalFunctionIndex(85),
},
{
/* [155] */
@@ -6919,7 +6923,7 @@
/* parameters */ ParameterIndex(356),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(3),
- /* const_eval_fn */ ConstEvalFunctionIndex(82),
+ /* const_eval_fn */ ConstEvalFunctionIndex(86),
},
{
/* [156] */
@@ -6932,7 +6936,7 @@
/* parameters */ ParameterIndex(358),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(83),
+ /* const_eval_fn */ ConstEvalFunctionIndex(87),
},
{
/* [157] */
@@ -6945,7 +6949,7 @@
/* parameters */ ParameterIndex(360),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(18),
- /* const_eval_fn */ ConstEvalFunctionIndex(84),
+ /* const_eval_fn */ ConstEvalFunctionIndex(88),
},
{
/* [158] */
@@ -7400,7 +7404,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(102),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [193] */
@@ -7413,7 +7417,7 @@
/* parameters */ ParameterIndex(385),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(102),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [194] */
@@ -7426,7 +7430,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(102),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [195] */
@@ -7439,7 +7443,7 @@
/* parameters */ ParameterIndex(209),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(102),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [196] */
@@ -7452,7 +7456,7 @@
/* parameters */ ParameterIndex(386),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(104),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [197] */
@@ -7465,7 +7469,7 @@
/* parameters */ ParameterIndex(387),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(106),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [198] */
@@ -7478,7 +7482,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(108),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [199] */
@@ -7491,7 +7495,7 @@
/* parameters */ ParameterIndex(388),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(108),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [200] */
@@ -7504,7 +7508,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(108),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [201] */
@@ -7517,7 +7521,7 @@
/* parameters */ ParameterIndex(213),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(108),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [202] */
@@ -7530,7 +7534,7 @@
/* parameters */ ParameterIndex(389),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(110),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [203] */
@@ -7543,7 +7547,7 @@
/* parameters */ ParameterIndex(390),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(112),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [204] */
@@ -7556,7 +7560,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(114),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [205] */
@@ -7569,7 +7573,7 @@
/* parameters */ ParameterIndex(391),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(114),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [206] */
@@ -7582,7 +7586,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(114),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [207] */
@@ -7595,7 +7599,7 @@
/* parameters */ ParameterIndex(217),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(114),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [208] */
@@ -7608,7 +7612,7 @@
/* parameters */ ParameterIndex(392),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(116),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [209] */
@@ -7621,7 +7625,7 @@
/* parameters */ ParameterIndex(393),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(118),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [210] */
@@ -7634,7 +7638,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(120),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [211] */
@@ -7647,7 +7651,7 @@
/* parameters */ ParameterIndex(394),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(120),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [212] */
@@ -7660,7 +7664,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(120),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [213] */
@@ -7673,7 +7677,7 @@
/* parameters */ ParameterIndex(209),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(120),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [214] */
@@ -7686,7 +7690,7 @@
/* parameters */ ParameterIndex(395),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(122),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [215] */
@@ -7699,7 +7703,7 @@
/* parameters */ ParameterIndex(396),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(124),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [216] */
@@ -7712,7 +7716,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(126),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [217] */
@@ -7725,7 +7729,7 @@
/* parameters */ ParameterIndex(397),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(126),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [218] */
@@ -7738,7 +7742,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(126),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [219] */
@@ -7751,7 +7755,7 @@
/* parameters */ ParameterIndex(213),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(126),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [220] */
@@ -7764,7 +7768,7 @@
/* parameters */ ParameterIndex(398),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(128),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [221] */
@@ -7777,7 +7781,7 @@
/* parameters */ ParameterIndex(399),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(130),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [222] */
@@ -7790,7 +7794,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(132),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [223] */
@@ -7803,7 +7807,7 @@
/* parameters */ ParameterIndex(400),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(132),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [224] */
@@ -7816,7 +7820,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(132),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [225] */
@@ -7829,7 +7833,7 @@
/* parameters */ ParameterIndex(217),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(132),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [226] */
@@ -7842,7 +7846,7 @@
/* parameters */ ParameterIndex(401),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(134),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [227] */
@@ -7855,7 +7859,7 @@
/* parameters */ ParameterIndex(402),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(136),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [228] */
@@ -7868,7 +7872,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(138),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [229] */
@@ -7881,7 +7885,7 @@
/* parameters */ ParameterIndex(403),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(138),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [230] */
@@ -7894,7 +7898,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(138),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [231] */
@@ -7907,7 +7911,7 @@
/* parameters */ ParameterIndex(209),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(138),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [232] */
@@ -7920,7 +7924,7 @@
/* parameters */ ParameterIndex(404),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(140),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [233] */
@@ -7933,7 +7937,7 @@
/* parameters */ ParameterIndex(405),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(142),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [234] */
@@ -7946,7 +7950,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(144),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [235] */
@@ -7959,7 +7963,7 @@
/* parameters */ ParameterIndex(406),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(144),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [236] */
@@ -7972,7 +7976,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(144),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [237] */
@@ -7985,7 +7989,7 @@
/* parameters */ ParameterIndex(213),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(144),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [238] */
@@ -7998,7 +8002,7 @@
/* parameters */ ParameterIndex(407),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(146),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [239] */
@@ -8011,7 +8015,7 @@
/* parameters */ ParameterIndex(408),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(148),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [240] */
@@ -8024,7 +8028,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(150),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [241] */
@@ -8037,7 +8041,7 @@
/* parameters */ ParameterIndex(409),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(150),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [242] */
@@ -8050,7 +8054,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(150),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [243] */
@@ -8063,7 +8067,7 @@
/* parameters */ ParameterIndex(217),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(150),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [244] */
@@ -8076,7 +8080,7 @@
/* parameters */ ParameterIndex(410),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(152),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [245] */
@@ -8089,7 +8093,7 @@
/* parameters */ ParameterIndex(411),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(154),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [246] */
@@ -8167,7 +8171,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(79),
+ /* const_eval_fn */ ConstEvalFunctionIndex(83),
},
{
/* [252] */
@@ -8180,7 +8184,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(79),
+ /* const_eval_fn */ ConstEvalFunctionIndex(83),
},
{
/* [253] */
@@ -8193,7 +8197,7 @@
/* parameters */ ParameterIndex(223),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(79),
+ /* const_eval_fn */ ConstEvalFunctionIndex(83),
},
{
/* [254] */
@@ -8206,7 +8210,7 @@
/* parameters */ ParameterIndex(350),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(79),
+ /* const_eval_fn */ ConstEvalFunctionIndex(83),
},
{
/* [255] */
@@ -8219,7 +8223,7 @@
/* parameters */ ParameterIndex(353),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(2),
- /* const_eval_fn */ ConstEvalFunctionIndex(79),
+ /* const_eval_fn */ ConstEvalFunctionIndex(83),
},
{
/* [256] */
@@ -8232,7 +8236,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(80),
+ /* const_eval_fn */ ConstEvalFunctionIndex(84),
},
{
/* [257] */
@@ -8245,7 +8249,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(80),
+ /* const_eval_fn */ ConstEvalFunctionIndex(84),
},
{
/* [258] */
@@ -8258,7 +8262,7 @@
/* parameters */ ParameterIndex(223),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(80),
+ /* const_eval_fn */ ConstEvalFunctionIndex(84),
},
{
/* [259] */
@@ -8271,7 +8275,7 @@
/* parameters */ ParameterIndex(350),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(80),
+ /* const_eval_fn */ ConstEvalFunctionIndex(84),
},
{
/* [260] */
@@ -8284,7 +8288,7 @@
/* parameters */ ParameterIndex(353),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(2),
- /* const_eval_fn */ ConstEvalFunctionIndex(80),
+ /* const_eval_fn */ ConstEvalFunctionIndex(84),
},
{
/* [261] */
@@ -8297,7 +8301,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(85),
+ /* const_eval_fn */ ConstEvalFunctionIndex(89),
},
{
/* [262] */
@@ -8310,7 +8314,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(85),
+ /* const_eval_fn */ ConstEvalFunctionIndex(89),
},
{
/* [263] */
@@ -8323,7 +8327,7 @@
/* parameters */ ParameterIndex(223),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(85),
+ /* const_eval_fn */ ConstEvalFunctionIndex(89),
},
{
/* [264] */
@@ -8336,7 +8340,7 @@
/* parameters */ ParameterIndex(350),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(85),
+ /* const_eval_fn */ ConstEvalFunctionIndex(89),
},
{
/* [265] */
@@ -8349,7 +8353,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(86),
+ /* const_eval_fn */ ConstEvalFunctionIndex(90),
},
{
/* [266] */
@@ -8362,7 +8366,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(86),
+ /* const_eval_fn */ ConstEvalFunctionIndex(90),
},
{
/* [267] */
@@ -8375,7 +8379,7 @@
/* parameters */ ParameterIndex(223),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(86),
+ /* const_eval_fn */ ConstEvalFunctionIndex(90),
},
{
/* [268] */
@@ -8388,7 +8392,7 @@
/* parameters */ ParameterIndex(350),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(86),
+ /* const_eval_fn */ ConstEvalFunctionIndex(90),
},
{
/* [269] */
@@ -8401,7 +8405,7 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(88),
+ /* const_eval_fn */ ConstEvalFunctionIndex(92),
},
{
/* [270] */
@@ -8414,7 +8418,7 @@
/* parameters */ ParameterIndex(233),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(88),
+ /* const_eval_fn */ ConstEvalFunctionIndex(92),
},
{
/* [271] */
@@ -8427,7 +8431,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(88),
+ /* const_eval_fn */ ConstEvalFunctionIndex(92),
},
{
/* [272] */
@@ -8440,7 +8444,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(88),
+ /* const_eval_fn */ ConstEvalFunctionIndex(92),
},
{
/* [273] */
@@ -8453,7 +8457,7 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(89),
+ /* const_eval_fn */ ConstEvalFunctionIndex(93),
},
{
/* [274] */
@@ -8466,7 +8470,7 @@
/* parameters */ ParameterIndex(233),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(89),
+ /* const_eval_fn */ ConstEvalFunctionIndex(93),
},
{
/* [275] */
@@ -8479,7 +8483,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(89),
+ /* const_eval_fn */ ConstEvalFunctionIndex(93),
},
{
/* [276] */
@@ -8492,7 +8496,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(89),
+ /* const_eval_fn */ ConstEvalFunctionIndex(93),
},
{
/* [277] */
@@ -8544,7 +8548,7 @@
/* parameters */ ParameterIndex(224),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(58),
+ /* const_eval_fn */ ConstEvalFunctionIndex(60),
},
{
/* [281] */
@@ -8557,7 +8561,7 @@
/* parameters */ ParameterIndex(228),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(58),
+ /* const_eval_fn */ ConstEvalFunctionIndex(60),
},
{
/* [282] */
@@ -8570,7 +8574,7 @@
/* parameters */ ParameterIndex(231),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(59),
+ /* const_eval_fn */ ConstEvalFunctionIndex(61),
},
{
/* [283] */
@@ -8583,7 +8587,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(31),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [284] */
@@ -8596,7 +8600,7 @@
/* parameters */ ParameterIndex(380),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(31),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [285] */
@@ -8609,7 +8613,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(31),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [286] */
@@ -8622,7 +8626,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(33),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [287] */
@@ -8635,7 +8639,7 @@
/* parameters */ ParameterIndex(17),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(33),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [288] */
@@ -8648,7 +8652,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(33),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [289] */
@@ -8661,7 +8665,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(15),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [290] */
@@ -8674,7 +8678,7 @@
/* parameters */ ParameterIndex(370),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(15),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [291] */
@@ -8687,7 +8691,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(15),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [292] */
@@ -8700,7 +8704,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(85),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [293] */
@@ -8713,7 +8717,7 @@
/* parameters */ ParameterIndex(381),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(85),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [294] */
@@ -8726,7 +8730,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(85),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [295] */
@@ -8739,7 +8743,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [296] */
@@ -8752,7 +8756,7 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
/* [297] */
@@ -8765,7 +8769,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [298] */
@@ -9766,7 +9770,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(50),
+ /* const_eval_fn */ ConstEvalFunctionIndex(52),
},
{
/* [375] */
@@ -9779,7 +9783,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(50),
+ /* const_eval_fn */ ConstEvalFunctionIndex(52),
},
{
/* [376] */
@@ -9792,7 +9796,7 @@
/* parameters */ ParameterIndex(370),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(15),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(51),
+ /* const_eval_fn */ ConstEvalFunctionIndex(53),
},
{
/* [377] */
@@ -9805,7 +9809,7 @@
/* parameters */ ParameterIndex(371),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(14),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(51),
+ /* const_eval_fn */ ConstEvalFunctionIndex(53),
},
{
/* [378] */
@@ -9818,7 +9822,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(52),
+ /* const_eval_fn */ ConstEvalFunctionIndex(54),
},
{
/* [379] */
@@ -9831,7 +9835,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(52),
+ /* const_eval_fn */ ConstEvalFunctionIndex(54),
},
{
/* [380] */
@@ -9844,7 +9848,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(55),
+ /* const_eval_fn */ ConstEvalFunctionIndex(57),
},
{
/* [381] */
@@ -9857,7 +9861,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(55),
+ /* const_eval_fn */ ConstEvalFunctionIndex(57),
},
{
/* [382] */
@@ -9870,7 +9874,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(56),
+ /* const_eval_fn */ ConstEvalFunctionIndex(58),
},
{
/* [383] */
@@ -9883,7 +9887,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(56),
+ /* const_eval_fn */ ConstEvalFunctionIndex(58),
},
{
/* [384] */
@@ -9896,7 +9900,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(57),
+ /* const_eval_fn */ ConstEvalFunctionIndex(59),
},
{
/* [385] */
@@ -9909,7 +9913,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(57),
+ /* const_eval_fn */ ConstEvalFunctionIndex(59),
},
{
/* [386] */
@@ -9922,7 +9926,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(60),
+ /* const_eval_fn */ ConstEvalFunctionIndex(62),
},
{
/* [387] */
@@ -9935,7 +9939,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(60),
+ /* const_eval_fn */ ConstEvalFunctionIndex(62),
},
{
/* [388] */
@@ -9948,7 +9952,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(61),
+ /* const_eval_fn */ ConstEvalFunctionIndex(63),
},
{
/* [389] */
@@ -9961,7 +9965,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(61),
+ /* const_eval_fn */ ConstEvalFunctionIndex(63),
},
{
/* [390] */
@@ -9974,7 +9978,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(62),
+ /* const_eval_fn */ ConstEvalFunctionIndex(64),
},
{
/* [391] */
@@ -9987,7 +9991,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(62),
+ /* const_eval_fn */ ConstEvalFunctionIndex(64),
},
{
/* [392] */
@@ -10000,7 +10004,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(63),
+ /* const_eval_fn */ ConstEvalFunctionIndex(65),
},
{
/* [393] */
@@ -10013,7 +10017,7 @@
/* parameters */ ParameterIndex(221),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(63),
+ /* const_eval_fn */ ConstEvalFunctionIndex(65),
},
{
/* [394] */
@@ -10026,7 +10030,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(64),
+ /* const_eval_fn */ ConstEvalFunctionIndex(66),
},
{
/* [395] */
@@ -10039,7 +10043,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(64),
+ /* const_eval_fn */ ConstEvalFunctionIndex(66),
},
{
/* [396] */
@@ -10052,7 +10056,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(65),
+ /* const_eval_fn */ ConstEvalFunctionIndex(67),
},
{
/* [397] */
@@ -10065,7 +10069,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(65),
+ /* const_eval_fn */ ConstEvalFunctionIndex(67),
},
{
/* [398] */
@@ -10078,7 +10082,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(66),
+ /* const_eval_fn */ ConstEvalFunctionIndex(68),
},
{
/* [399] */
@@ -10091,7 +10095,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(66),
+ /* const_eval_fn */ ConstEvalFunctionIndex(68),
},
{
/* [400] */
@@ -10104,7 +10108,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(67),
+ /* const_eval_fn */ ConstEvalFunctionIndex(69),
},
{
/* [401] */
@@ -10117,7 +10121,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(67),
+ /* const_eval_fn */ ConstEvalFunctionIndex(69),
},
{
/* [402] */
@@ -10130,7 +10134,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(69),
+ /* const_eval_fn */ ConstEvalFunctionIndex(71),
},
{
/* [403] */
@@ -10143,7 +10147,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(69),
+ /* const_eval_fn */ ConstEvalFunctionIndex(71),
},
{
/* [404] */
@@ -10208,7 +10212,7 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(76),
+ /* const_eval_fn */ ConstEvalFunctionIndex(80),
},
{
/* [409] */
@@ -10221,7 +10225,7 @@
/* parameters */ ParameterIndex(233),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(76),
+ /* const_eval_fn */ ConstEvalFunctionIndex(80),
},
{
/* [410] */
@@ -10234,7 +10238,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [411] */
@@ -10247,7 +10251,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [412] */
@@ -10260,7 +10264,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(78),
+ /* const_eval_fn */ ConstEvalFunctionIndex(82),
},
{
/* [413] */
@@ -10273,7 +10277,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(78),
+ /* const_eval_fn */ ConstEvalFunctionIndex(82),
},
{
/* [414] */
@@ -10286,7 +10290,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(87),
+ /* const_eval_fn */ ConstEvalFunctionIndex(91),
},
{
/* [415] */
@@ -10299,7 +10303,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(87),
+ /* const_eval_fn */ ConstEvalFunctionIndex(91),
},
{
/* [416] */
@@ -10312,7 +10316,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(92),
+ /* const_eval_fn */ ConstEvalFunctionIndex(96),
},
{
/* [417] */
@@ -10325,7 +10329,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(92),
+ /* const_eval_fn */ ConstEvalFunctionIndex(96),
},
{
/* [418] */
@@ -10338,7 +10342,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(93),
+ /* const_eval_fn */ ConstEvalFunctionIndex(97),
},
{
/* [419] */
@@ -10351,7 +10355,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(93),
+ /* const_eval_fn */ ConstEvalFunctionIndex(97),
},
{
/* [420] */
@@ -10364,7 +10368,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(94),
+ /* const_eval_fn */ ConstEvalFunctionIndex(98),
},
{
/* [421] */
@@ -10377,7 +10381,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(94),
+ /* const_eval_fn */ ConstEvalFunctionIndex(98),
},
{
/* [422] */
@@ -10390,7 +10394,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(95),
+ /* const_eval_fn */ ConstEvalFunctionIndex(99),
},
{
/* [423] */
@@ -10403,7 +10407,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(95),
+ /* const_eval_fn */ ConstEvalFunctionIndex(99),
},
{
/* [424] */
@@ -10416,7 +10420,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(96),
+ /* const_eval_fn */ ConstEvalFunctionIndex(100),
},
{
/* [425] */
@@ -10429,7 +10433,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(96),
+ /* const_eval_fn */ ConstEvalFunctionIndex(100),
},
{
/* [426] */
@@ -10442,7 +10446,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(97),
+ /* const_eval_fn */ ConstEvalFunctionIndex(101),
},
{
/* [427] */
@@ -10455,7 +10459,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(97),
+ /* const_eval_fn */ ConstEvalFunctionIndex(101),
},
{
/* [428] */
@@ -10468,7 +10472,7 @@
/* parameters */ ParameterIndex(16),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(98),
+ /* const_eval_fn */ ConstEvalFunctionIndex(102),
},
{
/* [429] */
@@ -10481,7 +10485,7 @@
/* parameters */ ParameterIndex(351),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(98),
+ /* const_eval_fn */ ConstEvalFunctionIndex(102),
},
{
/* [430] */
@@ -10494,7 +10498,7 @@
/* parameters */ ParameterIndex(16),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(99),
+ /* const_eval_fn */ ConstEvalFunctionIndex(103),
},
{
/* [431] */
@@ -10507,7 +10511,7 @@
/* parameters */ ParameterIndex(351),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(99),
+ /* const_eval_fn */ ConstEvalFunctionIndex(103),
},
{
/* [432] */
@@ -10707,6 +10711,32 @@
{
/* [447] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(374),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(33),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(50),
+ },
+ {
+ /* [448] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(375),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(33),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(51),
+ },
+ {
+ /* [449] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 2,
/* num_template_types */ 1,
/* num_template_numbers */ 1,
@@ -10715,10 +10745,10 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(53),
+ /* const_eval_fn */ ConstEvalFunctionIndex(55),
},
{
- /* [448] */
+ /* [450] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 3,
/* num_template_types */ 1,
@@ -10728,10 +10758,10 @@
/* parameters */ ParameterIndex(222),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(54),
+ /* const_eval_fn */ ConstEvalFunctionIndex(56),
},
{
- /* [449] */
+ /* [451] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 0,
/* num_template_types */ 0,
@@ -10744,7 +10774,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [450] */
+ /* [452] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 1,
/* num_template_types */ 1,
@@ -10754,35 +10784,9 @@
/* parameters */ ParameterIndex(353),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(3),
- /* const_eval_fn */ ConstEvalFunctionIndex(68),
- },
- {
- /* [451] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 1,
- /* num_template_types */ 0,
- /* num_template_numbers */ 0,
- /* template_types */ TemplateTypeIndex(/* invalid */),
- /* template_numbers */ TemplateNumberIndex(/* invalid */),
- /* parameters */ ParameterIndex(17),
- /* return_type_matcher_indices */ TypeMatcherIndicesIndex(26),
- /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(70),
},
{
- /* [452] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 1,
- /* num_template_types */ 0,
- /* num_template_numbers */ 0,
- /* template_types */ TemplateTypeIndex(/* invalid */),
- /* template_numbers */ TemplateNumberIndex(/* invalid */),
- /* parameters */ ParameterIndex(17),
- /* return_type_matcher_indices */ TypeMatcherIndicesIndex(26),
- /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(71),
- },
- {
/* [453] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 1,
@@ -10804,7 +10808,7 @@
/* template_types */ TemplateTypeIndex(/* invalid */),
/* template_numbers */ TemplateNumberIndex(/* invalid */),
/* parameters */ ParameterIndex(17),
- /* return_type_matcher_indices */ TypeMatcherIndicesIndex(28),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(26),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(73),
},
@@ -10817,12 +10821,64 @@
/* template_types */ TemplateTypeIndex(/* invalid */),
/* template_numbers */ TemplateNumberIndex(/* invalid */),
/* parameters */ ParameterIndex(17),
- /* return_type_matcher_indices */ TypeMatcherIndicesIndex(28),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(26),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(74),
},
{
/* [456] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(17),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(28),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ },
+ {
+ /* [457] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(17),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(28),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(76),
+ },
+ {
+ /* [458] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(17),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(30),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ },
+ {
+ /* [459] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(17),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(32),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(78),
+ },
+ {
+ /* [460] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_template_types */ 1,
@@ -10835,7 +10891,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [457] */
+ /* [461] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 2,
/* num_template_types */ 1,
@@ -10848,7 +10904,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [458] */
+ /* [462] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 2,
/* num_template_types */ 1,
@@ -10861,7 +10917,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [459] */
+ /* [463] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_template_types */ 1,
@@ -10874,7 +10930,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [460] */
+ /* [464] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 0,
/* num_template_types */ 0,
@@ -10887,7 +10943,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [461] */
+ /* [465] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 2,
/* num_template_types */ 1,
@@ -10900,7 +10956,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [462] */
+ /* [466] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_template_types */ 1,
@@ -10910,10 +10966,10 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(75),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
},
{
- /* [463] */
+ /* [467] */
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 2,
/* num_template_types */ 0,
@@ -10923,10 +10979,10 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(90),
+ /* const_eval_fn */ ConstEvalFunctionIndex(94),
},
{
- /* [464] */
+ /* [468] */
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 2,
/* num_template_types */ 0,
@@ -10936,10 +10992,10 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(91),
+ /* const_eval_fn */ ConstEvalFunctionIndex(95),
},
{
- /* [465] */
+ /* [469] */
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 1,
/* num_template_types */ 1,
@@ -10949,7 +11005,7 @@
/* parameters */ ParameterIndex(213),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(156),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
};
@@ -11379,60 +11435,72 @@
},
{
/* [62] */
+ /* fn pack4xI8Clamp(vec4<i32>) -> u32 */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(447),
+ },
+ {
+ /* [63] */
+ /* fn pack4xU8Clamp(vec4<u32>) -> u32 */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(448),
+ },
+ {
+ /* [64] */
/* fn pow<T : fa_f32_f16>(T, T) -> T */
/* fn pow<N : num, T : fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(374),
},
{
- /* [63] */
+ /* [65] */
/* fn quantizeToF16(f32) -> f32 */
/* fn quantizeToF16<N : num>(vec<N, f32>) -> vec<N, f32> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(376),
},
{
- /* [64] */
+ /* [66] */
/* fn radians<T : fa_f32_f16>(T) -> T */
/* fn radians<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(378),
},
{
- /* [65] */
+ /* [67] */
/* fn reflect<N : num, T : fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(447),
+ /* overloads */ OverloadIndex(449),
},
{
- /* [66] */
+ /* [68] */
/* fn refract<N : num, T : fa_f32_f16>(vec<N, T>, vec<N, T>, T) -> vec<N, T> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(448),
+ /* overloads */ OverloadIndex(450),
},
{
- /* [67] */
+ /* [69] */
/* fn reverseBits<T : iu32>(T) -> T */
/* fn reverseBits<N : num, T : iu32>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(380),
},
{
- /* [68] */
+ /* [70] */
/* fn round<T : fa_f32_f16>(@test_value(3.5) T) -> T */
/* fn round<N : num, T : fa_f32_f16>(@test_value(3.5) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(382),
},
{
- /* [69] */
+ /* [71] */
/* fn saturate<T : fa_f32_f16>(@test_value(2) T) -> T */
/* fn saturate<T : fa_f32_f16, N : num>(@test_value(2) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(384),
},
{
- /* [70] */
+ /* [72] */
/* fn select<T : scalar>(T, T, bool) -> T */
/* fn select<T : scalar, N : num>(vec<N, T>, vec<N, T>, bool) -> vec<N, T> */
/* fn select<N : num, T : scalar>(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T> */
@@ -11440,124 +11508,136 @@
/* overloads */ OverloadIndex(280),
},
{
- /* [71] */
+ /* [73] */
/* fn sign<T : fia_fi32_f16>(T) -> T */
/* fn sign<N : num, T : fia_fi32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(386),
},
{
- /* [72] */
+ /* [74] */
/* fn sin<T : fa_f32_f16>(@test_value(1.57079632679) T) -> T */
/* fn sin<N : num, T : fa_f32_f16>(@test_value(1.57079632679) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(388),
},
{
- /* [73] */
+ /* [75] */
/* fn sinh<T : fa_f32_f16>(T) -> T */
/* fn sinh<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(390),
},
{
- /* [74] */
+ /* [76] */
/* fn smoothstep<T : fa_f32_f16>(@test_value(2) T, @test_value(4) T, @test_value(3) T) -> T */
/* fn smoothstep<N : num, T : fa_f32_f16>(@test_value(2) vec<N, T>, @test_value(4) vec<N, T>, @test_value(3) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(392),
},
{
- /* [75] */
+ /* [77] */
/* fn sqrt<T : fa_f32_f16>(T) -> T */
/* fn sqrt<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(394),
},
{
- /* [76] */
+ /* [78] */
/* fn step<T : fa_f32_f16>(T, T) -> T */
/* fn step<N : num, T : fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(396),
},
{
- /* [77] */
+ /* [79] */
/* fn storageBarrier() */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(449),
+ /* overloads */ OverloadIndex(451),
},
{
- /* [78] */
+ /* [80] */
/* fn tan<T : fa_f32_f16>(T) -> T */
/* fn tan<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(398),
},
{
- /* [79] */
+ /* [81] */
/* fn tanh<T : fa_f32_f16>(T) -> T */
/* fn tanh<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(400),
},
{
- /* [80] */
+ /* [82] */
/* fn transpose<M : num, N : num, T : fa_f32_f16>(mat<M, N, T>) -> mat<N, M, T> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(450),
+ /* overloads */ OverloadIndex(452),
},
{
- /* [81] */
+ /* [83] */
/* fn trunc<T : fa_f32_f16>(@test_value(1.5) T) -> T */
/* fn trunc<N : num, T : fa_f32_f16>(@test_value(1.5) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(402),
},
{
- /* [82] */
- /* fn unpack2x16float(u32) -> vec2<f32> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(451),
- },
- {
- /* [83] */
- /* fn unpack2x16snorm(u32) -> vec2<f32> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(452),
- },
- {
/* [84] */
- /* fn unpack2x16unorm(u32) -> vec2<f32> */
+ /* fn unpack2x16float(u32) -> vec2<f32> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(453),
},
{
/* [85] */
- /* fn unpack4x8snorm(u32) -> vec4<f32> */
+ /* fn unpack2x16snorm(u32) -> vec2<f32> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(454),
},
{
/* [86] */
- /* fn unpack4x8unorm(u32) -> vec4<f32> */
+ /* fn unpack2x16unorm(u32) -> vec2<f32> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(455),
},
{
/* [87] */
- /* fn workgroupBarrier() */
+ /* fn unpack4x8snorm(u32) -> vec4<f32> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(449),
+ /* overloads */ OverloadIndex(456),
},
{
/* [88] */
- /* fn textureBarrier() */
+ /* fn unpack4x8unorm(u32) -> vec4<f32> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(449),
+ /* overloads */ OverloadIndex(457),
},
{
/* [89] */
+ /* fn unpack4xI8(u32) -> vec4<i32> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(458),
+ },
+ {
+ /* [90] */
+ /* fn unpack4xU8(u32) -> vec4<u32> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(459),
+ },
+ {
+ /* [91] */
+ /* fn workgroupBarrier() */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(451),
+ },
+ {
+ /* [92] */
+ /* fn textureBarrier() */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(451),
+ },
+ {
+ /* [93] */
/* fn textureDimensions<T : fiu32>(texture: texture_1d<T>) -> u32 */
/* fn textureDimensions<T : fiu32, L : iu32>(texture: texture_1d<T>, level: L) -> u32 */
/* fn textureDimensions<T : fiu32>(texture: texture_2d<T>) -> vec2<u32> */
@@ -11589,7 +11669,7 @@
/* overloads */ OverloadIndex(0),
},
{
- /* [90] */
+ /* [94] */
/* fn textureGather<T : fiu32, C : iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> */
/* fn textureGather<T : fiu32, C : iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<T> */
/* fn textureGather<T : fiu32, C : iu32, A : iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<T> */
@@ -11606,7 +11686,7 @@
/* overloads */ OverloadIndex(93),
},
{
- /* [91] */
+ /* [95] */
/* fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32> */
/* fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureGatherCompare<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> vec4<f32> */
@@ -11617,7 +11697,7 @@
/* overloads */ OverloadIndex(174),
},
{
- /* [92] */
+ /* [96] */
/* fn textureNumLayers<T : fiu32>(texture: texture_2d_array<T>) -> u32 */
/* fn textureNumLayers<T : fiu32>(texture: texture_cube_array<T>) -> u32 */
/* fn textureNumLayers(texture: texture_depth_2d_array) -> u32 */
@@ -11627,7 +11707,7 @@
/* overloads */ OverloadIndex(246),
},
{
- /* [93] */
+ /* [97] */
/* fn textureNumLevels<T : fiu32>(texture: texture_1d<T>) -> u32 */
/* fn textureNumLevels<T : fiu32>(texture: texture_2d<T>) -> u32 */
/* fn textureNumLevels<T : fiu32>(texture: texture_2d_array<T>) -> u32 */
@@ -11642,14 +11722,14 @@
/* overloads */ OverloadIndex(129),
},
{
- /* [94] */
+ /* [98] */
/* fn textureNumSamples<T : fiu32>(texture: texture_multisampled_2d<T>) -> u32 */
/* fn textureNumSamples(texture: texture_depth_multisampled_2d) -> u32 */
/* num overloads */ 2,
/* overloads */ OverloadIndex(404),
},
{
- /* [95] */
+ /* [99] */
/* fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32> */
/* fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> */
@@ -11669,7 +11749,7 @@
/* overloads */ OverloadIndex(64),
},
{
- /* [96] */
+ /* [100] */
/* fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32> */
/* fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureSampleBias<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32) -> vec4<f32> */
@@ -11682,7 +11762,7 @@
/* overloads */ OverloadIndex(158),
},
{
- /* [97] */
+ /* [101] */
/* fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 */
/* fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32 */
/* fn textureSampleCompare<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32 */
@@ -11693,7 +11773,7 @@
/* overloads */ OverloadIndex(180),
},
{
- /* [98] */
+ /* [102] */
/* fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 */
/* fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32 */
/* fn textureSampleCompareLevel<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32 */
@@ -11704,7 +11784,7 @@
/* overloads */ OverloadIndex(186),
},
{
- /* [99] */
+ /* [103] */
/* fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
/* fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureSampleGrad<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
@@ -11717,7 +11797,7 @@
/* overloads */ OverloadIndex(166),
},
{
- /* [100] */
+ /* [104] */
/* fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32> */
/* fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureSampleLevel<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32) -> vec4<f32> */
@@ -11736,14 +11816,14 @@
/* overloads */ OverloadIndex(79),
},
{
- /* [101] */
+ /* [105] */
/* fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(406),
},
{
- /* [102] */
+ /* [106] */
/* fn textureStore<C : iu32>(texture: texture_storage_1d<f32_texel_format, writable>, coords: C, value: vec4<f32>) */
/* fn textureStore<C : iu32>(texture: texture_storage_2d<f32_texel_format, writable>, coords: vec2<C>, value: vec4<f32>) */
/* fn textureStore<C : iu32, A : iu32>(texture: texture_storage_2d_array<f32_texel_format, writable>, coords: vec2<C>, array_index: A, value: vec4<f32>) */
@@ -11760,7 +11840,7 @@
/* overloads */ OverloadIndex(105),
},
{
- /* [103] */
+ /* [107] */
/* fn textureLoad<T : fiu32, C : iu32, L : iu32>(texture: texture_1d<T>, coords: C, level: L) -> vec4<T> */
/* fn textureLoad<T : fiu32, C : iu32, L : iu32>(texture: texture_2d<T>, coords: vec2<C>, level: L) -> vec4<T> */
/* fn textureLoad<T : fiu32, C : iu32, A : iu32, L : iu32>(texture: texture_2d_array<T>, coords: vec2<C>, array_index: A, level: L) -> vec4<T> */
@@ -11786,89 +11866,89 @@
/* overloads */ OverloadIndex(27),
},
{
- /* [104] */
- /* fn atomicLoad<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(456),
- },
- {
- /* [105] */
- /* fn atomicStore<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(457),
- },
- {
- /* [106] */
- /* fn atomicAdd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(458),
- },
- {
- /* [107] */
- /* fn atomicSub<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(458),
- },
- {
/* [108] */
- /* fn atomicMax<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(458),
- },
- {
- /* [109] */
- /* fn atomicMin<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(458),
- },
- {
- /* [110] */
- /* fn atomicAnd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(458),
- },
- {
- /* [111] */
- /* fn atomicOr<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(458),
- },
- {
- /* [112] */
- /* fn atomicXor<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(458),
- },
- {
- /* [113] */
- /* fn atomicExchange<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(458),
- },
- {
- /* [114] */
- /* fn atomicCompareExchangeWeak<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T, T) -> __atomic_compare_exchange_result<T> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(459),
- },
- {
- /* [115] */
- /* fn subgroupBallot() -> vec4<u32> */
+ /* fn atomicLoad<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T */
/* num overloads */ 1,
/* overloads */ OverloadIndex(460),
},
{
- /* [116] */
- /* fn subgroupBroadcast<T : fiu32>(value: T, @const sourceLaneIndex: u32) -> T */
+ /* [109] */
+ /* fn atomicStore<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) */
/* num overloads */ 1,
/* overloads */ OverloadIndex(461),
},
{
- /* [117] */
- /* fn _tint_materialize<T>(T) -> T */
+ /* [110] */
+ /* fn atomicAdd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
/* overloads */ OverloadIndex(462),
},
+ {
+ /* [111] */
+ /* fn atomicSub<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(462),
+ },
+ {
+ /* [112] */
+ /* fn atomicMax<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(462),
+ },
+ {
+ /* [113] */
+ /* fn atomicMin<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(462),
+ },
+ {
+ /* [114] */
+ /* fn atomicAnd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(462),
+ },
+ {
+ /* [115] */
+ /* fn atomicOr<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(462),
+ },
+ {
+ /* [116] */
+ /* fn atomicXor<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(462),
+ },
+ {
+ /* [117] */
+ /* fn atomicExchange<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(462),
+ },
+ {
+ /* [118] */
+ /* fn atomicCompareExchangeWeak<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T, T) -> __atomic_compare_exchange_result<T> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(463),
+ },
+ {
+ /* [119] */
+ /* fn subgroupBallot() -> vec4<u32> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(464),
+ },
+ {
+ /* [120] */
+ /* fn subgroupBroadcast<T : fiu32>(value: T, @const sourceLaneIndex: u32) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(465),
+ },
+ {
+ /* [121] */
+ /* fn _tint_materialize<T>(T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(466),
+ },
};
constexpr IntrinsicInfo kUnaryOperators[] = {
@@ -11980,13 +12060,13 @@
/* [8] */
/* op &&(bool, bool) -> bool */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(463),
+ /* overloads */ OverloadIndex(467),
},
{
/* [9] */
/* op ||(bool, bool) -> bool */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(464),
+ /* overloads */ OverloadIndex(468),
},
{
/* [10] */
@@ -12261,7 +12341,7 @@
/* [17] */
/* conv packedVec3<T : concrete_scalar>(vec3<T>) -> packedVec3<T> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(465),
+ /* overloads */ OverloadIndex(469),
},
};
@@ -12302,6 +12382,8 @@
/* unary '!' */ kUnaryOperators[kUnaryOperatorNot],
/* unary '~' */ kUnaryOperators[kUnaryOperatorComplement],
/* unary '-' */ kUnaryOperators[kUnaryOperatorMinus],
+ /* unary '*' */ tint::core::intrinsic::kNoOverloads,
+ /* unary '&' */ tint::core::intrinsic::kNoOverloads,
};
} // namespace tint::core::intrinsic
diff --git a/src/tint/lang/core/intrinsic/table.cc b/src/tint/lang/core/intrinsic/table.cc
index aa38b22..a8ee926 100644
--- a/src/tint/lang/core/intrinsic/table.cc
+++ b/src/tint/lang/core/intrinsic/table.cc
@@ -90,7 +90,7 @@
using Candidates = Vector<Candidate, kNumFixedCandidates>;
/// Callback function when no overloads match.
-using OnNoMatch = std::function<void(VectorRef<Candidate>)>;
+using OnNoMatch = std::function<std::string(VectorRef<Candidate>)>;
/// Sorts the candidates based on their score, with the lowest (best-ranking) scores first.
static inline void SortCandidates(Candidates& candidates) {
@@ -109,13 +109,13 @@
/// @param on_no_match an error callback when no intrinsic overloads matched the provided
/// arguments.
/// @returns the matched intrinsic
-Result<Overload> MatchIntrinsic(Context& context,
- const IntrinsicInfo& intrinsic,
- std::string_view intrinsic_name,
- VectorRef<const core::type::Type*> args,
- EvaluationStage earliest_eval_stage,
- TemplateState templates,
- const OnNoMatch& on_no_match);
+Result<Overload, std::string> MatchIntrinsic(Context& context,
+ const IntrinsicInfo& intrinsic,
+ std::string_view intrinsic_name,
+ VectorRef<const core::type::Type*> args,
+ EvaluationStage earliest_eval_stage,
+ TemplateState templates,
+ const OnNoMatch& on_no_match);
/// Evaluates the single overload for the provided argument types.
/// @param context the intrinsic context
@@ -142,11 +142,11 @@
/// template as `f32`.
/// @see https://www.w3.org/TR/WGSL/#overload-resolution-section
/// @returns the resolved Candidate.
-Candidate ResolveCandidate(Context& context,
- Candidates&& candidates,
- std::string_view intrinsic_name,
- VectorRef<const core::type::Type*> args,
- TemplateState templates);
+Result<Candidate, std::string> ResolveCandidate(Context& context,
+ Candidates&& candidates,
+ std::string_view intrinsic_name,
+ VectorRef<const core::type::Type*> args,
+ TemplateState templates);
/// Match constructs a new MatchState
/// @param context the intrinsic context
@@ -173,12 +173,12 @@
VectorRef<Candidate> candidates,
std::string_view intrinsic_name);
-/// Raises an error when no overload is a clear winner of overload resolution
-void ErrAmbiguousOverload(Context& context,
- std::string_view intrinsic_name,
- VectorRef<const core::type::Type*> args,
- TemplateState templates,
- VectorRef<Candidate> candidates);
+/// Raises an ICE when no overload is a clear winner of overload resolution
+std::string ErrAmbiguousOverload(Context& context,
+ std::string_view intrinsic_name,
+ VectorRef<const core::type::Type*> args,
+ TemplateState templates,
+ VectorRef<Candidate> candidates);
/// @return a string representing a call to a builtin with the given argument
/// types.
@@ -206,13 +206,13 @@
return ss.str();
}
-Result<Overload> MatchIntrinsic(Context& context,
- const IntrinsicInfo& intrinsic,
- std::string_view intrinsic_name,
- VectorRef<const core::type::Type*> args,
- EvaluationStage earliest_eval_stage,
- TemplateState templates,
- const OnNoMatch& on_no_match) {
+Result<Overload, std::string> MatchIntrinsic(Context& context,
+ const IntrinsicInfo& intrinsic,
+ std::string_view intrinsic_name,
+ VectorRef<const core::type::Type*> args,
+ EvaluationStage earliest_eval_stage,
+ TemplateState templates,
+ const OnNoMatch& on_no_match) {
size_t num_matched = 0;
size_t match_idx = 0;
Vector<Candidate, kNumFixedCandidates> candidates;
@@ -232,8 +232,7 @@
if (num_matched == 0) {
// Sort the candidates with the most promising first
SortCandidates(candidates);
- on_no_match(std::move(candidates));
- return Failure{};
+ return on_no_match(std::move(candidates));
}
Candidate match;
@@ -241,12 +240,12 @@
if (num_matched == 1) {
match = std::move(candidates[match_idx]);
} else {
- match = ResolveCandidate(context, std::move(candidates), intrinsic_name, args,
- std::move(templates));
- if (!match.overload) {
- // Ambiguous overload. ResolveCandidate() will have already raised an error diagnostic.
- return Failure{};
+ auto result = ResolveCandidate(context, std::move(candidates), intrinsic_name, args,
+ std::move(templates));
+ if (TINT_UNLIKELY(result != Success)) {
+ return result.Failure();
}
+ match = result.Get();
}
// Build the return type
@@ -258,8 +257,9 @@
earliest_eval_stage)
.Type(&any);
if (TINT_UNLIKELY(!return_type)) {
- TINT_ICE() << "MatchState.Match() returned null";
- return Failure{};
+ std::string err = "MatchState.Match() returned null";
+ TINT_ICE() << err;
+ return err;
}
} else {
return_type = context.types.void_();
@@ -388,11 +388,11 @@
return Candidate{&overload, templates, parameters, score};
}
-Candidate ResolveCandidate(Context& context,
- Candidates&& candidates,
- std::string_view intrinsic_name,
- VectorRef<const core::type::Type*> args,
- TemplateState templates) {
+Result<Candidate, std::string> ResolveCandidate(Context& context,
+ Candidates&& candidates,
+ std::string_view intrinsic_name,
+ VectorRef<const core::type::Type*> args,
+ TemplateState templates) {
Vector<uint32_t, kNumFixedParams> best_ranks;
best_ranks.Resize(args.Length(), 0xffffffff);
size_t num_matched = 0;
@@ -447,8 +447,7 @@
// Re-sort the candidates with the most promising first
SortCandidates(candidates);
// Raise an error
- ErrAmbiguousOverload(context, intrinsic_name, args, templates, candidates);
- return {};
+ return ErrAmbiguousOverload(context, intrinsic_name, args, templates, candidates);
}
return std::move(*best);
@@ -557,11 +556,11 @@
}
}
-void ErrAmbiguousOverload(Context& context,
- std::string_view intrinsic_name,
- VectorRef<const core::type::Type*> args,
- TemplateState templates,
- VectorRef<Candidate> candidates) {
+std::string ErrAmbiguousOverload(Context& context,
+ std::string_view intrinsic_name,
+ VectorRef<const core::type::Type*> args,
+ TemplateState templates,
+ VectorRef<Candidate> candidates) {
StringStream ss;
ss << "ambiguous overload while attempting to match " << intrinsic_name;
for (size_t i = 0; i < std::numeric_limits<size_t>::max(); i++) {
@@ -592,16 +591,16 @@
}
}
TINT_ICE() << ss.str();
+ return ss.str();
}
} // namespace
-Result<Overload> LookupFn(Context& context,
- std::string_view intrinsic_name,
- size_t function_id,
- VectorRef<const core::type::Type*> args,
- EvaluationStage earliest_eval_stage,
- const Source& source) {
+Result<Overload, std::string> LookupFn(Context& context,
+ std::string_view intrinsic_name,
+ size_t function_id,
+ VectorRef<const core::type::Type*> args,
+ EvaluationStage earliest_eval_stage) {
// Generates an error when no overloads match the provided arguments
auto on_no_match = [&](VectorRef<Candidate> candidates) {
StringStream ss;
@@ -612,7 +611,7 @@
<< (candidates.Length() > 1 ? "s:" : ":") << std::endl;
PrintCandidates(ss, context, candidates, intrinsic_name);
}
- context.diags.add_error(diag::System::Intrinsics, ss.str(), source);
+ return ss.str();
};
// Resolve the intrinsic overload
@@ -620,11 +619,10 @@
earliest_eval_stage, TemplateState{}, on_no_match);
}
-Result<Overload> LookupUnary(Context& context,
- core::UnaryOp op,
- const core::type::Type* arg,
- EvaluationStage earliest_eval_stage,
- const Source& source) {
+Result<Overload, std::string> LookupUnary(Context& context,
+ core::UnaryOp op,
+ const core::type::Type* arg,
+ EvaluationStage earliest_eval_stage) {
const IntrinsicInfo* intrinsic_info = nullptr;
std::string_view intrinsic_name;
switch (op) {
@@ -636,13 +634,18 @@
intrinsic_info = &context.data.unary_minus;
intrinsic_name = "operator - ";
break;
+ case core::UnaryOp::kAddressOf:
+ intrinsic_info = &context.data.unary_and;
+ intrinsic_name = "operator & ";
+ break;
+ case core::UnaryOp::kIndirection:
+ intrinsic_info = &context.data.unary_star;
+ intrinsic_name = "operator * ";
+ break;
case core::UnaryOp::kNot:
intrinsic_info = &context.data.unary_not;
intrinsic_name = "operator ! ";
break;
- default:
- TINT_UNREACHABLE() << "invalid unary op: " << op;
- return Failure{};
}
Vector args{arg};
@@ -657,7 +660,7 @@
<< (candidates.Length() > 1 ? "s:" : ":") << std::endl;
PrintCandidates(ss, context, candidates, name);
}
- context.diags.add_error(diag::System::Intrinsics, ss.str(), source);
+ return ss.str();
};
// Resolve the intrinsic overload
@@ -665,13 +668,12 @@
TemplateState{}, on_no_match);
}
-Result<Overload> LookupBinary(Context& context,
- core::BinaryOp op,
- const core::type::Type* lhs,
- const core::type::Type* rhs,
- EvaluationStage earliest_eval_stage,
- const Source& source,
- bool is_compound) {
+Result<Overload, std::string> LookupBinary(Context& context,
+ core::BinaryOp op,
+ const core::type::Type* lhs,
+ const core::type::Type* rhs,
+ EvaluationStage earliest_eval_stage,
+ bool is_compound) {
const IntrinsicInfo* intrinsic_info = nullptr;
std::string_view intrinsic_name;
switch (op) {
@@ -761,7 +763,7 @@
<< (candidates.Length() > 1 ? "s:" : ":") << std::endl;
PrintCandidates(ss, context, candidates, name);
}
- context.diags.add_error(diag::System::Intrinsics, ss.str(), source);
+ return ss.str();
};
// Resolve the intrinsic overload
@@ -769,13 +771,12 @@
TemplateState{}, on_no_match);
}
-Result<Overload> LookupCtorConv(Context& context,
- std::string_view type_name,
- size_t type_id,
- const core::type::Type* template_arg,
- VectorRef<const core::type::Type*> args,
- EvaluationStage earliest_eval_stage,
- const Source& source) {
+Result<Overload, std::string> LookupCtorConv(Context& context,
+ std::string_view type_name,
+ size_t type_id,
+ const core::type::Type* template_arg,
+ VectorRef<const core::type::Type*> args,
+ EvaluationStage earliest_eval_stage) {
// Generates an error when no overloads match the provided arguments
auto on_no_match = [&](VectorRef<Candidate> candidates) {
StringStream ss;
@@ -801,7 +802,7 @@
<< std::endl;
PrintCandidates(ss, context, conv, type_name);
}
- context.diags.add_error(diag::System::Intrinsics, ss.str(), source);
+ return ss.str();
};
// If a template type was provided, then close the 0'th type with this.
diff --git a/src/tint/lang/core/intrinsic/table.h b/src/tint/lang/core/intrinsic/table.h
index 26dced2..32f60fc 100644
--- a/src/tint/lang/core/intrinsic/table.h
+++ b/src/tint/lang/core/intrinsic/table.h
@@ -104,8 +104,6 @@
core::type::Manager& types;
/// The symbol table
SymbolTable& symbols;
- /// The diagnostics
- diag::List& diags;
};
/// Lookup looks for the builtin overload with the given signature, raising an error diagnostic
@@ -120,14 +118,12 @@
/// only overloads with concrete argument types will be considered, as all
/// abstract-numerics will have been materialized after shader creation time
/// (EvaluationStage::kConstant).
-/// @param source the source of the builtin call
/// @return the resolved builtin function overload
-Result<Overload> LookupFn(Context& context,
- std::string_view function_name,
- size_t function_id,
- VectorRef<const core::type::Type*> args,
- EvaluationStage earliest_eval_stage,
- const Source& source);
+Result<Overload, std::string> LookupFn(Context& context,
+ std::string_view function_name,
+ size_t function_id,
+ VectorRef<const core::type::Type*> args,
+ EvaluationStage earliest_eval_stage);
/// Lookup looks for the unary op overload with the given signature, raising an error
/// diagnostic if the operator was not found.
@@ -140,13 +136,11 @@
/// `EvaluationStage::kRuntime`, then only overloads with concrete argument types
/// will be considered, as all abstract-numerics will have been materialized
/// after shader creation time (EvaluationStage::kConstant).
-/// @param source the source of the operator call
/// @return the resolved unary operator overload
-Result<Overload> LookupUnary(Context& context,
- core::UnaryOp op,
- const core::type::Type* arg,
- EvaluationStage earliest_eval_stage,
- const Source& source);
+Result<Overload, std::string> LookupUnary(Context& context,
+ core::UnaryOp op,
+ const core::type::Type* arg,
+ EvaluationStage earliest_eval_stage);
/// Lookup looks for the binary op overload with the given signature, raising an error
/// diagnostic if the operator was not found.
@@ -154,7 +148,6 @@
/// @param op the binary operator
/// @param lhs the LHS value type passed to the operator
/// @param rhs the RHS value type passed to the operator
-/// @param source the source of the operator call
/// @param earliest_eval_stage the the earliest evaluation stage that a call to
/// the binary operator can be made. This can alter the overloads considered.
/// For example, if the earliest evaluation stage is
@@ -163,13 +156,12 @@
/// after shader creation time (EvaluationStage::kConstant).
/// @param is_compound true if the binary operator is being used as a compound assignment
/// @return the resolved binary operator overload
-Result<Overload> LookupBinary(Context& context,
- core::BinaryOp op,
- const core::type::Type* lhs,
- const core::type::Type* rhs,
- EvaluationStage earliest_eval_stage,
- const Source& source,
- bool is_compound);
+Result<Overload, std::string> LookupBinary(Context& context,
+ core::BinaryOp op,
+ const core::type::Type* lhs,
+ const core::type::Type* rhs,
+ EvaluationStage earliest_eval_stage,
+ bool is_compound);
/// Lookup looks for the value constructor or conversion overload for the given CtorConv.
/// @param context the intrinsic context
@@ -183,15 +175,13 @@
/// `EvaluationStage::kRuntime`, then only overloads with concrete argument types
/// will be considered, as all abstract-numerics will have been materialized
/// after shader creation time (EvaluationStage::kConstant).
-/// @param source the source of the call
/// @return the resolved type constructor or conversion function overload
-Result<Overload> LookupCtorConv(Context& context,
- std::string_view type_name,
- size_t type_id,
- const core::type::Type* template_arg,
- VectorRef<const core::type::Type*> args,
- EvaluationStage earliest_eval_stage,
- const Source& source);
+Result<Overload, std::string> LookupCtorConv(Context& context,
+ std::string_view type_name,
+ size_t type_id,
+ const core::type::Type* template_arg,
+ VectorRef<const core::type::Type*> args,
+ EvaluationStage earliest_eval_stage);
/// Table is a wrapper around a dialect to provide type-safe interface to the intrinsic table.
template <typename DIALECT>
@@ -207,9 +197,8 @@
/// @param types The type manager
/// @param symbols The symbol table
- /// @param diags The diagnostics
- Table(core::type::Manager& types, SymbolTable& symbols, diag::List& diags)
- : context{DIALECT::kData, types, symbols, diags} {}
+ Table(core::type::Manager& types, SymbolTable& symbols)
+ : context{DIALECT::kData, types, symbols} {}
/// Lookup looks for the builtin overload with the given signature, raising an error diagnostic
/// if the builtin was not found.
@@ -221,15 +210,14 @@
/// only overloads with concrete argument types will be considered, as all
/// abstract-numerics will have been materialized after shader creation time
/// (EvaluationStage::kConstant).
- /// @param source the source of the builtin call
+
/// @return the resolved builtin function overload
- Result<Overload> Lookup(BuiltinFn builtin_fn,
- VectorRef<const core::type::Type*> args,
- EvaluationStage earliest_eval_stage,
- const Source& source) {
+ Result<Overload, std::string> Lookup(BuiltinFn builtin_fn,
+ VectorRef<const core::type::Type*> args,
+ EvaluationStage earliest_eval_stage) {
std::string_view name = DIALECT::ToString(builtin_fn);
size_t id = static_cast<size_t>(builtin_fn);
- return LookupFn(context, name, id, std::move(args), earliest_eval_stage, source);
+ return LookupFn(context, name, id, std::move(args), earliest_eval_stage);
}
/// Lookup looks for the unary op overload with the given signature, raising an error
@@ -242,13 +230,12 @@
/// `EvaluationStage::kRuntime`, then only overloads with concrete argument types
/// will be considered, as all abstract-numerics will have been materialized
/// after shader creation time (EvaluationStage::kConstant).
- /// @param source the source of the operator call
+
/// @return the resolved unary operator overload
- Result<Overload> Lookup(core::UnaryOp op,
- const core::type::Type* arg,
- EvaluationStage earliest_eval_stage,
- const Source& source) {
- return LookupUnary(context, op, arg, earliest_eval_stage, source);
+ Result<Overload, std::string> Lookup(core::UnaryOp op,
+ const core::type::Type* arg,
+ EvaluationStage earliest_eval_stage) {
+ return LookupUnary(context, op, arg, earliest_eval_stage);
}
/// Lookup looks for the binary op overload with the given signature, raising an error
@@ -256,22 +243,21 @@
/// @param op the binary operator
/// @param lhs the LHS value type passed to the operator
/// @param rhs the RHS value type passed to the operator
- /// @param source the source of the operator call
/// @param earliest_eval_stage the the earliest evaluation stage that a call to
/// the binary operator can be made. This can alter the overloads considered.
/// For example, if the earliest evaluation stage is
/// `EvaluationStage::kRuntime`, then only overloads with concrete argument types
/// will be considered, as all abstract-numerics will have been materialized
/// after shader creation time (EvaluationStage::kConstant).
+
/// @param is_compound true if the binary operator is being used as a compound assignment
/// @return the resolved binary operator overload
- Result<Overload> Lookup(core::BinaryOp op,
- const core::type::Type* lhs,
- const core::type::Type* rhs,
- EvaluationStage earliest_eval_stage,
- const Source& source,
- bool is_compound) {
- return LookupBinary(context, op, lhs, rhs, earliest_eval_stage, source, is_compound);
+ Result<Overload, std::string> Lookup(core::BinaryOp op,
+ const core::type::Type* lhs,
+ const core::type::Type* rhs,
+ EvaluationStage earliest_eval_stage,
+ bool is_compound) {
+ return LookupBinary(context, op, lhs, rhs, earliest_eval_stage, is_compound);
}
/// Lookup looks for the value constructor or conversion overload for the given CtorConv.
@@ -284,17 +270,16 @@
/// `EvaluationStage::kRuntime`, then only overloads with concrete argument types
/// will be considered, as all abstract-numerics will have been materialized
/// after shader creation time (EvaluationStage::kConstant).
- /// @param source the source of the call
+
/// @return the resolved type constructor or conversion function overload
- Result<Overload> Lookup(CtorConv type,
- const core::type::Type* template_arg,
- VectorRef<const core::type::Type*> args,
- EvaluationStage earliest_eval_stage,
- const Source& source) {
+ Result<Overload, std::string> Lookup(CtorConv type,
+ const core::type::Type* template_arg,
+ VectorRef<const core::type::Type*> args,
+ EvaluationStage earliest_eval_stage) {
std::string_view name = DIALECT::ToString(type);
size_t id = static_cast<size_t>(type);
- return LookupCtorConv(context, name, id, template_arg, std::move(args), earliest_eval_stage,
- source);
+ return LookupCtorConv(context, name, id, template_arg, std::move(args),
+ earliest_eval_stage);
}
/// The intrinsic context
diff --git a/src/tint/lang/core/intrinsic/table_data.h b/src/tint/lang/core/intrinsic/table_data.h
index ff3797c..a964ee4 100644
--- a/src/tint/lang/core/intrinsic/table_data.h
+++ b/src/tint/lang/core/intrinsic/table_data.h
@@ -615,6 +615,10 @@
const IntrinsicInfo& unary_complement;
/// The IntrinsicInfo for the unary operator 'minus'
const IntrinsicInfo& unary_minus;
+ /// The IntrinsicInfo for the unary operator 'star'
+ const IntrinsicInfo& unary_star;
+ /// The IntrinsicInfo for the unary operator 'and'
+ const IntrinsicInfo& unary_and;
};
const core::type::Type* MatchState::Type(const core::type::Type* ty) {
diff --git a/src/tint/lang/core/intrinsic/table_test.cc b/src/tint/lang/core/intrinsic/table_test.cc
index d76c548..26777e7 100644
--- a/src/tint/lang/core/intrinsic/table_test.cc
+++ b/src/tint/lang/core/intrinsic/table_test.cc
@@ -63,15 +63,13 @@
class IntrinsicTableTest : public testing::Test, public ProgramBuilder {
public:
- Table<Dialect> table{Types(), Symbols(), Diagnostics()};
+ Table<Dialect> table{Types(), Symbols()};
};
TEST_F(IntrinsicTableTest, MatchF32) {
auto* f32 = create<core::type::F32>();
- auto result =
- table.Lookup(core::BuiltinFn::kCos, Vector{f32}, EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result = table.Lookup(core::BuiltinFn::kCos, Vector{f32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, f32);
ASSERT_EQ(result->parameters.Length(), 1u);
EXPECT_EQ(result->parameters[0].type, f32);
@@ -79,20 +77,18 @@
TEST_F(IntrinsicTableTest, MismatchF32) {
auto* i32 = create<core::type::I32>();
- auto result =
- table.Lookup(core::BuiltinFn::kCos, Vector{i32}, EvaluationStage::kConstant, Source{});
+ auto result = table.Lookup(core::BuiltinFn::kCos, Vector{i32}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchU32) {
auto* f32 = create<core::type::F32>();
auto* u32 = create<core::type::U32>();
auto* vec2_f32 = create<core::type::Vector>(f32, 2u);
- auto result = table.Lookup(core::BuiltinFn::kUnpack2X16Float, Vector{u32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kUnpack2X16Float, Vector{u32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec2_f32);
ASSERT_EQ(result->parameters.Length(), 1u);
EXPECT_EQ(result->parameters[0].type, u32);
@@ -100,10 +96,10 @@
TEST_F(IntrinsicTableTest, MismatchU32) {
auto* f32 = create<core::type::F32>();
- auto result = table.Lookup(core::BuiltinFn::kUnpack2X16Float, Vector{f32},
- EvaluationStage::kConstant, Source{});
+ auto result =
+ table.Lookup(core::BuiltinFn::kUnpack2X16Float, Vector{f32}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchI32) {
@@ -112,9 +108,8 @@
auto* vec4_f32 = create<core::type::Vector>(f32, 4u);
auto* tex = create<core::type::SampledTexture>(core::type::TextureDimension::k1d, f32);
auto result = table.Lookup(core::BuiltinFn::kTextureLoad, Vector{tex, i32, i32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec4_f32);
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, tex);
@@ -128,18 +123,17 @@
TEST_F(IntrinsicTableTest, MismatchI32) {
auto* f32 = create<core::type::F32>();
auto* tex = create<core::type::SampledTexture>(core::type::TextureDimension::k1d, f32);
- auto result = table.Lookup(core::BuiltinFn::kTextureLoad, Vector{tex, f32},
- EvaluationStage::kConstant, Source{});
+ auto result =
+ table.Lookup(core::BuiltinFn::kTextureLoad, Vector{tex, f32}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchIU32AsI32) {
auto* i32 = create<core::type::I32>();
- auto result = table.Lookup(core::BuiltinFn::kCountOneBits, Vector{i32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kCountOneBits, Vector{i32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, i32);
ASSERT_EQ(result->parameters.Length(), 1u);
EXPECT_EQ(result->parameters[0].type, i32);
@@ -147,10 +141,9 @@
TEST_F(IntrinsicTableTest, MatchIU32AsU32) {
auto* u32 = create<core::type::U32>();
- auto result = table.Lookup(core::BuiltinFn::kCountOneBits, Vector{u32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kCountOneBits, Vector{u32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, u32);
ASSERT_EQ(result->parameters.Length(), 1u);
EXPECT_EQ(result->parameters[0].type, u32);
@@ -158,18 +151,17 @@
TEST_F(IntrinsicTableTest, MismatchIU32) {
auto* f32 = create<core::type::F32>();
- auto result = table.Lookup(core::BuiltinFn::kCountOneBits, Vector{f32},
- EvaluationStage::kConstant, Source{});
+ auto result =
+ table.Lookup(core::BuiltinFn::kCountOneBits, Vector{f32}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchFIU32AsI32) {
auto* i32 = create<core::type::I32>();
- auto result = table.Lookup(core::BuiltinFn::kClamp, Vector{i32, i32, i32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kClamp, Vector{i32, i32, i32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, i32);
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, i32);
@@ -179,10 +171,9 @@
TEST_F(IntrinsicTableTest, MatchFIU32AsU32) {
auto* u32 = create<core::type::U32>();
- auto result = table.Lookup(core::BuiltinFn::kClamp, Vector{u32, u32, u32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kClamp, Vector{u32, u32, u32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, u32);
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, u32);
@@ -192,10 +183,9 @@
TEST_F(IntrinsicTableTest, MatchFIU32AsF32) {
auto* f32 = create<core::type::F32>();
- auto result = table.Lookup(core::BuiltinFn::kClamp, Vector{f32, f32, f32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kClamp, Vector{f32, f32, f32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, f32);
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, f32);
@@ -206,18 +196,17 @@
TEST_F(IntrinsicTableTest, MismatchFIU32) {
auto* bool_ = create<core::type::Bool>();
auto result = table.Lookup(core::BuiltinFn::kClamp, Vector{bool_, bool_, bool_},
- EvaluationStage::kConstant, Source{});
+ EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchBool) {
auto* f32 = create<core::type::F32>();
auto* bool_ = create<core::type::Bool>();
- auto result = table.Lookup(core::BuiltinFn::kSelect, Vector{f32, f32, bool_},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kSelect, Vector{f32, f32, bool_}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, f32);
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, f32);
@@ -227,10 +216,10 @@
TEST_F(IntrinsicTableTest, MismatchBool) {
auto* f32 = create<core::type::F32>();
- auto result = table.Lookup(core::BuiltinFn::kSelect, Vector{f32, f32, f32},
- EvaluationStage::kConstant, Source{});
+ auto result =
+ table.Lookup(core::BuiltinFn::kSelect, Vector{f32, f32, f32}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchPointer) {
@@ -238,10 +227,9 @@
auto* atomicI32 = create<core::type::Atomic>(i32);
auto* ptr = create<core::type::Pointer>(core::AddressSpace::kWorkgroup, atomicI32,
core::Access::kReadWrite);
- auto result = table.Lookup(core::BuiltinFn::kAtomicLoad, Vector{ptr},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kAtomicLoad, Vector{ptr}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, i32);
ASSERT_EQ(result->parameters.Length(), 1u);
EXPECT_EQ(result->parameters[0].type, ptr);
@@ -250,10 +238,10 @@
TEST_F(IntrinsicTableTest, MismatchPointer) {
auto* i32 = create<core::type::I32>();
auto* atomicI32 = create<core::type::Atomic>(i32);
- auto result = table.Lookup(core::BuiltinFn::kAtomicLoad, Vector{atomicI32},
- EvaluationStage::kConstant, Source{});
+ auto result =
+ table.Lookup(core::BuiltinFn::kAtomicLoad, Vector{atomicI32}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchArray) {
@@ -261,10 +249,9 @@
create<core::type::RuntimeArrayCount>(), 4u, 4u, 4u, 4u);
auto* arr_ptr =
create<core::type::Pointer>(core::AddressSpace::kStorage, arr, core::Access::kReadWrite);
- auto result = table.Lookup(core::BuiltinFn::kArrayLength, Vector{arr_ptr},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kArrayLength, Vector{arr_ptr}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_TRUE(result->return_type->Is<core::type::U32>());
ASSERT_EQ(result->parameters.Length(), 1u);
auto* param_type = result->parameters[0].type;
@@ -274,10 +261,10 @@
TEST_F(IntrinsicTableTest, MismatchArray) {
auto* f32 = create<core::type::F32>();
- auto result = table.Lookup(core::BuiltinFn::kArrayLength, Vector{f32},
- EvaluationStage::kConstant, Source{});
+ auto result =
+ table.Lookup(core::BuiltinFn::kArrayLength, Vector{f32}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchSampler) {
@@ -287,9 +274,8 @@
auto* tex = create<core::type::SampledTexture>(core::type::TextureDimension::k2d, f32);
auto* sampler = create<core::type::Sampler>(core::type::SamplerKind::kSampler);
auto result = table.Lookup(core::BuiltinFn::kTextureSample, Vector{tex, sampler, vec2_f32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec4_f32);
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, tex);
@@ -305,9 +291,9 @@
auto* vec2_f32 = create<core::type::Vector>(f32, 2u);
auto* tex = create<core::type::SampledTexture>(core::type::TextureDimension::k2d, f32);
auto result = table.Lookup(core::BuiltinFn::kTextureSample, Vector{tex, f32, vec2_f32},
- EvaluationStage::kConstant, Source{});
+ EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchSampledTexture) {
@@ -317,9 +303,8 @@
auto* vec4_f32 = create<core::type::Vector>(f32, 4u);
auto* tex = create<core::type::SampledTexture>(core::type::TextureDimension::k2d, f32);
auto result = table.Lookup(core::BuiltinFn::kTextureLoad, Vector{tex, vec2_i32, i32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec4_f32);
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, tex);
@@ -337,9 +322,8 @@
auto* vec4_f32 = create<core::type::Vector>(f32, 4u);
auto* tex = create<core::type::MultisampledTexture>(core::type::TextureDimension::k2d, f32);
auto result = table.Lookup(core::BuiltinFn::kTextureLoad, Vector{tex, vec2_i32, i32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec4_f32);
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, tex);
@@ -356,9 +340,8 @@
auto* vec2_i32 = create<core::type::Vector>(i32, 2u);
auto* tex = create<core::type::DepthTexture>(core::type::TextureDimension::k2d);
auto result = table.Lookup(core::BuiltinFn::kTextureLoad, Vector{tex, vec2_i32, i32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, f32);
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, tex);
@@ -375,9 +358,8 @@
auto* vec2_i32 = create<core::type::Vector>(i32, 2u);
auto* tex = create<core::type::DepthMultisampledTexture>(core::type::TextureDimension::k2d);
auto result = table.Lookup(core::BuiltinFn::kTextureLoad, Vector{tex, vec2_i32, i32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, f32);
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, tex);
@@ -395,9 +377,8 @@
auto* vec4_f32 = create<core::type::Vector>(f32, 4u);
auto* tex = create<core::type::ExternalTexture>();
auto result = table.Lookup(core::BuiltinFn::kTextureLoad, Vector{tex, vec2_i32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec4_f32);
ASSERT_EQ(result->parameters.Length(), 2u);
EXPECT_EQ(result->parameters[0].type, tex);
@@ -417,9 +398,8 @@
core::Access::kWrite, subtype);
auto result = table.Lookup(core::BuiltinFn::kTextureStore, Vector{tex, vec2_i32, vec4_f32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_TRUE(result->return_type->Is<type::Void>());
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, tex);
@@ -435,17 +415,16 @@
auto* i32 = create<core::type::I32>();
auto* vec2_i32 = create<core::type::Vector>(i32, 2u);
auto result = table.Lookup(core::BuiltinFn::kTextureLoad, Vector{f32, vec2_i32},
- EvaluationStage::kConstant, Source{});
+ EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchTemplateType) {
auto* f32 = create<core::type::F32>();
- auto result = table.Lookup(core::BuiltinFn::kClamp, Vector{f32, f32, f32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kClamp, Vector{f32, f32, f32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, f32);
EXPECT_EQ(result->parameters[0].type, f32);
EXPECT_EQ(result->parameters[1].type, f32);
@@ -455,19 +434,18 @@
TEST_F(IntrinsicTableTest, MismatchTemplateType) {
auto* f32 = create<core::type::F32>();
auto* u32 = create<core::type::U32>();
- auto result = table.Lookup(core::BuiltinFn::kClamp, Vector{f32, u32, f32},
- EvaluationStage::kConstant, Source{});
+ auto result =
+ table.Lookup(core::BuiltinFn::kClamp, Vector{f32, u32, f32}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchOpenSizeVector) {
auto* f32 = create<core::type::F32>();
auto* vec2_f32 = create<core::type::Vector>(f32, 2u);
auto result = table.Lookup(core::BuiltinFn::kClamp, Vector{vec2_f32, vec2_f32, vec2_f32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec2_f32);
ASSERT_EQ(result->parameters.Length(), 3u);
EXPECT_EQ(result->parameters[0].type, vec2_f32);
@@ -480,19 +458,18 @@
auto* u32 = create<core::type::U32>();
auto* vec2_f32 = create<core::type::Vector>(f32, 2u);
auto result = table.Lookup(core::BuiltinFn::kClamp, Vector{vec2_f32, u32, vec2_f32},
- EvaluationStage::kConstant, Source{});
+ EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchOpenSizeMatrix) {
auto* f32 = create<core::type::F32>();
auto* vec3_f32 = create<core::type::Vector>(f32, 3u);
auto* mat3_f32 = create<core::type::Matrix>(vec3_f32, 3u);
- auto result = table.Lookup(core::BuiltinFn::kDeterminant, Vector{mat3_f32},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kDeterminant, Vector{mat3_f32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, f32);
ASSERT_EQ(result->parameters.Length(), 1u);
EXPECT_EQ(result->parameters[0].type, mat3_f32);
@@ -502,19 +479,18 @@
auto* f32 = create<core::type::F32>();
auto* vec2_f32 = create<core::type::Vector>(f32, 2u);
auto* mat3x2_f32 = create<core::type::Matrix>(vec2_f32, 3u);
- auto result = table.Lookup(core::BuiltinFn::kDeterminant, Vector{mat3x2_f32},
- EvaluationStage::kConstant, Source{});
+ auto result =
+ table.Lookup(core::BuiltinFn::kDeterminant, Vector{mat3x2_f32}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, MatchDifferentArgsElementType_Builtin_ConstantEval) {
auto* af = create<core::type::AbstractFloat>();
auto* bool_ = create<core::type::Bool>();
- auto result = table.Lookup(core::BuiltinFn::kSelect, Vector{af, af, bool_},
- EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ auto result =
+ table.Lookup(core::BuiltinFn::kSelect, Vector{af, af, bool_}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_NE(result->const_eval_fn, nullptr);
EXPECT_EQ(result->return_type, af);
ASSERT_EQ(result->parameters.Length(), 3u);
@@ -526,9 +502,8 @@
TEST_F(IntrinsicTableTest, MatchDifferentArgsElementType_Builtin_RuntimeEval) {
auto* af = create<core::type::AbstractFloat>();
auto result = table.Lookup(core::BuiltinFn::kSelect, Vector{af, af, create<core::type::Bool>()},
- EvaluationStage::kRuntime, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
+ EvaluationStage::kRuntime);
+ ASSERT_EQ(result, Success);
EXPECT_NE(result->const_eval_fn, nullptr);
EXPECT_TRUE(result->return_type->Is<core::type::F32>());
ASSERT_EQ(result->parameters.Length(), 3u);
@@ -540,11 +515,10 @@
TEST_F(IntrinsicTableTest, MatchDifferentArgsElementType_Binary_ConstantEval) {
auto* ai = create<core::type::AbstractInt>();
auto* u32 = create<core::type::U32>();
- auto result = table.Lookup(core::BinaryOp::kShiftLeft, ai, u32, EvaluationStage::kConstant,
- Source{}, false);
- ASSERT_EQ(result, Success) << Diagnostics();
+ auto result =
+ table.Lookup(core::BinaryOp::kShiftLeft, ai, u32, EvaluationStage::kConstant, false);
+ ASSERT_EQ(result, Success);
ASSERT_NE(result->const_eval_fn, nullptr) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
EXPECT_EQ(result->return_type, ai);
EXPECT_EQ(result->parameters[0].type, ai);
EXPECT_EQ(result->parameters[1].type, u32);
@@ -553,11 +527,10 @@
TEST_F(IntrinsicTableTest, MatchDifferentArgsElementType_Binary_RuntimeEval) {
auto* ai = create<core::type::AbstractInt>();
auto* u32 = create<core::type::U32>();
- auto result = table.Lookup(core::BinaryOp::kShiftLeft, ai, u32, EvaluationStage::kRuntime,
- Source{}, false);
- ASSERT_EQ(result, Success) << Diagnostics();
+ auto result =
+ table.Lookup(core::BinaryOp::kShiftLeft, ai, u32, EvaluationStage::kRuntime, false);
+ ASSERT_EQ(result, Success);
ASSERT_NE(result->const_eval_fn, nullptr) << Diagnostics();
- ASSERT_EQ(Diagnostics().str(), "");
EXPECT_TRUE(result->return_type->Is<core::type::I32>());
EXPECT_TRUE(result->parameters[0].type->Is<core::type::I32>());
EXPECT_TRUE(result->parameters[1].type->Is<core::type::U32>());
@@ -568,10 +541,10 @@
// come first
auto* bool_ = create<core::type::Bool>();
auto result = table.Lookup(core::BuiltinFn::kTextureDimensions, Vector{bool_, bool_},
- EvaluationStage::kConstant, Source{});
+ EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_EQ(Diagnostics().str(),
- R"(error: no matching call to textureDimensions(bool, bool)
+ ASSERT_EQ(result.Failure(),
+ R"(no matching call to textureDimensions(bool, bool)
27 candidate functions:
textureDimensions(texture: texture_1d<T>, level: L) -> u32 where: T is f32, i32 or u32, L is i32 or u32
@@ -608,10 +581,10 @@
auto* tex = create<core::type::DepthTexture>(core::type::TextureDimension::k2d);
auto* bool_ = create<core::type::Bool>();
auto result = table.Lookup(core::BuiltinFn::kTextureDimensions, Vector{tex, bool_},
- EvaluationStage::kConstant, Source{});
+ EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_EQ(Diagnostics().str(),
- R"(error: no matching call to textureDimensions(texture_depth_2d, bool)
+ ASSERT_EQ(result.Failure(),
+ R"(no matching call to textureDimensions(texture_depth_2d, bool)
27 candidate functions:
textureDimensions(texture: texture_depth_2d, level: L) -> vec2<u32> where: L is i32 or u32
@@ -647,18 +620,16 @@
TEST_F(IntrinsicTableTest, MatchUnaryOp) {
auto* i32 = create<core::type::I32>();
auto* vec3_i32 = create<core::type::Vector>(i32, 3u);
- auto result = table.Lookup(core::UnaryOp::kNegation, vec3_i32, EvaluationStage::kConstant,
- Source{{12, 34}});
+ auto result = table.Lookup(core::UnaryOp::kNegation, vec3_i32, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec3_i32);
- EXPECT_EQ(Diagnostics().str(), "");
}
TEST_F(IntrinsicTableTest, MismatchUnaryOp) {
auto* bool_ = create<core::type::Bool>();
- auto result =
- table.Lookup(core::UnaryOp::kNegation, bool_, EvaluationStage::kConstant, Source{{12, 34}});
+ auto result = table.Lookup(core::UnaryOp::kNegation, bool_, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- EXPECT_EQ(Diagnostics().str(), R"(12:34 error: no matching overload for operator - (bool)
+ EXPECT_EQ(result.Failure(), R"(no matching overload for operator - (bool)
2 candidate operators:
operator - (T) -> T where: T is abstract-float, abstract-int, f32, i32 or f16
@@ -668,41 +639,37 @@
TEST_F(IntrinsicTableTest, MatchUnaryOp_Constant) {
auto* ai = create<core::type::AbstractInt>();
- auto result =
- table.Lookup(core::UnaryOp::kNegation, ai, EvaluationStage::kConstant, Source{{12, 34}});
+ auto result = table.Lookup(core::UnaryOp::kNegation, ai, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, ai);
- EXPECT_EQ(Diagnostics().str(), "");
}
TEST_F(IntrinsicTableTest, MatchUnaryOp_Runtime) {
auto* ai = create<core::type::AbstractInt>();
- auto result =
- table.Lookup(core::UnaryOp::kNegation, ai, EvaluationStage::kRuntime, Source{{12, 34}});
+ auto result = table.Lookup(core::UnaryOp::kNegation, ai, EvaluationStage::kRuntime);
+ ASSERT_EQ(result, Success);
EXPECT_NE(result->return_type, ai);
EXPECT_TRUE(result->return_type->Is<core::type::I32>());
- EXPECT_EQ(Diagnostics().str(), "");
}
TEST_F(IntrinsicTableTest, MatchBinaryOp) {
auto* i32 = create<core::type::I32>();
auto* vec3_i32 = create<core::type::Vector>(i32, 3u);
auto result = table.Lookup(core::BinaryOp::kMultiply, i32, vec3_i32, EvaluationStage::kConstant,
- Source{{12, 34}},
/* is_compound */ false);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec3_i32);
EXPECT_EQ(result->parameters[0].type, i32);
EXPECT_EQ(result->parameters[1].type, vec3_i32);
- EXPECT_EQ(Diagnostics().str(), "");
}
TEST_F(IntrinsicTableTest, MismatchBinaryOp) {
auto* f32 = create<core::type::F32>();
auto* bool_ = create<core::type::Bool>();
auto result = table.Lookup(core::BinaryOp::kMultiply, f32, bool_, EvaluationStage::kConstant,
- Source{{12, 34}},
/* is_compound */ false);
ASSERT_NE(result, Success);
- EXPECT_EQ(Diagnostics().str(), R"(12:34 error: no matching overload for operator * (f32, bool)
+ EXPECT_EQ(result.Failure(), R"(no matching overload for operator * (f32, bool)
9 candidate operators:
operator * (T, T) -> T where: T is abstract-float, abstract-int, f32, i32, u32 or f16
@@ -721,22 +688,20 @@
auto* i32 = create<core::type::I32>();
auto* vec3_i32 = create<core::type::Vector>(i32, 3u);
auto result = table.Lookup(core::BinaryOp::kMultiply, i32, vec3_i32, EvaluationStage::kConstant,
- Source{{12, 34}},
/* is_compound */ true);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec3_i32);
EXPECT_EQ(result->parameters[0].type, i32);
EXPECT_EQ(result->parameters[1].type, vec3_i32);
- EXPECT_EQ(Diagnostics().str(), "");
}
TEST_F(IntrinsicTableTest, MismatchCompoundOp) {
auto* f32 = create<core::type::F32>();
auto* bool_ = create<core::type::Bool>();
auto result = table.Lookup(core::BinaryOp::kMultiply, f32, bool_, EvaluationStage::kConstant,
- Source{{12, 34}},
/* is_compound */ true);
ASSERT_NE(result, Success);
- EXPECT_EQ(Diagnostics().str(), R"(12:34 error: no matching overload for operator *= (f32, bool)
+ EXPECT_EQ(result.Failure(), R"(no matching overload for operator *= (f32, bool)
9 candidate operators:
operator *= (T, T) -> T where: T is abstract-float, abstract-int, f32, i32, u32 or f16
@@ -754,9 +719,9 @@
TEST_F(IntrinsicTableTest, MatchTypeInitializerImplicit) {
auto* i32 = create<core::type::I32>();
auto* vec3_i32 = create<core::type::Vector>(i32, 3u);
- auto result = table.Lookup(CtorConv::kVec3, nullptr, Vector{i32, i32, i32},
- EvaluationStage::kConstant, Source{{12, 34}});
- ASSERT_EQ(result, Success) << Diagnostics();
+ auto result =
+ table.Lookup(CtorConv::kVec3, nullptr, Vector{i32, i32, i32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec3_i32);
EXPECT_TRUE(result->info->flags.Contains(OverloadFlag::kIsConstructor));
ASSERT_EQ(result->parameters.Length(), 3u);
@@ -769,9 +734,9 @@
TEST_F(IntrinsicTableTest, MatchTypeInitializerExplicit) {
auto* i32 = create<core::type::I32>();
auto* vec3_i32 = create<core::type::Vector>(i32, 3u);
- auto result = table.Lookup(CtorConv::kVec3, i32, Vector{i32, i32, i32},
- EvaluationStage::kConstant, Source{{12, 34}});
- ASSERT_EQ(result, Success) << Diagnostics();
+ auto result =
+ table.Lookup(CtorConv::kVec3, i32, Vector{i32, i32, i32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec3_i32);
EXPECT_TRUE(result->info->flags.Contains(OverloadFlag::kIsConstructor));
ASSERT_EQ(result->parameters.Length(), 3u);
@@ -784,11 +749,11 @@
TEST_F(IntrinsicTableTest, MismatchTypeInitializerImplicit) {
auto* i32 = create<core::type::I32>();
auto* f32 = create<core::type::F32>();
- auto result = table.Lookup(CtorConv::kVec3, nullptr, Vector{i32, f32, i32},
- EvaluationStage::kConstant, Source{{12, 34}});
+ auto result =
+ table.Lookup(CtorConv::kVec3, nullptr, Vector{i32, f32, i32}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- EXPECT_EQ(Diagnostics().str(),
- R"(12:34 error: no matching constructor for vec3(i32, f32, i32)
+ EXPECT_EQ(result.Failure(),
+ R"(no matching constructor for vec3(i32, f32, i32)
7 candidate constructors:
vec3(x: T, y: T, z: T) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
@@ -811,11 +776,11 @@
TEST_F(IntrinsicTableTest, MismatchTypeInitializerExplicit) {
auto* i32 = create<core::type::I32>();
auto* f32 = create<core::type::F32>();
- auto result = table.Lookup(CtorConv::kVec3, i32, Vector{i32, f32, i32},
- EvaluationStage::kConstant, Source{{12, 34}});
+ auto result =
+ table.Lookup(CtorConv::kVec3, i32, Vector{i32, f32, i32}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- EXPECT_EQ(Diagnostics().str(),
- R"(12:34 error: no matching constructor for vec3<i32>(i32, f32, i32)
+ EXPECT_EQ(result.Failure(),
+ R"(no matching constructor for vec3<i32>(i32, f32, i32)
7 candidate constructors:
vec3(x: T, y: T, z: T) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
@@ -838,9 +803,9 @@
TEST_F(IntrinsicTableTest, MatchTypeInitializerImplicitVecFromVecAbstract) {
auto* ai = create<core::type::AbstractInt>();
auto* vec3_ai = create<core::type::Vector>(ai, 3u);
- auto result = table.Lookup(CtorConv::kVec3, nullptr, Vector{vec3_ai},
- EvaluationStage::kConstant, Source{{12, 34}});
- ASSERT_EQ(result, Success) << Diagnostics();
+ auto result =
+ table.Lookup(CtorConv::kVec3, nullptr, Vector{vec3_ai}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec3_ai);
EXPECT_TRUE(result->info->flags.Contains(OverloadFlag::kIsConstructor));
ASSERT_EQ(result->parameters.Length(), 1u);
@@ -854,8 +819,8 @@
auto* vec2_af = create<core::type::Vector>(af, 2u);
auto* mat2x2_af = create<core::type::Matrix>(vec2_af, 2u);
auto result = table.Lookup(CtorConv::kMat2x2, nullptr, Vector{vec2_ai, vec2_ai},
- EvaluationStage::kConstant, Source{{12, 34}});
- ASSERT_EQ(result, Success) << Diagnostics();
+ EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_TYPE(result->return_type, mat2x2_af);
EXPECT_TRUE(result->info->flags.Contains(OverloadFlag::kIsConstructor));
ASSERT_EQ(result->parameters.Length(), 2u);
@@ -867,9 +832,9 @@
TEST_F(IntrinsicTableTest, MatchTypeInitializer_ConstantEval) {
auto* ai = create<core::type::AbstractInt>();
auto* vec3_ai = create<core::type::Vector>(ai, 3u);
- auto result = table.Lookup(CtorConv::kVec3, nullptr, Vector{ai, ai, ai},
- EvaluationStage::kConstant, Source{{12, 34}});
- ASSERT_EQ(result, Success) << Diagnostics();
+ auto result =
+ table.Lookup(CtorConv::kVec3, nullptr, Vector{ai, ai, ai}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_NE(result->const_eval_fn, nullptr);
EXPECT_EQ(result->return_type, vec3_ai);
EXPECT_TRUE(result->info->flags.Contains(OverloadFlag::kIsConstructor));
@@ -882,11 +847,11 @@
TEST_F(IntrinsicTableTest, MatchTypeInitializer_RuntimeEval) {
auto* ai = create<core::type::AbstractInt>();
- auto result = table.Lookup(CtorConv::kVec3, nullptr, Vector{ai, ai, ai},
- EvaluationStage::kRuntime, Source{{12, 34}});
+ auto result =
+ table.Lookup(CtorConv::kVec3, nullptr, Vector{ai, ai, ai}, EvaluationStage::kRuntime);
auto* i32 = create<type::I32>();
auto* vec3_i32 = create<type::Vector>(i32, 3u);
- ASSERT_EQ(result, Success) << Diagnostics();
+ ASSERT_EQ(result, Success);
EXPECT_NE(result->const_eval_fn, nullptr);
EXPECT_EQ(result->return_type, vec3_i32);
EXPECT_TRUE(result->info->flags.Contains(OverloadFlag::kIsConstructor));
@@ -902,9 +867,8 @@
auto* vec3_i32 = create<core::type::Vector>(i32, 3u);
auto* f32 = create<core::type::F32>();
auto* vec3_f32 = create<core::type::Vector>(f32, 3u);
- auto result = table.Lookup(CtorConv::kVec3, i32, Vector{vec3_f32}, EvaluationStage::kConstant,
- Source{{12, 34}});
- ASSERT_EQ(result, Success) << Diagnostics();
+ auto result = table.Lookup(CtorConv::kVec3, i32, Vector{vec3_f32}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, vec3_i32);
EXPECT_FALSE(result->info->flags.Contains(OverloadFlag::kIsConstructor));
ASSERT_EQ(result->parameters.Length(), 1u);
@@ -915,11 +879,10 @@
auto* arr = create<core::type::Array>(create<core::type::U32>(),
create<core::type::RuntimeArrayCount>(), 4u, 4u, 4u, 4u);
auto* f32 = create<core::type::F32>();
- auto result = table.Lookup(CtorConv::kVec3, f32, Vector{arr}, EvaluationStage::kConstant,
- Source{{12, 34}});
+ auto result = table.Lookup(CtorConv::kVec3, f32, Vector{arr}, EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- EXPECT_EQ(Diagnostics().str(),
- R"(12:34 error: no matching constructor for vec3<f32>(array<u32>)
+ EXPECT_EQ(result.Failure(),
+ R"(no matching constructor for vec3<f32>(array<u32>)
7 candidate constructors:
vec3(vec3<T>) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
@@ -945,9 +908,8 @@
auto* vec3_ai = create<core::type::Vector>(ai, 3u);
auto* f32 = create<core::type::F32>();
auto* vec3_f32 = create<core::type::Vector>(f32, 3u);
- auto result = table.Lookup(CtorConv::kVec3, af, Vector{vec3_ai}, EvaluationStage::kConstant,
- Source{{12, 34}});
- ASSERT_EQ(result, Success) << Diagnostics();
+ auto result = table.Lookup(CtorConv::kVec3, af, Vector{vec3_ai}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_NE(result->const_eval_fn, nullptr);
// NOTE: Conversions are explicit, so there's no way to have it return abstracts
EXPECT_EQ(result->return_type, vec3_f32);
@@ -962,9 +924,8 @@
auto* vec3_ai = create<core::type::Vector>(ai, 3u);
auto* vec3_f32 = create<core::type::Vector>(create<core::type::F32>(), 3u);
auto* vec3_i32 = create<core::type::Vector>(create<core::type::I32>(), 3u);
- auto result = table.Lookup(CtorConv::kVec3, af, Vector{vec3_ai}, EvaluationStage::kRuntime,
- Source{{12, 34}});
- ASSERT_EQ(result, Success) << Diagnostics();
+ auto result = table.Lookup(CtorConv::kVec3, af, Vector{vec3_ai}, EvaluationStage::kRuntime);
+ ASSERT_EQ(result, Success);
EXPECT_NE(result->const_eval_fn, nullptr);
EXPECT_EQ(result->return_type, vec3_f32);
EXPECT_FALSE(result->info->flags.Contains(OverloadFlag::kIsConstructor));
@@ -976,10 +937,10 @@
auto* f32 = create<core::type::F32>();
Vector<const core::type::Type*, 0> arg_tys;
arg_tys.Resize(257, f32);
- auto result = table.Lookup(core::BuiltinFn::kAbs, std::move(arg_tys),
- EvaluationStage::kConstant, Source{});
+ auto result =
+ table.Lookup(core::BuiltinFn::kAbs, std::move(arg_tys), EvaluationStage::kConstant);
ASSERT_NE(result, Success);
- ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
+ ASSERT_THAT(result.Failure(), HasSubstr("no matching call"));
}
TEST_F(IntrinsicTableTest, OverloadResolution) {
@@ -989,9 +950,8 @@
// The first should win overload resolution.
auto* ai = create<core::type::AbstractInt>();
auto* i32 = create<core::type::I32>();
- auto result =
- table.Lookup(CtorConv::kI32, nullptr, Vector{ai}, EvaluationStage::kConstant, Source{});
- ASSERT_EQ(result, Success) << Diagnostics();
+ auto result = table.Lookup(CtorConv::kI32, nullptr, Vector{ai}, EvaluationStage::kConstant);
+ ASSERT_EQ(result, Success);
EXPECT_EQ(result->return_type, i32);
EXPECT_EQ(result->parameters.Length(), 1u);
EXPECT_EQ(result->parameters[0].type, ai);
@@ -1026,14 +986,13 @@
};
struct IntrinsicTableAbstractBinaryTest : public resolver::ResolverTestWithParam<Case> {
- Table<Dialect> table{Types(), Symbols(), Diagnostics()};
+ Table<Dialect> table{Types(), Symbols()};
};
TEST_P(IntrinsicTableAbstractBinaryTest, MatchAdd) {
auto* arg_lhs = GetParam().arg_lhs(*this);
auto* arg_rhs = GetParam().arg_rhs(*this);
auto result = table.Lookup(core::BinaryOp::kAdd, arg_lhs, arg_rhs, EvaluationStage::kConstant,
- Source{{12, 34}},
/* is_compound */ false);
bool matched = result == Success;
@@ -1210,7 +1169,7 @@
};
struct IntrinsicTableAbstractTernaryTest : public resolver::ResolverTestWithParam<Case> {
- Table<Dialect> table{Types(), Symbols(), Diagnostics()};
+ Table<Dialect> table{Types(), Symbols()};
};
TEST_P(IntrinsicTableAbstractTernaryTest, MatchClamp) {
@@ -1218,7 +1177,7 @@
auto* arg_b = GetParam().arg_b(*this);
auto* arg_c = GetParam().arg_c(*this);
auto builtin = table.Lookup(core::BuiltinFn::kClamp, Vector{arg_a, arg_b, arg_c},
- EvaluationStage::kConstant, Source{{12, 34}});
+ EvaluationStage::kConstant);
bool expected_match = GetParam().expected_match;
EXPECT_EQ(builtin == Success, expected_match) << Diagnostics();
diff --git a/src/tint/lang/core/ir/transform/builtin_polyfill.cc b/src/tint/lang/core/ir/transform/builtin_polyfill.cc
index 951765e..f321fe1 100644
--- a/src/tint/lang/core/ir/transform/builtin_polyfill.cc
+++ b/src/tint/lang/core/ir/transform/builtin_polyfill.cc
@@ -120,7 +120,11 @@
}
break;
case core::BuiltinFn::kPack4XI8:
- case core::BuiltinFn::kPack4XU8: {
+ case core::BuiltinFn::kPack4XU8:
+ case core::BuiltinFn::kPack4XI8Clamp:
+ case core::BuiltinFn::kPack4XU8Clamp:
+ case core::BuiltinFn::kUnpack4XI8:
+ case core::BuiltinFn::kUnpack4XU8: {
if (config.pack_unpack_4x8) {
worklist.Push(builtin);
}
@@ -169,6 +173,18 @@
case core::BuiltinFn::kPack4XU8:
replacement = Pack4xU8(builtin);
break;
+ case core::BuiltinFn::kPack4XI8Clamp:
+ replacement = Pack4xI8Clamp(builtin);
+ break;
+ case core::BuiltinFn::kPack4XU8Clamp:
+ replacement = Pack4xU8Clamp(builtin);
+ break;
+ case core::BuiltinFn::kUnpack4XI8:
+ replacement = Unpack4xI8(builtin);
+ break;
+ case core::BuiltinFn::kUnpack4XU8:
+ replacement = Unpack4xU8(builtin);
+ break;
default:
break;
}
@@ -585,33 +601,33 @@
return result;
}
- /// Polyfill a `Pack4xI8()` builtin call
+ /// Polyfill a `pack4xI8()` builtin call
/// @param call the builtin call instruction
/// @returns the replacement value
ir::Value* Pack4xI8(ir::CoreBuiltinCall* call) {
// Replace `pack4xI8(%x)` with:
// %n = vec4u(0, 8, 16, 24);
- // %x_i8 = vec4u((%x & vec4i(0xff)) << n);
- // %result = dot(%x_i8, vec4u(1));
+ // %x_u32 = bitcast<vec4u>(%x)
+ // %x_u8 = (%x_u32 & vec4u(0xff)) << n;
+ // %result = dot(%x_u8, vec4u(1));
ir::Value* result = nullptr;
auto* x = call->Args()[0];
b.InsertBefore(call, [&] {
auto* vec4u = ty.vec4<u32>();
- auto* vec4i = ty.vec4<i32>();
auto* n = b.Construct(vec4u, b.Constant(u32(0)), b.Constant(u32(8)),
b.Constant(u32(16)), b.Constant(u32(24)));
- auto* x_i8 = b.Convert(
- vec4u,
- b.ShiftLeft(vec4i, b.And(vec4i, x, b.Construct(vec4i, b.Constant(i32(0xff)))), n));
- result = b.Call(ty.u32(), core::BuiltinFn::kDot, x_i8,
+ auto* x_u32 = b.Bitcast(vec4u, x);
+ auto* x_u8 = b.ShiftLeft(
+ vec4u, b.And(vec4u, x_u32, b.Construct(vec4u, b.Constant(u32(0xff)))), n);
+ result = b.Call(ty.u32(), core::BuiltinFn::kDot, x_u8,
b.Construct(vec4u, (b.Constant(u32(1)))))
->Result(0);
});
return result;
}
- /// Polyfill a `Pack4xU8()` builtin call
+ /// Polyfill a `pack4xU8()` builtin call
/// @param call the builtin call instruction
/// @returns the replacement value
ir::Value* Pack4xU8(ir::CoreBuiltinCall* call) {
@@ -634,6 +650,114 @@
});
return result;
}
+
+ /// Polyfill a `pack4xI8Clamp()` builtin call
+ /// @param call the builtin call instruction
+ /// @returns the replacement value
+ ir::Value* Pack4xI8Clamp(ir::CoreBuiltinCall* call) {
+ // Replace `pack4xI8Clamp(%x)` with:
+ // %n = vec4u(0, 8, 16, 24);
+ // %min_i8_vec4 = vec4i(-128);
+ // %max_i8_vec4 = vec4i(127);
+ // %x_clamp = clamp(%x, %min_i8_vec4, %max_i8_vec4);
+ // %x_u32 = bitcast<vec4u>(%x_clamp);
+ // %x_u8 = (%x_u32 & vec4u(0xff)) << n;
+ // %result = dot(%x_u8, vec4u(1));
+ ir::Value* result = nullptr;
+ auto* x = call->Args()[0];
+ b.InsertBefore(call, [&] {
+ auto* vec4i = ty.vec4<i32>();
+ auto* vec4u = ty.vec4<u32>();
+
+ auto* n = b.Construct(vec4u, b.Constant(u32(0)), b.Constant(u32(8)),
+ b.Constant(u32(16)), b.Constant(u32(24)));
+ auto* min_i8_vec4 = b.Construct(vec4i, b.Constant(i32(-128)));
+ auto* max_i8_vec4 = b.Construct(vec4i, b.Constant(i32(127)));
+ auto* x_clamp = b.Call(vec4i, core::BuiltinFn::kClamp, x, min_i8_vec4, max_i8_vec4);
+ auto* x_u32 = b.Bitcast(vec4u, x_clamp);
+ auto* x_u8 = b.ShiftLeft(
+ vec4u, b.And(vec4u, x_u32, b.Construct(vec4u, b.Constant(u32(0xff)))), n);
+ result = b.Call(ty.u32(), core::BuiltinFn::kDot, x_u8,
+ b.Construct(vec4u, (b.Constant(u32(1)))))
+ ->Result(0);
+ });
+ return result;
+ }
+
+ /// Polyfill a `pack4xU8Clamp()` builtin call
+ /// @param call the builtin call instruction
+ /// @returns the replacement value
+ ir::Value* Pack4xU8Clamp(ir::CoreBuiltinCall* call) {
+ // Replace `pack4xU8Clamp(%x)` with:
+ // %n = vec4u(0, 8, 16, 24);
+ // %min_u8_vec4 = vec4u(0);
+ // %max_u8_vec4 = vec4u(255);
+ // %x_clamp = clamp(%x, vec4u(0), vec4u(255));
+ // %x_u8 = %x_clamp << n;
+ // %result = dot(%x_u8, vec4u(1));
+ ir::Value* result = nullptr;
+ auto* x = call->Args()[0];
+ b.InsertBefore(call, [&] {
+ auto* vec4u = ty.vec4<u32>();
+
+ auto* n = b.Construct(vec4u, b.Constant(u32(0)), b.Constant(u32(8)),
+ b.Constant(u32(16)), b.Constant(u32(24)));
+ auto* min_u8_vec4 = b.Construct(vec4u, b.Constant(u32(0)));
+ auto* max_u8_vec4 = b.Construct(vec4u, b.Constant(u32(255)));
+ auto* x_clamp = b.Call(vec4u, core::BuiltinFn::kClamp, x, min_u8_vec4, max_u8_vec4);
+ auto* x_u8 = b.ShiftLeft(vec4u, x_clamp, n);
+ result = b.Call(ty.u32(), core::BuiltinFn::kDot, x_u8,
+ b.Construct(vec4u, (b.Constant(u32(1)))))
+ ->Result(0);
+ });
+ return result;
+ }
+
+ /// Polyfill a `unpack4xI8()` builtin call
+ /// @param call the builtin call instruction
+ /// @returns the replacement value
+ ir::Value* Unpack4xI8(ir::CoreBuiltinCall* call) {
+ // Replace `unpack4xI8(%x)` with:
+ // %n = vec4u(24, 16, 8, 0);
+ // %x_vec4u = vec4u(x);
+ // %x_vec4i = bitcast<vec4i>(%x_vec4u << n);
+ // %result = %x_vec4i >> vec4u(24);
+ ir::Value* result = nullptr;
+ auto* x = call->Args()[0];
+ b.InsertBefore(call, [&] {
+ auto* vec4i = ty.vec4<i32>();
+ auto* vec4u = ty.vec4<u32>();
+
+ auto* n = b.Construct(vec4u, b.Constant(u32(24)), b.Constant(u32(16)),
+ b.Constant(u32(8)), b.Constant(u32(0)));
+ auto* x_vec4u = b.Convert(vec4u, x);
+ auto* x_vec4i = b.Bitcast(vec4i, b.ShiftLeft(vec4u, x_vec4u, n));
+ result =
+ b.ShiftRight(vec4i, x_vec4i, b.Construct(vec4u, b.Constant(u32(24))))->Result(0);
+ });
+ return result;
+ }
+
+ /// Polyfill a `unpack4xU8()` builtin call
+ /// @param call the builtin call instruction
+ /// @returns the replacement value
+ ir::Value* Unpack4xU8(ir::CoreBuiltinCall* call) {
+ // Replace `unpack4xU8(%x)` with:
+ // %n = vec4u(0, 8, 16, 24);
+ // %x_vec4u = vec4u(x) >> n;
+ // %result = %x_vec4u & vec4u(0xff);
+ ir::Value* result = nullptr;
+ auto* x = call->Args()[0];
+ b.InsertBefore(call, [&] {
+ auto* vec4u = ty.vec4<u32>();
+
+ auto* n = b.Construct(vec4u, b.Constant(u32(0)), b.Constant(u32(8)),
+ b.Constant(u32(16)), b.Constant(u32(24)));
+ auto* x_vec4u = b.ShiftRight(vec4u, b.Convert(vec4u, x), n);
+ result = b.And(vec4u, x_vec4u, b.Construct(vec4u, b.Constant(u32(0xff))))->Result(0);
+ });
+ return result;
+ }
};
} // namespace
diff --git a/src/tint/lang/core/ir/transform/builtin_polyfill_test.cc b/src/tint/lang/core/ir/transform/builtin_polyfill_test.cc
index 63b015e..37a3fdf 100644
--- a/src/tint/lang/core/ir/transform/builtin_polyfill_test.cc
+++ b/src/tint/lang/core/ir/transform/builtin_polyfill_test.cc
@@ -1430,10 +1430,10 @@
%foo = func(%arg:vec4<i32>):u32 -> %b1 {
%b1 = block {
%3:vec4<u32> = construct 0u, 8u, 16u, 24u
- %4:vec4<i32> = construct 255i
- %5:vec4<i32> = and %arg, %4
- %6:vec4<i32> = shl %5, %3
- %7:vec4<u32> = convert %6
+ %4:vec4<u32> = bitcast %arg
+ %5:vec4<u32> = construct 255u
+ %6:vec4<u32> = and %4, %5
+ %7:vec4<u32> = shl %6, %3
%8:vec4<u32> = construct 1u
%result:u32 = dot %7, %8
ret %result
@@ -1482,5 +1482,145 @@
EXPECT_EQ(expect, str());
}
+TEST_F(IR_BuiltinPolyfillTest, Pack4xI8Clamp) {
+ Build(core::BuiltinFn::kPack4XI8Clamp, ty.u32(), Vector{ty.vec4<i32>()});
+
+ auto* src = R"(
+%foo = func(%arg:vec4<i32>):u32 -> %b1 {
+ %b1 = block {
+ %result:u32 = pack4xI8Clamp %arg
+ ret %result
+ }
+}
+)";
+ EXPECT_EQ(src, str());
+
+ auto* expect = R"(
+%foo = func(%arg:vec4<i32>):u32 -> %b1 {
+ %b1 = block {
+ %3:vec4<u32> = construct 0u, 8u, 16u, 24u
+ %4:vec4<i32> = construct -128i
+ %5:vec4<i32> = construct 127i
+ %6:vec4<i32> = clamp %arg, %4, %5
+ %7:vec4<u32> = bitcast %6
+ %8:vec4<u32> = construct 255u
+ %9:vec4<u32> = and %7, %8
+ %10:vec4<u32> = shl %9, %3
+ %11:vec4<u32> = construct 1u
+ %result:u32 = dot %10, %11
+ ret %result
+ }
+}
+)";
+
+ BuiltinPolyfillConfig config;
+ config.pack_unpack_4x8 = true;
+ Run(BuiltinPolyfill, config);
+
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(IR_BuiltinPolyfillTest, Pack4xU8Clamp) {
+ Build(core::BuiltinFn::kPack4XU8Clamp, ty.u32(), Vector{ty.vec4<u32>()});
+
+ auto* src = R"(
+%foo = func(%arg:vec4<u32>):u32 -> %b1 {
+ %b1 = block {
+ %result:u32 = pack4xU8Clamp %arg
+ ret %result
+ }
+}
+)";
+ EXPECT_EQ(src, str());
+
+ auto* expect = R"(
+%foo = func(%arg:vec4<u32>):u32 -> %b1 {
+ %b1 = block {
+ %3:vec4<u32> = construct 0u, 8u, 16u, 24u
+ %4:vec4<u32> = construct 0u
+ %5:vec4<u32> = construct 255u
+ %6:vec4<u32> = clamp %arg, %4, %5
+ %7:vec4<u32> = shl %6, %3
+ %8:vec4<u32> = construct 1u
+ %result:u32 = dot %7, %8
+ ret %result
+ }
+}
+)";
+
+ BuiltinPolyfillConfig config;
+ config.pack_unpack_4x8 = true;
+ Run(BuiltinPolyfill, config);
+
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(IR_BuiltinPolyfillTest, Unpack4xI8) {
+ Build(core::BuiltinFn::kUnpack4XI8, ty.vec4<i32>(), Vector{ty.u32()});
+
+ auto* src = R"(
+%foo = func(%arg:u32):vec4<i32> -> %b1 {
+ %b1 = block {
+ %result:vec4<i32> = unpack4xI8 %arg
+ ret %result
+ }
+}
+)";
+ EXPECT_EQ(src, str());
+
+ auto* expect = R"(
+%foo = func(%arg:u32):vec4<i32> -> %b1 {
+ %b1 = block {
+ %3:vec4<u32> = construct 24u, 16u, 8u, 0u
+ %4:vec4<u32> = convert %arg
+ %5:vec4<u32> = shl %4, %3
+ %6:vec4<i32> = bitcast %5
+ %7:vec4<u32> = construct 24u
+ %result:vec4<i32> = shr %6, %7
+ ret %result
+ }
+}
+)";
+
+ BuiltinPolyfillConfig config;
+ config.pack_unpack_4x8 = true;
+ Run(BuiltinPolyfill, config);
+
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(IR_BuiltinPolyfillTest, Unpack4xU8) {
+ Build(core::BuiltinFn::kUnpack4XU8, ty.vec4<u32>(), Vector{ty.u32()});
+
+ auto* src = R"(
+%foo = func(%arg:u32):vec4<u32> -> %b1 {
+ %b1 = block {
+ %result:vec4<u32> = unpack4xU8 %arg
+ ret %result
+ }
+}
+)";
+ EXPECT_EQ(src, str());
+
+ auto* expect = R"(
+%foo = func(%arg:u32):vec4<u32> -> %b1 {
+ %b1 = block {
+ %3:vec4<u32> = construct 0u, 8u, 16u, 24u
+ %4:vec4<u32> = convert %arg
+ %5:vec4<u32> = shr %4, %3
+ %6:vec4<u32> = construct 255u
+ %result:vec4<u32> = and %5, %6
+ ret %result
+ }
+}
+)";
+
+ BuiltinPolyfillConfig config;
+ config.pack_unpack_4x8 = true;
+ Run(BuiltinPolyfill, config);
+
+ EXPECT_EQ(expect, str());
+}
+
} // namespace
} // namespace tint::core::ir::transform
diff --git a/src/tint/lang/core/ir/validator.cc b/src/tint/lang/core/ir/validator.cc
index fbd64d9..dd7925a 100644
--- a/src/tint/lang/core/ir/validator.cc
+++ b/src/tint/lang/core/ir/validator.cc
@@ -575,16 +575,17 @@
call->TableData(),
type_mgr,
symbols,
- diagnostics_,
};
auto result = core::intrinsic::LookupFn(context, call->FriendlyName().c_str(), call->FuncId(),
- args, core::EvaluationStage::kRuntime, Source{});
- // TODO(bclayton): Error if result != Success
- if (result == Success) {
- if (result->return_type != call->Result(0)->Type()) {
- AddError(call, InstError(call, "call result type does not match builtin return type"));
- }
+ args, core::EvaluationStage::kRuntime);
+ if (result != Success) {
+ AddError(call, InstError(call, result.Failure()));
+ return;
+ }
+
+ if (result->return_type != call->Result(0)->Type()) {
+ AddError(call, InstError(call, "call result type does not match builtin return type"));
}
}
diff --git a/src/tint/lang/msl/intrinsic/data.cc b/src/tint/lang/msl/intrinsic/data.cc
index 484b078..8edb32f 100644
--- a/src/tint/lang/msl/intrinsic/data.cc
+++ b/src/tint/lang/msl/intrinsic/data.cc
@@ -183,6 +183,8 @@
/* unary '!' */ tint::core::intrinsic::kNoOverloads,
/* unary '~' */ tint::core::intrinsic::kNoOverloads,
/* unary '-' */ tint::core::intrinsic::kNoOverloads,
+ /* unary '*' */ tint::core::intrinsic::kNoOverloads,
+ /* unary '&' */ tint::core::intrinsic::kNoOverloads,
};
} // namespace tint::msl::intrinsic
diff --git a/src/tint/lang/spirv/intrinsic/data.cc b/src/tint/lang/spirv/intrinsic/data.cc
index a681065..1cf2040 100644
--- a/src/tint/lang/spirv/intrinsic/data.cc
+++ b/src/tint/lang/spirv/intrinsic/data.cc
@@ -5873,6 +5873,8 @@
/* unary '!' */ tint::core::intrinsic::kNoOverloads,
/* unary '~' */ tint::core::intrinsic::kNoOverloads,
/* unary '-' */ tint::core::intrinsic::kNoOverloads,
+ /* unary '*' */ tint::core::intrinsic::kNoOverloads,
+ /* unary '&' */ tint::core::intrinsic::kNoOverloads,
};
} // namespace tint::spirv::intrinsic
diff --git a/src/tint/lang/spirv/reader/parser/BUILD.bazel b/src/tint/lang/spirv/reader/parser/BUILD.bazel
index 1d0b9ee..6990fb1 100644
--- a/src/tint/lang/spirv/reader/parser/BUILD.bazel
+++ b/src/tint/lang/spirv/reader/parser/BUILD.bazel
@@ -82,6 +82,7 @@
"constant_test.cc",
"function_test.cc",
"helper_test.h",
+ "struct_test.cc",
"var_test.cc",
],
deps = [
diff --git a/src/tint/lang/spirv/reader/parser/BUILD.cmake b/src/tint/lang/spirv/reader/parser/BUILD.cmake
index 524b09d..ac508eb 100644
--- a/src/tint/lang/spirv/reader/parser/BUILD.cmake
+++ b/src/tint/lang/spirv/reader/parser/BUILD.cmake
@@ -88,6 +88,7 @@
lang/spirv/reader/parser/constant_test.cc
lang/spirv/reader/parser/function_test.cc
lang/spirv/reader/parser/helper_test.h
+ lang/spirv/reader/parser/struct_test.cc
lang/spirv/reader/parser/var_test.cc
)
diff --git a/src/tint/lang/spirv/reader/parser/BUILD.gn b/src/tint/lang/spirv/reader/parser/BUILD.gn
index fa9f30c..8ffc520 100644
--- a/src/tint/lang/spirv/reader/parser/BUILD.gn
+++ b/src/tint/lang/spirv/reader/parser/BUILD.gn
@@ -89,6 +89,7 @@
"constant_test.cc",
"function_test.cc",
"helper_test.h",
+ "struct_test.cc",
"var_test.cc",
]
deps = [
diff --git a/src/tint/lang/spirv/reader/parser/constant_test.cc b/src/tint/lang/spirv/reader/parser/constant_test.cc
index d8d8d57..862db10 100644
--- a/src/tint/lang/spirv/reader/parser/constant_test.cc
+++ b/src/tint/lang/spirv/reader/parser/constant_test.cc
@@ -286,5 +286,444 @@
)");
}
+TEST_F(SpirvParserTest, Constant_Vec2Bool) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %bool = OpTypeBool
+ %vec2b = OpTypeVector %bool 2
+ %true = OpConstantTrue %bool
+ %false = OpConstantFalse %bool
+%vec2b_const = OpConstantComposite %vec2b %true %false
+ %null = OpConstantNull %vec2b
+ %void_fn = OpTypeFunction %void
+ %fn_type = OpTypeFunction %vec2b %vec2b
+
+ %main = OpFunction %void None %void_fn
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %foo = OpFunction %vec2b None %fn_type
+ %param = OpFunctionParameter %vec2b
+ %foo_start = OpLabel
+ OpReturnValue %param
+ OpFunctionEnd
+
+ %bar = OpFunction %void None %void_fn
+ %bar_start = OpLabel
+ %1 = OpFunctionCall %vec2b %foo %vec2b_const
+ %2 = OpFunctionCall %vec2b %foo %null
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+%4 = func():void -> %b3 {
+ %b3 = block {
+ %5:vec2<bool> = call %2, vec2<bool>(true, false)
+ %6:vec2<bool> = call %2, vec2<bool>(false)
+ ret
+ }
+}
+)");
+}
+
+TEST_F(SpirvParserTest, Constant_Vec3I32) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %i32 = OpTypeInt 32 1
+ %vec3i = OpTypeVector %i32 3
+ %i32_0 = OpConstant %i32 0
+ %i32_1 = OpConstant %i32 1
+ %i32_n1 = OpConstant %i32 -1
+%vec3i_const = OpConstantComposite %vec3i %i32_0 %i32_1 %i32_n1
+ %null = OpConstantNull %vec3i
+ %void_fn = OpTypeFunction %void
+ %fn_type = OpTypeFunction %vec3i %vec3i
+
+ %main = OpFunction %void None %void_fn
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %foo = OpFunction %vec3i None %fn_type
+ %param = OpFunctionParameter %vec3i
+ %foo_start = OpLabel
+ OpReturnValue %param
+ OpFunctionEnd
+
+ %bar = OpFunction %void None %void_fn
+ %bar_start = OpLabel
+ %1 = OpFunctionCall %vec3i %foo %vec3i_const
+ %2 = OpFunctionCall %vec3i %foo %null
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+%4 = func():void -> %b3 {
+ %b3 = block {
+ %5:vec3<i32> = call %2, vec3<i32>(0i, 1i, -1i)
+ %6:vec3<i32> = call %2, vec3<i32>(0i)
+ ret
+ }
+}
+)");
+}
+
+TEST_F(SpirvParserTest, Constant_Vec4F32) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %f32 = OpTypeFloat 32
+ %vec4f = OpTypeVector %f32 4
+ %f32_0 = OpConstant %f32 0
+ %f32_1 = OpConstant %f32 1
+ %f32_max = OpConstant %f32 0x1.fffffep+127
+ %f32_min = OpConstant %f32 -0x1.fffffep+127
+%vec4f_const = OpConstantComposite %vec4f %f32_0 %f32_1 %f32_max %f32_min
+ %null = OpConstantNull %vec4f
+ %void_fn = OpTypeFunction %void
+ %fn_type = OpTypeFunction %vec4f %vec4f
+
+ %main = OpFunction %void None %void_fn
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %foo = OpFunction %vec4f None %fn_type
+ %param = OpFunctionParameter %vec4f
+ %foo_start = OpLabel
+ OpReturnValue %param
+ OpFunctionEnd
+
+ %bar = OpFunction %void None %void_fn
+ %bar_start = OpLabel
+ %1 = OpFunctionCall %vec4f %foo %vec4f_const
+ %2 = OpFunctionCall %vec4f %foo %null
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+%4 = func():void -> %b3 {
+ %b3 = block {
+ %5:vec4<f32> = call %2, vec4<f32>(0.0f, 1.0f, 340282346638528859811704183484516925440.0f, -340282346638528859811704183484516925440.0f)
+ %6:vec4<f32> = call %2, vec4<f32>(0.0f)
+ ret
+ }
+}
+)");
+}
+
+TEST_F(SpirvParserTest, Constant_Mat2x4F32) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %f32 = OpTypeFloat 32
+ %vec4f = OpTypeVector %f32 4
+ %mat2x4f = OpTypeMatrix %vec4f 2
+ %f32_0 = OpConstant %f32 0
+ %f32_1 = OpConstant %f32 1
+%vec4f_const_0 = OpConstantComposite %vec4f %f32_0 %f32_0 %f32_0 %f32_0
+%vec4f_const_1 = OpConstantComposite %vec4f %f32_1 %f32_1 %f32_1 %f32_1
+%mat2x4f_const = OpConstantComposite %mat2x4f %vec4f_const_0 %vec4f_const_1
+ %null = OpConstantNull %mat2x4f
+ %void_fn = OpTypeFunction %void
+ %fn_type = OpTypeFunction %mat2x4f %mat2x4f
+
+ %main = OpFunction %void None %void_fn
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %foo = OpFunction %mat2x4f None %fn_type
+ %param = OpFunctionParameter %mat2x4f
+ %foo_start = OpLabel
+ OpReturnValue %param
+ OpFunctionEnd
+
+ %bar = OpFunction %void None %void_fn
+ %bar_start = OpLabel
+ %1 = OpFunctionCall %mat2x4f %foo %mat2x4f_const
+ %2 = OpFunctionCall %mat2x4f %foo %null
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+%4 = func():void -> %b3 {
+ %b3 = block {
+ %5:mat2x4<f32> = call %2, mat2x4<f32>(vec4<f32>(0.0f), vec4<f32>(1.0f))
+ %6:mat2x4<f32> = call %2, mat2x4<f32>(vec4<f32>(0.0f))
+ ret
+ }
+}
+)");
+}
+
+TEST_F(SpirvParserTest, Constant_Mat3x2F16) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpCapability Float16
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %f16 = OpTypeFloat 16
+ %vec2h = OpTypeVector %f16 2
+ %mat3x2h = OpTypeMatrix %vec2h 3
+ %f16_0 = OpConstant %f16 0
+ %f16_1 = OpConstant %f16 1
+ %f16_max = OpConstant %f16 0x1.ffcp+15
+%vec2h_const_0 = OpConstantComposite %vec2h %f16_0 %f16_0
+%vec2h_const_1 = OpConstantComposite %vec2h %f16_1 %f16_1
+%vec2h_const_max = OpConstantComposite %vec2h %f16_max %f16_max
+%mat3x2h_const = OpConstantComposite %mat3x2h %vec2h_const_0 %vec2h_const_1 %vec2h_const_max
+ %null = OpConstantNull %mat3x2h
+ %void_fn = OpTypeFunction %void
+ %fn_type = OpTypeFunction %mat3x2h %mat3x2h
+
+ %main = OpFunction %void None %void_fn
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %foo = OpFunction %mat3x2h None %fn_type
+ %param = OpFunctionParameter %mat3x2h
+ %foo_start = OpLabel
+ OpReturnValue %param
+ OpFunctionEnd
+
+ %bar = OpFunction %void None %void_fn
+ %bar_start = OpLabel
+ %1 = OpFunctionCall %mat3x2h %foo %mat3x2h_const
+ %2 = OpFunctionCall %mat3x2h %foo %null
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+%4 = func():void -> %b3 {
+ %b3 = block {
+ %5:mat3x2<f16> = call %2, mat3x2<f16>(vec2<f16>(0.0h), vec2<f16>(1.0h), vec2<f16>(65504.0h))
+ %6:mat3x2<f16> = call %2, mat3x2<f16>(vec2<f16>(0.0h))
+ ret
+ }
+}
+)");
+}
+
+TEST_F(SpirvParserTest, Constant_Array_I32_4) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %i32 = OpTypeInt 32 1
+ %i32_4 = OpConstant %i32 4
+ %arr = OpTypeArray %i32 %i32_4
+ %i32_0 = OpConstant %i32 0
+ %i32_1 = OpConstant %i32 1
+ %i32_n1 = OpConstant %i32 -1
+ %i32_max = OpConstant %i32 2147483647
+ %arr_const = OpConstantComposite %arr %i32_0 %i32_1 %i32_n1 %i32_max
+ %null = OpConstantNull %arr
+ %void_fn = OpTypeFunction %void
+ %fn_type = OpTypeFunction %arr %arr
+
+ %main = OpFunction %void None %void_fn
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %foo = OpFunction %arr None %fn_type
+ %param = OpFunctionParameter %arr
+ %foo_start = OpLabel
+ OpReturnValue %param
+ OpFunctionEnd
+
+ %bar = OpFunction %void None %void_fn
+ %bar_start = OpLabel
+ %1 = OpFunctionCall %arr %foo %arr_const
+ %2 = OpFunctionCall %arr %foo %null
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+%4 = func():void -> %b3 {
+ %b3 = block {
+ %5:array<i32, 4> = call %2, array<i32, 4>(0i, 1i, -1i, 2147483647i)
+ %6:array<i32, 4> = call %2, array<i32, 4>(0i)
+ ret
+ }
+}
+)");
+}
+
+TEST_F(SpirvParserTest, Constant_Array_Array_F32) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %i32 = OpTypeInt 32 1
+ %i32_2 = OpConstant %i32 2
+ %i32_4 = OpConstant %i32 4
+ %f32 = OpTypeFloat 32
+ %f32_0 = OpConstant %f32 0
+ %f32_1 = OpConstant %f32 1
+ %f32_max = OpConstant %f32 0x1.fffffep+127
+ %f32_min = OpConstant %f32 -0x1.fffffep+127
+ %inner = OpTypeArray %f32 %i32_4
+ %outer = OpTypeArray %inner %i32_2
+%inner_const_0 = OpConstantComposite %inner %f32_0 %f32_1 %f32_max %f32_min
+%inner_const_1 = OpConstantComposite %inner %f32_min %f32_max %f32_1 %f32_0
+ %outer_const = OpConstantComposite %outer %inner_const_0 %inner_const_1
+ %null = OpConstantNull %outer
+ %void_fn = OpTypeFunction %void
+ %fn_type = OpTypeFunction %outer %outer
+
+ %main = OpFunction %void None %void_fn
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %foo = OpFunction %outer None %fn_type
+ %param = OpFunctionParameter %outer
+ %foo_start = OpLabel
+ OpReturnValue %param
+ OpFunctionEnd
+
+ %bar = OpFunction %void None %void_fn
+ %bar_start = OpLabel
+ %1 = OpFunctionCall %outer %foo %outer_const
+ %2 = OpFunctionCall %outer %foo %null
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+%4 = func():void -> %b3 {
+ %b3 = block {
+ %5:array<array<f32, 4>, 2> = call %2, array<array<f32, 4>, 2>(array<f32, 4>(0.0f, 1.0f, 340282346638528859811704183484516925440.0f, -340282346638528859811704183484516925440.0f), array<f32, 4>(-340282346638528859811704183484516925440.0f, 340282346638528859811704183484516925440.0f, 1.0f, 0.0f))
+ %6:array<array<f32, 4>, 2> = call %2, array<array<f32, 4>, 2>(array<f32, 4>(0.0f))
+ ret
+ }
+}
+)");
+}
+
+TEST_F(SpirvParserTest, Constant_Struct) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %i32 = OpTypeInt 32 1
+ %f32 = OpTypeFloat 32
+ %str = OpTypeStruct %i32 %f32
+ %i32_42 = OpConstant %i32 42
+ %f32_n1 = OpConstant %f32 -1
+ %str_const = OpConstantComposite %str %i32_42 %f32_n1
+ %null = OpConstantNull %str
+ %void_fn = OpTypeFunction %void
+ %fn_type = OpTypeFunction %str %str
+
+ %main = OpFunction %void None %void_fn
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %foo = OpFunction %str None %fn_type
+ %param = OpFunctionParameter %str
+ %foo_start = OpLabel
+ OpReturnValue %param
+ OpFunctionEnd
+
+ %bar = OpFunction %void None %void_fn
+ %bar_start = OpLabel
+ %1 = OpFunctionCall %str %foo %str_const
+ %2 = OpFunctionCall %str %foo %null
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+%4 = func():void -> %b3 {
+ %b3 = block {
+ %5:tint_symbol_2 = call %2, tint_symbol_2(42i, -1.0f)
+ %6:tint_symbol_2 = call %2, tint_symbol_2(0i, 0.0f)
+ ret
+ }
+}
+)");
+}
+
+TEST_F(SpirvParserTest, Constant_Struct_Nested) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %i32 = OpTypeInt 32 1
+ %f32 = OpTypeFloat 32
+ %i32_2 = OpConstant %i32 2
+ %inner = OpTypeStruct %i32 %f32
+ %arr = OpTypeArray %inner %i32_2
+ %outer = OpTypeStruct %arr %arr
+ %i32_42 = OpConstant %i32 42
+ %i32_n1 = OpConstant %i32 -1
+ %f32_n1 = OpConstant %f32 -1
+ %f32_42 = OpConstant %f32 42
+%inner_const_0 = OpConstantComposite %inner %i32_42 %f32_n1
+%inner_const_1 = OpConstantComposite %inner %i32_n1 %f32_42
+ %arr_const_0 = OpConstantComposite %arr %inner_const_0 %inner_const_1
+ %arr_const_1 = OpConstantComposite %arr %inner_const_1 %inner_const_0
+ %outer_const = OpConstantComposite %outer %arr_const_0 %arr_const_1
+ %null = OpConstantNull %outer
+ %void_fn = OpTypeFunction %void
+ %fn_type = OpTypeFunction %outer %outer
+
+ %main = OpFunction %void None %void_fn
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %foo = OpFunction %outer None %fn_type
+ %param = OpFunctionParameter %outer
+ %foo_start = OpLabel
+ OpReturnValue %param
+ OpFunctionEnd
+
+ %bar = OpFunction %void None %void_fn
+ %bar_start = OpLabel
+ %1 = OpFunctionCall %outer %foo %outer_const
+ %2 = OpFunctionCall %outer %foo %null
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+%4 = func():void -> %b3 {
+ %b3 = block {
+ %5:tint_symbol_5 = call %2, tint_symbol_5(array<tint_symbol_2, 2>(tint_symbol_2(42i, -1.0f), tint_symbol_2(-1i, 42.0f)), array<tint_symbol_2, 2>(tint_symbol_2(-1i, 42.0f), tint_symbol_2(42i, -1.0f)))
+ %6:tint_symbol_5 = call %2, tint_symbol_5(array<tint_symbol_2, 2>(tint_symbol_2(0i, 0.0f)))
+ ret
+ }
+}
+)");
+}
+
} // namespace
} // namespace tint::spirv::reader
diff --git a/src/tint/lang/spirv/reader/parser/helper_test.h b/src/tint/lang/spirv/reader/parser/helper_test.h
index af16699..489484e 100644
--- a/src/tint/lang/spirv/reader/parser/helper_test.h
+++ b/src/tint/lang/spirv/reader/parser/helper_test.h
@@ -28,6 +28,7 @@
#ifndef SRC_TINT_LANG_SPIRV_READER_PARSER_HELPER_TEST_H_
#define SRC_TINT_LANG_SPIRV_READER_PARSER_HELPER_TEST_H_
+#include <iostream>
#include <string>
#include <vector>
@@ -53,11 +54,10 @@
template <typename BASE>
class SpirvParserTestHelperBase : public BASE {
protected:
- /// Run the parser on a SPIR-V module and return the Tint IR or an error string.
- /// @param spirv_asm the SPIR-V assembly to parse
- /// @returns the disassembled Tint IR
- std::string Run(std::string spirv_asm) {
- // Assemble the SPIR-V input.
+ /// Assemble a textual SPIR-V module into a SPIR-V binary.
+ /// @param spirv_asm the textual SPIR-V assembly
+ /// @returns the SPIR-V binary data, or an error string
+ static Result<std::vector<uint32_t>, std::string> Assemble(std::string spirv_asm) {
StringStream err;
std::vector<uint32_t> binary;
spvtools::SpirvTools tools(SPV_ENV_UNIVERSAL_1_0);
@@ -65,14 +65,24 @@
[&err](spv_message_level_t, const char*, const spv_position_t& pos, const char* msg) {
err << "SPIR-V assembly failed:" << pos.line << ":" << pos.column << ": " << msg;
});
- auto assembled =
- tools.Assemble(spirv_asm, &binary, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS);
- if (!assembled) {
+ if (!tools.Assemble(spirv_asm, &binary, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS)) {
return err.str();
}
+ return binary;
+ }
+
+ /// Run the parser on a SPIR-V module and return the Tint IR or an error string.
+ /// @param spirv_asm the SPIR-V assembly to parse
+ /// @returns the disassembled Tint IR
+ std::string Run(std::string spirv_asm) {
+ // Assemble the SPIR-V input.
+ auto binary = Assemble(spirv_asm);
+ if (binary != Success) {
+ return binary.Failure();
+ }
// Parse the SPIR-V to produce an IR module.
- auto parsed = Parse(Slice(binary.data(), binary.size()));
+ auto parsed = Parse(Slice(binary.Get().data(), binary.Get().size()));
if (parsed != Success) {
return parsed.Failure().reason.str();
}
diff --git a/src/tint/lang/spirv/reader/parser/parser.cc b/src/tint/lang/spirv/reader/parser/parser.cc
index d7a8ef1..f9057b3 100644
--- a/src/tint/lang/spirv/reader/parser/parser.cc
+++ b/src/tint/lang/spirv/reader/parser/parser.cc
@@ -27,6 +27,7 @@
#include "src/tint/lang/spirv/reader/parser/parser.h"
+#include <algorithm>
#include <memory>
#include <utility>
#include <vector>
@@ -95,6 +96,8 @@
return core::AddressSpace::kFunction;
case spv::StorageClass::Private:
return core::AddressSpace::kPrivate;
+ case spv::StorageClass::Uniform:
+ return core::AddressSpace::kUniform;
default:
TINT_UNIMPLEMENTED()
<< "unhandled SPIR-V storage class: " << static_cast<uint32_t>(sc);
@@ -105,40 +108,58 @@
/// @param type a SPIR-V type object
/// @returns a Tint type object
const core::type::Type* Type(const spvtools::opt::analysis::Type* type) {
- switch (type->kind()) {
- case spvtools::opt::analysis::Type::kVoid:
- return ty_.void_();
- case spvtools::opt::analysis::Type::kBool:
- return ty_.bool_();
- case spvtools::opt::analysis::Type::kInteger: {
- auto* int_ty = type->AsInteger();
- TINT_ASSERT_OR_RETURN_VALUE(int_ty->width() == 32, ty_.void_());
- if (int_ty->IsSigned()) {
- return ty_.i32();
- } else {
- return ty_.u32();
- }
- }
- case spvtools::opt::analysis::Type::kFloat: {
- auto* float_ty = type->AsFloat();
- if (float_ty->width() == 16) {
- return ty_.f16();
- } else if (float_ty->width() == 32) {
- return ty_.f32();
- } else {
- TINT_UNREACHABLE()
- << "unsupported floating point type width: " << float_ty->width();
+ return types_.GetOrCreate(type, [&]() -> const core::type::Type* {
+ switch (type->kind()) {
+ case spvtools::opt::analysis::Type::kVoid:
return ty_.void_();
+ case spvtools::opt::analysis::Type::kBool:
+ return ty_.bool_();
+ case spvtools::opt::analysis::Type::kInteger: {
+ auto* int_ty = type->AsInteger();
+ TINT_ASSERT_OR_RETURN_VALUE(int_ty->width() == 32, ty_.void_());
+ if (int_ty->IsSigned()) {
+ return ty_.i32();
+ } else {
+ return ty_.u32();
+ }
}
+ case spvtools::opt::analysis::Type::kFloat: {
+ auto* float_ty = type->AsFloat();
+ if (float_ty->width() == 16) {
+ return ty_.f16();
+ } else if (float_ty->width() == 32) {
+ return ty_.f32();
+ } else {
+ TINT_UNREACHABLE()
+ << "unsupported floating point type width: " << float_ty->width();
+ return ty_.void_();
+ }
+ }
+ case spvtools::opt::analysis::Type::kVector: {
+ auto* vec_ty = type->AsVector();
+ TINT_ASSERT_OR_RETURN_VALUE(vec_ty->element_count() <= 4, ty_.void_());
+ return ty_.vec(Type(vec_ty->element_type()), vec_ty->element_count());
+ }
+ case spvtools::opt::analysis::Type::kMatrix: {
+ auto* mat_ty = type->AsMatrix();
+ TINT_ASSERT_OR_RETURN_VALUE(mat_ty->element_count() <= 4, ty_.void_());
+ return ty_.mat(As<core::type::Vector>(Type(mat_ty->element_type())),
+ mat_ty->element_count());
+ }
+ case spvtools::opt::analysis::Type::kArray:
+ return EmitArray(type->AsArray());
+ case spvtools::opt::analysis::Type::kStruct:
+ return EmitStruct(type->AsStruct());
+ case spvtools::opt::analysis::Type::kPointer: {
+ auto* ptr_ty = type->AsPointer();
+ return ty_.ptr(AddressSpace(ptr_ty->storage_class()),
+ Type(ptr_ty->pointee_type()));
+ }
+ default:
+ TINT_UNIMPLEMENTED() << "unhandled SPIR-V type: " << type->str();
+ return ty_.void_();
}
- case spvtools::opt::analysis::Type::kPointer: {
- auto* ptr_ty = type->AsPointer();
- return ty_.ptr(AddressSpace(ptr_ty->storage_class()), Type(ptr_ty->pointee_type()));
- }
- default:
- TINT_UNIMPLEMENTED() << "unhandled SPIR-V type: " << type->str();
- return ty_.void_();
- }
+ });
}
/// @param id a SPIR-V result ID for a type declaration instruction
@@ -147,6 +168,70 @@
return Type(spirv_context_->get_type_mgr()->GetType(id));
}
+ /// @param arr_ty a SPIR-V array object
+ /// @returns a Tint array object
+ const core::type::Type* EmitArray(const spvtools::opt::analysis::Array* arr_ty) {
+ const auto& length = arr_ty->length_info();
+ TINT_ASSERT_OR_RETURN_VALUE(!length.words.empty(), ty_.void_());
+ if (length.words[0] != spvtools::opt::analysis::Array::LengthInfo::kConstant) {
+ TINT_UNIMPLEMENTED() << "specialized array lengths";
+ return ty_.void_();
+ }
+
+ // Get the value from the constant used for the element count.
+ const auto* count_const =
+ spirv_context_->get_constant_mgr()->FindDeclaredConstant(length.id);
+ TINT_ASSERT_OR_RETURN_VALUE(count_const, ty_.void_());
+ const uint64_t count_val = count_const->GetZeroExtendedValue();
+ TINT_ASSERT_OR_RETURN_VALUE(count_val <= UINT32_MAX, ty_.void_());
+
+ // TODO(crbug.com/1907): Handle decorations that affect the array layout.
+
+ return ty_.array(Type(arr_ty->element_type()), static_cast<uint32_t>(count_val));
+ }
+
+ /// @param struct_ty a SPIR-V struct object
+ /// @returns a Tint struct object
+ const core::type::Type* EmitStruct(const spvtools::opt::analysis::Struct* struct_ty) {
+ if (struct_ty->NumberOfComponents() == 0) {
+ TINT_ICE() << "empty structures are not supported";
+ return ty_.void_();
+ }
+
+ // Build a list of struct members.
+ uint32_t current_size = 0u;
+ Vector<core::type::StructMember*, 4> members;
+ for (uint32_t i = 0; i < struct_ty->NumberOfComponents(); i++) {
+ auto* member_ty = Type(struct_ty->element_types()[i]);
+ uint32_t align = std::max<uint32_t>(member_ty->Align(), 1u);
+ uint32_t offset = tint::RoundUp(align, current_size);
+ core::type::StructMemberAttributes attributes;
+
+ // Handle member decorations that affect layout or attributes.
+ if (struct_ty->element_decorations().count(i)) {
+ for (auto& deco : struct_ty->element_decorations().at(i)) {
+ switch (spv::Decoration(deco[0])) {
+ case spv::Decoration::Offset:
+ offset = deco[1];
+ break;
+ default:
+ TINT_UNIMPLEMENTED() << "unhandled member decoration: " << deco[0];
+ break;
+ }
+ }
+ }
+
+ // TODO(crbug.com/tint/1907): Use OpMemberName to name it.
+ members.Push(ty_.Get<core::type::StructMember>(ir_.symbols.New(), member_ty, i, offset,
+ align, member_ty->Size(),
+ std::move(attributes)));
+
+ current_size = offset + member_ty->Size();
+ }
+ // TODO(crbug.com/tint/1907): Use OpName to name it.
+ return ty_.Struct(ir_.symbols.New(), std::move(members));
+ }
+
/// @param id a SPIR-V result ID for a function declaration instruction
/// @returns a Tint function object
core::ir::Function* Function(uint32_t id) {
@@ -161,7 +246,7 @@
core::ir::Value* Value(uint32_t id) {
return values_.GetOrCreate(id, [&]() -> core::ir::Value* {
if (auto* c = spirv_context_->get_constant_mgr()->FindDeclaredConstant(id)) {
- return Constant(c);
+ return b_.Constant(Constant(c));
}
TINT_UNREACHABLE() << "missing value for result ID " << id;
return nullptr;
@@ -169,36 +254,64 @@
}
/// @param constant a SPIR-V constant object
- /// @returns a Tint constant object
- core::ir::Constant* Constant(const spvtools::opt::analysis::Constant* constant) {
+ /// @returns a Tint constant value
+ const core::constant::Value* Constant(const spvtools::opt::analysis::Constant* constant) {
// Handle OpConstantNull for all types.
if (constant->AsNullConstant()) {
- return b_.Constant(ir_.constant_values.Zero(Type(constant->type())));
+ return ir_.constant_values.Zero(Type(constant->type()));
}
if (auto* bool_ = constant->AsBoolConstant()) {
- return b_.Constant(bool_->value());
+ return b_.ConstantValue(bool_->value());
}
if (auto* i = constant->AsIntConstant()) {
auto* int_ty = i->type()->AsInteger();
TINT_ASSERT_OR_RETURN_VALUE(int_ty->width() == 32, nullptr);
if (int_ty->IsSigned()) {
- return b_.Constant(i32(i->GetS32BitValue()));
+ return b_.ConstantValue(i32(i->GetS32BitValue()));
} else {
- return b_.Constant(u32(i->GetU32BitValue()));
+ return b_.ConstantValue(u32(i->GetU32BitValue()));
}
}
if (auto* f = constant->AsFloatConstant()) {
auto* float_ty = f->type()->AsFloat();
if (float_ty->width() == 16) {
- return b_.Constant(f16::FromBits(static_cast<uint16_t>(f->words()[0])));
+ return b_.ConstantValue(f16::FromBits(static_cast<uint16_t>(f->words()[0])));
} else if (float_ty->width() == 32) {
- return b_.Constant(f32(f->GetFloat()));
+ return b_.ConstantValue(f32(f->GetFloat()));
} else {
TINT_UNREACHABLE() << "unsupported floating point type width";
return nullptr;
}
}
+ if (auto* v = constant->AsVectorConstant()) {
+ Vector<const core::constant::Value*, 4> elements;
+ for (auto& el : v->GetComponents()) {
+ elements.Push(Constant(el));
+ }
+ return ir_.constant_values.Composite(Type(v->type()), std::move(elements));
+ }
+ if (auto* m = constant->AsMatrixConstant()) {
+ Vector<const core::constant::Value*, 4> columns;
+ for (auto& el : m->GetComponents()) {
+ columns.Push(Constant(el));
+ }
+ return ir_.constant_values.Composite(Type(m->type()), std::move(columns));
+ }
+ if (auto* a = constant->AsArrayConstant()) {
+ Vector<const core::constant::Value*, 16> elements;
+ for (auto& el : a->GetComponents()) {
+ elements.Push(Constant(el));
+ }
+ return ir_.constant_values.Composite(Type(a->type()), std::move(elements));
+ }
+ if (auto* s = constant->AsStructConstant()) {
+ Vector<const core::constant::Value*, 16> elements;
+ for (auto& el : s->GetComponents()) {
+ elements.Push(Constant(el));
+ }
+ return ir_.constant_values.Composite(Type(s->type()), std::move(elements));
+ }
TINT_UNIMPLEMENTED() << "unhandled constant type";
return nullptr;
}
@@ -333,6 +446,8 @@
/// The Tint IR function that is currently being emitted.
core::ir::Function* current_function_ = nullptr;
+ /// A map from a SPIR-V type declaration result ID to the corresponding Tint type object.
+ Hashmap<const spvtools::opt::analysis::Type*, const core::type::Type*, 16> types_;
/// A map from a SPIR-V function definition result ID to the corresponding Tint function object.
Hashmap<uint32_t, core::ir::Function*, 8> functions_;
/// A map from a SPIR-V result ID to the corresponding Tint value object.
diff --git a/src/tint/lang/spirv/reader/parser/struct_test.cc b/src/tint/lang/spirv/reader/parser/struct_test.cc
new file mode 100644
index 0000000..afbaa39
--- /dev/null
+++ b/src/tint/lang/spirv/reader/parser/struct_test.cc
@@ -0,0 +1,232 @@
+// Copyright 2024 The Dawn & Tint Authors
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "src/tint/lang/spirv/reader/parser/helper_test.h"
+
+#include "gtest/gtest-spi.h"
+
+namespace tint::spirv::reader {
+
+TEST_F(SpirvParserTest, Struct_Empty) {
+ EXPECT_FATAL_FAILURE( //
+ {
+ auto assembly = Assemble(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %str = OpTypeStruct
+ %ep_type = OpTypeFunction %void
+ %fn_type = OpTypeFunction %void %str
+
+ %foo = OpFunction %void None %fn_type
+ %param = OpFunctionParameter %str
+ %foo_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %main = OpFunction %void None %ep_type
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+)");
+ auto parsed = Parse(Slice(assembly.Get().data(), assembly.Get().size()));
+ EXPECT_EQ(parsed, Success);
+ },
+ "empty structures are not supported");
+}
+
+TEST_F(SpirvParserTest, Struct_BasicDecl) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %i32 = OpTypeInt 32 1
+ %str = OpTypeStruct %i32 %i32
+ %ep_type = OpTypeFunction %void
+ %fn_type = OpTypeFunction %void %str
+
+ %foo = OpFunction %void None %fn_type
+ %param = OpFunctionParameter %str
+ %foo_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %main = OpFunction %void None %ep_type
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+tint_symbol_2 = struct @align(4) {
+ tint_symbol:i32 @offset(0)
+ tint_symbol_1:i32 @offset(4)
+}
+
+%1 = func(%2:tint_symbol_2):void -> %b1 {
+ %b1 = block {
+ ret
+ }
+}
+)");
+}
+
+TEST_F(SpirvParserTest, Struct_MultipleUses) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %i32 = OpTypeInt 32 1
+ %str = OpTypeStruct %i32 %i32
+ %ep_type = OpTypeFunction %void
+ %fn_type = OpTypeFunction %str %str %str
+
+ %foo = OpFunction %str None %fn_type
+ %param_1 = OpFunctionParameter %str
+ %param_2 = OpFunctionParameter %str
+ %foo_start = OpLabel
+ OpReturnValue %param_1
+ OpFunctionEnd
+
+ %main = OpFunction %void None %ep_type
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+tint_symbol_2 = struct @align(4) {
+ tint_symbol:i32 @offset(0)
+ tint_symbol_1:i32 @offset(4)
+}
+
+%1 = func(%2:tint_symbol_2, %3:tint_symbol_2):tint_symbol_2 -> %b1 {
+ %b1 = block {
+ ret %2
+ }
+}
+)");
+}
+
+TEST_F(SpirvParserTest, Struct_Nested) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ %void = OpTypeVoid
+ %i32 = OpTypeInt 32 1
+ %inner = OpTypeStruct %i32 %i32
+ %middle = OpTypeStruct %inner %inner
+ %outer = OpTypeStruct %inner %middle %inner
+ %ep_type = OpTypeFunction %void
+ %fn_type = OpTypeFunction %void %outer
+
+ %foo = OpFunction %void None %fn_type
+ %param = OpFunctionParameter %outer
+ %foo_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %main = OpFunction %void None %ep_type
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+tint_symbol_2 = struct @align(4) {
+ tint_symbol:i32 @offset(0)
+ tint_symbol_1:i32 @offset(4)
+}
+
+tint_symbol_6 = struct @align(4) {
+ tint_symbol_4:tint_symbol_2 @offset(0)
+ tint_symbol_5:tint_symbol_2 @offset(8)
+}
+
+tint_symbol_9 = struct @align(4) {
+ tint_symbol_3:tint_symbol_2 @offset(0)
+ tint_symbol_7:tint_symbol_6 @offset(8)
+ tint_symbol_8:tint_symbol_2 @offset(24)
+}
+
+%1 = func(%2:tint_symbol_9):void -> %b1 {
+ %b1 = block {
+ ret
+ }
+}
+)");
+}
+
+TEST_F(SpirvParserTest, Struct_Offset) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ OpMemberDecorate %str 0 Offset 0
+ OpMemberDecorate %str 1 Offset 4
+ OpMemberDecorate %str 2 Offset 32
+ OpMemberDecorate %str 3 Offset 64
+ %void = OpTypeVoid
+ %i32 = OpTypeInt 32 1
+ %str = OpTypeStruct %i32 %i32 %i32 %i32
+ %ep_type = OpTypeFunction %void
+ %fn_type = OpTypeFunction %void %str
+
+ %foo = OpFunction %void None %fn_type
+ %param = OpFunctionParameter %str
+ %foo_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+ %main = OpFunction %void None %ep_type
+ %main_start = OpLabel
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+tint_symbol_4 = struct @align(4) {
+ tint_symbol:i32 @offset(0)
+ tint_symbol_1:i32 @offset(4)
+ tint_symbol_2:i32 @offset(32)
+ tint_symbol_3:i32 @offset(64)
+}
+
+%1 = func(%2:tint_symbol_4):void -> %b1 {
+ %b1 = block {
+ ret
+ }
+}
+)");
+}
+
+} // namespace tint::spirv::reader
diff --git a/src/tint/lang/spirv/reader/parser/var_test.cc b/src/tint/lang/spirv/reader/parser/var_test.cc
index c1985ac..28d2a66 100644
--- a/src/tint/lang/spirv/reader/parser/var_test.cc
+++ b/src/tint/lang/spirv/reader/parser/var_test.cc
@@ -142,5 +142,41 @@
)");
}
+TEST_F(SpirvParserTest, UniformVar) {
+ EXPECT_IR(R"(
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %1 "main"
+ OpExecutionMode %1 LocalSize 1 1 1
+ OpDecorate %str Block
+ OpMemberDecorate %str 0 Offset 0
+ %void = OpTypeVoid
+ %uint = OpTypeInt 32 0
+ %str = OpTypeStruct %uint
+%_ptr_Uniform_str = OpTypePointer Uniform %str
+ %5 = OpTypeFunction %void
+ %6 = OpVariable %_ptr_Uniform_str Uniform
+ %1 = OpFunction %void None %5
+ %7 = OpLabel
+ OpReturn
+ OpFunctionEnd
+)",
+ R"(
+tint_symbol_1 = struct @align(4) {
+ tint_symbol:u32 @offset(0)
+}
+
+%b1 = block { # root
+ %1:ptr<uniform, tint_symbol_1, read_write> = var
+}
+
+%main = @compute @workgroup_size(1, 1, 1) func():void -> %b2 {
+ %b2 = block {
+ ret
+ }
+}
+)");
+}
+
} // namespace
} // namespace tint::spirv::reader
diff --git a/src/tint/lang/wgsl/ast/transform/builtin_polyfill.cc b/src/tint/lang/wgsl/ast/transform/builtin_polyfill.cc
index 101c72a..e04e712 100644
--- a/src/tint/lang/wgsl/ast/transform/builtin_polyfill.cc
+++ b/src/tint/lang/wgsl/ast/transform/builtin_polyfill.cc
@@ -947,18 +947,19 @@
/// Builds the polyfill function for the `pack4xI8` builtin
/// @return the polyfill function name
Symbol Pack4xI8() {
- using vec4i = vec4<i32>;
using vec4u = vec4<u32>;
auto name = b.Symbols().New("tint_pack_4xi8");
auto body = tint::Vector{
// const n = vec4u(0, 8, 16, 24);
- // let a_i8 = vec4u((a & vec4i(0xff)) << n);
- // return dot(a_i8, vec4u(1));
+ // let a_u32 = bitcast<vec4u>(a);
+ // let a_u8 = (a_u32 & vec4u(0xff)) << n;
+ // return dot(a_u8, vec4u(1));
b.Decl(b.Const("n", b.Call<vec4u>(0_a, 8_a, 16_a, 24_a))),
- b.Decl(b.Let("a_i8", b.Call<vec4u>(b.Shl(b.And("a", b.Call<vec4i>(0xff_a)), "n")))),
- b.Return(b.Call("dot", "a_i8", b.Call<vec4u>(1_a))),
+ b.Decl(b.Let("a_u32", b.Bitcast<vec4u>("a"))),
+ b.Decl(b.Let("a_u8", b.Shl(b.And("a_u32", b.Call<vec4u>(0xff_a)), "n"))),
+ b.Return(b.Call("dot", "a_u8", b.Call<vec4u>(1_a))),
};
b.Func(name,
tint::Vector{
@@ -993,6 +994,114 @@
return name;
}
+ /// Builds the polyfill function for the `pack4xI8Clamp` builtin
+ /// @return the polyfill function name
+ Symbol Pack4xI8Clamp() {
+ using vec4i = vec4<i32>;
+ using vec4u = vec4<u32>;
+
+ auto name = b.Symbols().New("tint_pack_4xi8_clamp");
+
+ auto body = tint::Vector{
+ // const n = vec4u(0, 8, 16, 24);
+ // let a_clamp = clamp(a, vec4i(-128), vec4i(127));
+ // let a_u32 = bitcast<vec4u>(a_clamp);
+ // let a_u8 = (a_u32 & vec4u(0xff)) << n;
+ // return dot(a_u8, vec4u(1));
+ b.Decl(b.Const("n", b.Call<vec4u>(0_a, 8_a, 16_a, 24_a))),
+ b.Decl(b.Let("a_clamp",
+ b.Call("clamp", "a", b.Call<vec4i>(-128_a), b.Call<vec4i>(127_a)))),
+ b.Decl(b.Let("a_u32", b.Bitcast<vec4u>("a_clamp"))),
+ b.Decl(b.Let("a_u8", b.Shl(b.And("a_u32", b.Call<vec4u>(0xff_a)), "n"))),
+ b.Return(b.Call("dot", "a_u8", b.Call<vec4u>(1_a))),
+ };
+ b.Func(name,
+ tint::Vector{
+ b.Param("a", b.ty.vec4<i32>()),
+ },
+ b.ty.u32(), body);
+
+ return name;
+ }
+
+ /// Builds the polyfill function for the `pack4xU8Clamp` builtin
+ /// @return the polyfill function name
+ Symbol Pack4xU8Clamp() {
+ using vec4u = vec4<u32>;
+
+ auto name = b.Symbols().New("tint_pack_4xu8_clamp");
+
+ auto body = tint::Vector{
+ // const n = vec4u(0, 8, 16, 24);
+ // let a_clamp = clamp(a, vec4u(0), vec4u(255));
+ // let a_u8 = a_clamp << n;
+ // return dot(a_u8, vec4u(1));
+ b.Decl(b.Const("n", b.Call<vec4u>(0_a, 8_a, 16_a, 24_a))),
+ b.Decl(
+ b.Let("a_clamp", b.Call("clamp", "a", b.Call<vec4u>(0_a), b.Call<vec4u>(255_a)))),
+ b.Decl(b.Let("a_u8", b.Call<vec4u>(b.Shl("a_clamp", "n")))),
+ b.Return(b.Call("dot", "a_u8", b.Call<vec4u>(1_a))),
+ };
+ b.Func(name,
+ tint::Vector{
+ b.Param("a", b.ty.vec4<u32>()),
+ },
+ b.ty.u32(), body);
+
+ return name;
+ }
+
+ /// Builds the polyfill function for the `unpack4xI8` builtin
+ /// @return the polyfill function name
+ Symbol Unpack4xI8() {
+ using vec4i = vec4<i32>;
+ using vec4u = vec4<u32>;
+
+ auto name = b.Symbols().New("tint_unpack_4xi8");
+
+ auto body = tint::Vector{
+ // const n = vec4u(24, 16, 8, 0);
+ // let a_vec4u = vec4u(a);
+ // let a_vec4i = bitcast<vec4i>(a_vec4u << n);
+ // return a_vec4i >> vec4u(24);
+ b.Decl(b.Const("n", b.Call<vec4u>(24_a, 16_a, 8_a, 0_a))),
+ b.Decl(b.Let("a_vec4u", b.Call<vec4u>("a"))),
+ b.Decl(b.Let("a_vec4i", b.Bitcast<vec4i>(b.Shl("a_vec4u", "n")))),
+ b.Return(b.Shr("a_vec4i", b.Call<vec4u>(24_a))),
+ };
+ b.Func(name,
+ tint::Vector{
+ b.Param("a", b.ty.u32()),
+ },
+ b.ty.vec4<i32>(), body);
+
+ return name;
+ }
+
+ /// Builds the polyfill function for the `unpack4xU8` builtin
+ /// @return the polyfill function name
+ Symbol Unpack4xU8() {
+ using vec4u = vec4<u32>;
+
+ auto name = b.Symbols().New("tint_unpack_4xu8");
+
+ auto body = tint::Vector{
+ // const n = vec4u(0, 8, 16, 24);
+ // const a_vec4u = vec4u(a) >> n;
+ // return a_vec4u & vec4u(0xff);
+ b.Decl(b.Const("n", b.Call<vec4u>(0_a, 8_a, 16_a, 24_a))),
+ b.Decl(b.Let("a_vec4u", b.Shr(b.Call<vec4u>("a"), "n"))),
+ b.Return(b.And("a_vec4u", b.Call<vec4u>(0xff_a))),
+ };
+ b.Func(name,
+ tint::Vector{
+ b.Param("a", b.ty.u32()),
+ },
+ b.ty.vec4<u32>(), body);
+
+ return name;
+ }
+
////////////////////////////////////////////////////////////////////////////
// Inline polyfills
////////////////////////////////////////////////////////////////////////////
@@ -1407,6 +1516,38 @@
return Symbol{};
}
+ case wgsl::BuiltinFn::kPack4XI8Clamp: {
+ if (cfg.builtins.pack_unpack_4x8) {
+ return builtin_polyfills.GetOrCreate(builtin,
+ [&] { return Pack4xI8Clamp(); });
+ }
+ return Symbol{};
+ }
+
+ case wgsl::BuiltinFn::kPack4XU8Clamp: {
+ if (cfg.builtins.pack_unpack_4x8) {
+ return builtin_polyfills.GetOrCreate(builtin,
+ [&] { return Pack4xU8Clamp(); });
+ }
+ return Symbol{};
+ }
+
+ case wgsl::BuiltinFn::kUnpack4XI8: {
+ if (cfg.builtins.pack_unpack_4x8) {
+ return builtin_polyfills.GetOrCreate(builtin,
+ [&] { return Unpack4xI8(); });
+ }
+ return Symbol{};
+ }
+
+ case wgsl::BuiltinFn::kUnpack4XU8: {
+ if (cfg.builtins.pack_unpack_4x8) {
+ return builtin_polyfills.GetOrCreate(builtin,
+ [&] { return Unpack4xU8(); });
+ }
+ return Symbol{};
+ }
+
default:
return Symbol{};
}
diff --git a/src/tint/lang/wgsl/ast/transform/builtin_polyfill_test.cc b/src/tint/lang/wgsl/ast/transform/builtin_polyfill_test.cc
index d784775..dcf24ee 100644
--- a/src/tint/lang/wgsl/ast/transform/builtin_polyfill_test.cc
+++ b/src/tint/lang/wgsl/ast/transform/builtin_polyfill_test.cc
@@ -4135,8 +4135,9 @@
auto* expect = R"(
fn tint_pack_4xi8(a : vec4<i32>) -> u32 {
const n = vec4<u32>(0, 8, 16, 24);
- let a_i8 = vec4<u32>(((a & vec4<i32>(255)) << n));
- return dot(a_i8, vec4<u32>(1));
+ let a_u32 = bitcast<vec4<u32>>(a);
+ let a_u8 = ((a_u32 & vec4<u32>(255)) << n);
+ return dot(a_u8, vec4<u32>(1));
}
fn f() {
@@ -4176,6 +4177,114 @@
EXPECT_EQ(expect, str(got));
}
+TEST_F(BuiltinPolyfillTest, Pack4xI8Clamp) {
+ auto* src = R"(
+fn f() {
+ let v1 = vec4i(127, 128, -128, -129);
+ _ = pack4xI8Clamp(v1);
+}
+)";
+
+ auto* expect = R"(
+fn tint_pack_4xi8_clamp(a : vec4<i32>) -> u32 {
+ const n = vec4<u32>(0, 8, 16, 24);
+ let a_clamp = clamp(a, vec4<i32>(-128), vec4<i32>(127));
+ let a_u32 = bitcast<vec4<u32>>(a_clamp);
+ let a_u8 = ((a_u32 & vec4<u32>(255)) << n);
+ return dot(a_u8, vec4<u32>(1));
+}
+
+fn f() {
+ let v1 = vec4i(127, 128, -(128), -(129));
+ _ = tint_pack_4xi8_clamp(v1);
+}
+)";
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillPacked4x8IntegerDotProduct());
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(BuiltinPolyfillTest, Pack4xU8Clamp) {
+ auto* src = R"(
+fn f() {
+ let v1 = vec4u(0, 254, 255, 256);
+ _ = pack4xU8Clamp(v1);
+}
+)";
+
+ auto* expect = R"(
+fn tint_pack_4xu8_clamp(a : vec4<u32>) -> u32 {
+ const n = vec4<u32>(0, 8, 16, 24);
+ let a_clamp = clamp(a, vec4<u32>(0), vec4<u32>(255));
+ let a_u8 = vec4<u32>((a_clamp << n));
+ return dot(a_u8, vec4<u32>(1));
+}
+
+fn f() {
+ let v1 = vec4u(0, 254, 255, 256);
+ _ = tint_pack_4xu8_clamp(v1);
+}
+)";
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillPacked4x8IntegerDotProduct());
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(BuiltinPolyfillTest, Unpack4xI8) {
+ auto* src = R"(
+fn f() {
+ let v1 = u32(0x01FF02FE);
+ _ = unpack4xI8(v1);
+}
+)";
+
+ auto* expect = R"(
+fn tint_unpack_4xi8(a : u32) -> vec4<i32> {
+ const n = vec4<u32>(24, 16, 8, 0);
+ let a_vec4u = vec4<u32>(a);
+ let a_vec4i = bitcast<vec4<i32>>((a_vec4u << n));
+ return (a_vec4i >> vec4<u32>(24));
+}
+
+fn f() {
+ let v1 = u32(33489662);
+ _ = tint_unpack_4xi8(v1);
+}
+)";
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillPacked4x8IntegerDotProduct());
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(BuiltinPolyfillTest, Unpack4xU8) {
+ auto* src = R"(
+fn f() {
+ let v1 = u32(0xFF01FE02);
+ _ = unpack4xU8(v1);
+}
+)";
+
+ auto* expect = R"(
+fn tint_unpack_4xu8(a : u32) -> vec4<u32> {
+ const n = vec4<u32>(0, 8, 16, 24);
+ let a_vec4u = (vec4<u32>(a) >> n);
+ return (a_vec4u & vec4<u32>(255));
+}
+
+fn f() {
+ let v1 = u32(4278320642);
+ _ = tint_unpack_4xu8(v1);
+}
+)";
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillPacked4x8IntegerDotProduct());
+
+ EXPECT_EQ(expect, str(got));
+}
+
////////////////////////////////////////////////////////////////////////////////
// Polyfill combinations
////////////////////////////////////////////////////////////////////////////////
diff --git a/src/tint/lang/wgsl/builtin_fn.cc b/src/tint/lang/wgsl/builtin_fn.cc
index 95f1fe0..46942f3 100644
--- a/src/tint/lang/wgsl/builtin_fn.cc
+++ b/src/tint/lang/wgsl/builtin_fn.cc
@@ -225,6 +225,12 @@
if (name == "pack4xU8") {
return BuiltinFn::kPack4XU8;
}
+ if (name == "pack4xI8Clamp") {
+ return BuiltinFn::kPack4XI8Clamp;
+ }
+ if (name == "pack4xU8Clamp") {
+ return BuiltinFn::kPack4XU8Clamp;
+ }
if (name == "pow") {
return BuiltinFn::kPow;
}
@@ -300,6 +306,12 @@
if (name == "unpack4x8unorm") {
return BuiltinFn::kUnpack4X8Unorm;
}
+ if (name == "unpack4xI8") {
+ return BuiltinFn::kUnpack4XI8;
+ }
+ if (name == "unpack4xU8") {
+ return BuiltinFn::kUnpack4XU8;
+ }
if (name == "workgroupBarrier") {
return BuiltinFn::kWorkgroupBarrier;
}
@@ -527,6 +539,10 @@
return "pack4xI8";
case BuiltinFn::kPack4XU8:
return "pack4xU8";
+ case BuiltinFn::kPack4XI8Clamp:
+ return "pack4xI8Clamp";
+ case BuiltinFn::kPack4XU8Clamp:
+ return "pack4xU8Clamp";
case BuiltinFn::kPow:
return "pow";
case BuiltinFn::kQuantizeToF16:
@@ -577,6 +593,10 @@
return "unpack4x8snorm";
case BuiltinFn::kUnpack4X8Unorm:
return "unpack4x8unorm";
+ case BuiltinFn::kUnpack4XI8:
+ return "unpack4xI8";
+ case BuiltinFn::kUnpack4XU8:
+ return "unpack4xU8";
case BuiltinFn::kWorkgroupBarrier:
return "workgroupBarrier";
case BuiltinFn::kWorkgroupUniformLoad:
@@ -706,7 +726,9 @@
bool IsPacked4x8IntegerDotProductBuiltin(BuiltinFn f) {
return f == BuiltinFn::kDot4I8Packed || f == BuiltinFn::kDot4U8Packed ||
- f == BuiltinFn::kPack4XI8 || f == BuiltinFn::kPack4XU8;
+ f == BuiltinFn::kPack4XI8 || f == BuiltinFn::kPack4XU8 ||
+ f == BuiltinFn::kPack4XI8Clamp || f == BuiltinFn::kPack4XU8Clamp ||
+ f == BuiltinFn::kUnpack4XI8 || f == BuiltinFn::kUnpack4XU8;
}
bool IsSubgroup(BuiltinFn f) {
diff --git a/src/tint/lang/wgsl/builtin_fn.cc.tmpl b/src/tint/lang/wgsl/builtin_fn.cc.tmpl
index 375198d..ee359d0 100644
--- a/src/tint/lang/wgsl/builtin_fn.cc.tmpl
+++ b/src/tint/lang/wgsl/builtin_fn.cc.tmpl
@@ -102,7 +102,9 @@
bool IsPacked4x8IntegerDotProductBuiltin(BuiltinFn f) {
return f == BuiltinFn::kDot4I8Packed || f == BuiltinFn::kDot4U8Packed ||
- f == BuiltinFn::kPack4XI8 || f == BuiltinFn::kPack4XU8;
+ f == BuiltinFn::kPack4XI8 || f == BuiltinFn::kPack4XU8 ||
+ f == BuiltinFn::kPack4XI8Clamp || f == BuiltinFn::kPack4XU8Clamp ||
+ f == BuiltinFn::kUnpack4XI8 || f == BuiltinFn::kUnpack4XU8;
}
bool IsSubgroup(BuiltinFn f) {
diff --git a/src/tint/lang/wgsl/builtin_fn.h b/src/tint/lang/wgsl/builtin_fn.h
index 22b2a71..e9daac4 100644
--- a/src/tint/lang/wgsl/builtin_fn.h
+++ b/src/tint/lang/wgsl/builtin_fn.h
@@ -109,6 +109,8 @@
kPack4X8Unorm,
kPack4XI8,
kPack4XU8,
+ kPack4XI8Clamp,
+ kPack4XU8Clamp,
kPow,
kQuantizeToF16,
kRadians,
@@ -134,6 +136,8 @@
kUnpack2X16Unorm,
kUnpack4X8Snorm,
kUnpack4X8Unorm,
+ kUnpack4XI8,
+ kUnpack4XU8,
kWorkgroupBarrier,
kWorkgroupUniformLoad,
kTextureBarrier,
@@ -250,6 +254,8 @@
BuiltinFn::kPack4X8Unorm,
BuiltinFn::kPack4XI8,
BuiltinFn::kPack4XU8,
+ BuiltinFn::kPack4XI8Clamp,
+ BuiltinFn::kPack4XU8Clamp,
BuiltinFn::kPow,
BuiltinFn::kQuantizeToF16,
BuiltinFn::kRadians,
@@ -275,6 +281,8 @@
BuiltinFn::kUnpack2X16Unorm,
BuiltinFn::kUnpack4X8Snorm,
BuiltinFn::kUnpack4X8Unorm,
+ BuiltinFn::kUnpack4XI8,
+ BuiltinFn::kUnpack4XU8,
BuiltinFn::kWorkgroupBarrier,
BuiltinFn::kWorkgroupUniformLoad,
BuiltinFn::kTextureBarrier,
@@ -373,6 +381,8 @@
"pack4x8unorm",
"pack4xI8",
"pack4xU8",
+ "pack4xI8Clamp",
+ "pack4xU8Clamp",
"pow",
"quantizeToF16",
"radians",
@@ -398,6 +408,8 @@
"unpack2x16unorm",
"unpack4x8snorm",
"unpack4x8unorm",
+ "unpack4xI8",
+ "unpack4xU8",
"workgroupBarrier",
"workgroupUniformLoad",
"textureBarrier",
diff --git a/src/tint/lang/wgsl/intrinsic/data.cc b/src/tint/lang/wgsl/intrinsic/data.cc
index 27396f7..73b6fa4 100644
--- a/src/tint/lang/wgsl/intrinsic/data.cc
+++ b/src/tint/lang/wgsl/intrinsic/data.cc
@@ -4844,63 +4844,67 @@
/* [49] */ &core::constant::Eval::pack4x8unorm,
/* [50] */ &core::constant::Eval::pack4xI8,
/* [51] */ &core::constant::Eval::pack4xU8,
- /* [52] */ &core::constant::Eval::pow,
- /* [53] */ &core::constant::Eval::quantizeToF16,
- /* [54] */ &core::constant::Eval::radians,
- /* [55] */ &core::constant::Eval::reflect,
- /* [56] */ &core::constant::Eval::refract,
- /* [57] */ &core::constant::Eval::reverseBits,
- /* [58] */ &core::constant::Eval::round,
- /* [59] */ &core::constant::Eval::saturate,
- /* [60] */ &core::constant::Eval::select_bool,
- /* [61] */ &core::constant::Eval::select_boolvec,
- /* [62] */ &core::constant::Eval::sign,
- /* [63] */ &core::constant::Eval::sin,
- /* [64] */ &core::constant::Eval::sinh,
- /* [65] */ &core::constant::Eval::smoothstep,
- /* [66] */ &core::constant::Eval::sqrt,
- /* [67] */ &core::constant::Eval::step,
- /* [68] */ &core::constant::Eval::tan,
- /* [69] */ &core::constant::Eval::tanh,
- /* [70] */ &core::constant::Eval::transpose,
- /* [71] */ &core::constant::Eval::trunc,
- /* [72] */ &core::constant::Eval::unpack2x16float,
- /* [73] */ &core::constant::Eval::unpack2x16snorm,
- /* [74] */ &core::constant::Eval::unpack2x16unorm,
- /* [75] */ &core::constant::Eval::unpack4x8snorm,
- /* [76] */ &core::constant::Eval::unpack4x8unorm,
- /* [77] */ &core::constant::Eval::Identity,
- /* [78] */ &core::constant::Eval::Not,
- /* [79] */ &core::constant::Eval::Complement,
- /* [80] */ &core::constant::Eval::UnaryMinus,
- /* [81] */ &core::constant::Eval::Plus,
- /* [82] */ &core::constant::Eval::Minus,
- /* [83] */ &core::constant::Eval::Multiply,
- /* [84] */ &core::constant::Eval::MultiplyMatVec,
- /* [85] */ &core::constant::Eval::MultiplyVecMat,
- /* [86] */ &core::constant::Eval::MultiplyMatMat,
- /* [87] */ &core::constant::Eval::Divide,
- /* [88] */ &core::constant::Eval::Modulo,
- /* [89] */ &core::constant::Eval::Xor,
- /* [90] */ &core::constant::Eval::And,
- /* [91] */ &core::constant::Eval::Or,
- /* [92] */ &core::constant::Eval::LogicalAnd,
- /* [93] */ &core::constant::Eval::LogicalOr,
- /* [94] */ &core::constant::Eval::Equal,
- /* [95] */ &core::constant::Eval::NotEqual,
- /* [96] */ &core::constant::Eval::LessThan,
- /* [97] */ &core::constant::Eval::GreaterThan,
- /* [98] */ &core::constant::Eval::LessThanEqual,
- /* [99] */ &core::constant::Eval::GreaterThanEqual,
- /* [100] */ &core::constant::Eval::ShiftLeft,
- /* [101] */ &core::constant::Eval::ShiftRight,
- /* [102] */ &core::constant::Eval::Zero,
- /* [103] */ &core::constant::Eval::Conv,
- /* [104] */ &core::constant::Eval::VecSplat,
- /* [105] */ &core::constant::Eval::VecInitS,
- /* [106] */ &core::constant::Eval::VecInitM,
- /* [107] */ &core::constant::Eval::MatInitS,
- /* [108] */ &core::constant::Eval::MatInitV,
+ /* [52] */ &core::constant::Eval::pack4xI8Clamp,
+ /* [53] */ &core::constant::Eval::pack4xU8Clamp,
+ /* [54] */ &core::constant::Eval::pow,
+ /* [55] */ &core::constant::Eval::quantizeToF16,
+ /* [56] */ &core::constant::Eval::radians,
+ /* [57] */ &core::constant::Eval::reflect,
+ /* [58] */ &core::constant::Eval::refract,
+ /* [59] */ &core::constant::Eval::reverseBits,
+ /* [60] */ &core::constant::Eval::round,
+ /* [61] */ &core::constant::Eval::saturate,
+ /* [62] */ &core::constant::Eval::select_bool,
+ /* [63] */ &core::constant::Eval::select_boolvec,
+ /* [64] */ &core::constant::Eval::sign,
+ /* [65] */ &core::constant::Eval::sin,
+ /* [66] */ &core::constant::Eval::sinh,
+ /* [67] */ &core::constant::Eval::smoothstep,
+ /* [68] */ &core::constant::Eval::sqrt,
+ /* [69] */ &core::constant::Eval::step,
+ /* [70] */ &core::constant::Eval::tan,
+ /* [71] */ &core::constant::Eval::tanh,
+ /* [72] */ &core::constant::Eval::transpose,
+ /* [73] */ &core::constant::Eval::trunc,
+ /* [74] */ &core::constant::Eval::unpack2x16float,
+ /* [75] */ &core::constant::Eval::unpack2x16snorm,
+ /* [76] */ &core::constant::Eval::unpack2x16unorm,
+ /* [77] */ &core::constant::Eval::unpack4x8snorm,
+ /* [78] */ &core::constant::Eval::unpack4x8unorm,
+ /* [79] */ &core::constant::Eval::unpack4xI8,
+ /* [80] */ &core::constant::Eval::unpack4xU8,
+ /* [81] */ &core::constant::Eval::Identity,
+ /* [82] */ &core::constant::Eval::Not,
+ /* [83] */ &core::constant::Eval::Complement,
+ /* [84] */ &core::constant::Eval::UnaryMinus,
+ /* [85] */ &core::constant::Eval::Plus,
+ /* [86] */ &core::constant::Eval::Minus,
+ /* [87] */ &core::constant::Eval::Multiply,
+ /* [88] */ &core::constant::Eval::MultiplyMatVec,
+ /* [89] */ &core::constant::Eval::MultiplyVecMat,
+ /* [90] */ &core::constant::Eval::MultiplyMatMat,
+ /* [91] */ &core::constant::Eval::Divide,
+ /* [92] */ &core::constant::Eval::Modulo,
+ /* [93] */ &core::constant::Eval::Xor,
+ /* [94] */ &core::constant::Eval::And,
+ /* [95] */ &core::constant::Eval::Or,
+ /* [96] */ &core::constant::Eval::LogicalAnd,
+ /* [97] */ &core::constant::Eval::LogicalOr,
+ /* [98] */ &core::constant::Eval::Equal,
+ /* [99] */ &core::constant::Eval::NotEqual,
+ /* [100] */ &core::constant::Eval::LessThan,
+ /* [101] */ &core::constant::Eval::GreaterThan,
+ /* [102] */ &core::constant::Eval::LessThanEqual,
+ /* [103] */ &core::constant::Eval::GreaterThanEqual,
+ /* [104] */ &core::constant::Eval::ShiftLeft,
+ /* [105] */ &core::constant::Eval::ShiftRight,
+ /* [106] */ &core::constant::Eval::Zero,
+ /* [107] */ &core::constant::Eval::Conv,
+ /* [108] */ &core::constant::Eval::VecSplat,
+ /* [109] */ &core::constant::Eval::VecInitS,
+ /* [110] */ &core::constant::Eval::VecInitM,
+ /* [111] */ &core::constant::Eval::MatInitS,
+ /* [112] */ &core::constant::Eval::MatInitV,
};
static_assert(ConstEvalFunctionIndex::CanIndex(kConstEvalFunctions),
@@ -5542,7 +5546,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(96),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [49] */
@@ -5555,7 +5559,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(54),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [50] */
@@ -5568,7 +5572,7 @@
/* parameters */ ParameterIndex(217),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(54),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [51] */
@@ -5581,7 +5585,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(54),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(104),
+ /* const_eval_fn */ ConstEvalFunctionIndex(108),
},
{
/* [52] */
@@ -5594,7 +5598,7 @@
/* parameters */ ParameterIndex(205),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(54),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [53] */
@@ -5607,7 +5611,7 @@
/* parameters */ ParameterIndex(295),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(54),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [54] */
@@ -5620,7 +5624,7 @@
/* parameters */ ParameterIndex(298),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(54),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [55] */
@@ -5633,7 +5637,7 @@
/* parameters */ ParameterIndex(301),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(54),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [56] */
@@ -5646,7 +5650,7 @@
/* parameters */ ParameterIndex(362),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(54),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [57] */
@@ -5659,7 +5663,7 @@
/* parameters */ ParameterIndex(364),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(54),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [58] */
@@ -5672,7 +5676,7 @@
/* parameters */ ParameterIndex(366),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(54),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [59] */
@@ -5685,7 +5689,7 @@
/* parameters */ ParameterIndex(385),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(28),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [60] */
@@ -5698,7 +5702,7 @@
/* parameters */ ParameterIndex(385),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(100),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [61] */
@@ -5711,7 +5715,7 @@
/* parameters */ ParameterIndex(385),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(30),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [62] */
@@ -5724,7 +5728,7 @@
/* parameters */ ParameterIndex(385),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(32),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [63] */
@@ -5737,7 +5741,7 @@
/* parameters */ ParameterIndex(385),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(102),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [64] */
@@ -6439,7 +6443,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(90),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [118] */
@@ -6452,7 +6456,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [119] */
@@ -6465,7 +6469,7 @@
/* parameters */ ParameterIndex(213),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [120] */
@@ -6478,7 +6482,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(104),
+ /* const_eval_fn */ ConstEvalFunctionIndex(108),
},
{
/* [121] */
@@ -6491,7 +6495,7 @@
/* parameters */ ParameterIndex(205),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [122] */
@@ -6504,7 +6508,7 @@
/* parameters */ ParameterIndex(295),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [123] */
@@ -6517,7 +6521,7 @@
/* parameters */ ParameterIndex(298),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(10),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(106),
+ /* const_eval_fn */ ConstEvalFunctionIndex(110),
},
{
/* [124] */
@@ -6530,7 +6534,7 @@
/* parameters */ ParameterIndex(384),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(58),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [125] */
@@ -6543,7 +6547,7 @@
/* parameters */ ParameterIndex(384),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(92),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [126] */
@@ -6556,7 +6560,7 @@
/* parameters */ ParameterIndex(384),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(68),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [127] */
@@ -6569,7 +6573,7 @@
/* parameters */ ParameterIndex(384),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(44),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [128] */
@@ -6582,7 +6586,7 @@
/* parameters */ ParameterIndex(384),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(94),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [129] */
@@ -6725,7 +6729,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(84),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [140] */
@@ -6738,7 +6742,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(74),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [141] */
@@ -6751,7 +6755,7 @@
/* parameters */ ParameterIndex(209),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(74),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [142] */
@@ -6764,7 +6768,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(74),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(104),
+ /* const_eval_fn */ ConstEvalFunctionIndex(108),
},
{
/* [143] */
@@ -6777,7 +6781,7 @@
/* parameters */ ParameterIndex(205),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(74),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(105),
+ /* const_eval_fn */ ConstEvalFunctionIndex(109),
},
{
/* [144] */
@@ -6790,7 +6794,7 @@
/* parameters */ ParameterIndex(383),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(26),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [145] */
@@ -6803,7 +6807,7 @@
/* parameters */ ParameterIndex(383),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(86),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [146] */
@@ -6816,7 +6820,7 @@
/* parameters */ ParameterIndex(383),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(56),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [147] */
@@ -6829,7 +6833,7 @@
/* parameters */ ParameterIndex(383),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(38),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [148] */
@@ -6842,7 +6846,7 @@
/* parameters */ ParameterIndex(383),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(88),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [149] */
@@ -6855,7 +6859,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(83),
+ /* const_eval_fn */ ConstEvalFunctionIndex(87),
},
{
/* [150] */
@@ -6868,7 +6872,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(83),
+ /* const_eval_fn */ ConstEvalFunctionIndex(87),
},
{
/* [151] */
@@ -6881,7 +6885,7 @@
/* parameters */ ParameterIndex(223),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(83),
+ /* const_eval_fn */ ConstEvalFunctionIndex(87),
},
{
/* [152] */
@@ -6894,7 +6898,7 @@
/* parameters */ ParameterIndex(350),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(83),
+ /* const_eval_fn */ ConstEvalFunctionIndex(87),
},
{
/* [153] */
@@ -6907,7 +6911,7 @@
/* parameters */ ParameterIndex(355),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(2),
- /* const_eval_fn */ ConstEvalFunctionIndex(83),
+ /* const_eval_fn */ ConstEvalFunctionIndex(87),
},
{
/* [154] */
@@ -6920,7 +6924,7 @@
/* parameters */ ParameterIndex(354),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(2),
- /* const_eval_fn */ ConstEvalFunctionIndex(83),
+ /* const_eval_fn */ ConstEvalFunctionIndex(87),
},
{
/* [155] */
@@ -6933,7 +6937,7 @@
/* parameters */ ParameterIndex(356),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(3),
- /* const_eval_fn */ ConstEvalFunctionIndex(84),
+ /* const_eval_fn */ ConstEvalFunctionIndex(88),
},
{
/* [156] */
@@ -6946,7 +6950,7 @@
/* parameters */ ParameterIndex(358),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(85),
+ /* const_eval_fn */ ConstEvalFunctionIndex(89),
},
{
/* [157] */
@@ -6959,7 +6963,7 @@
/* parameters */ ParameterIndex(360),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(20),
- /* const_eval_fn */ ConstEvalFunctionIndex(86),
+ /* const_eval_fn */ ConstEvalFunctionIndex(90),
},
{
/* [158] */
@@ -7414,7 +7418,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(104),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [193] */
@@ -7427,7 +7431,7 @@
/* parameters */ ParameterIndex(386),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(104),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [194] */
@@ -7440,7 +7444,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(104),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(107),
+ /* const_eval_fn */ ConstEvalFunctionIndex(111),
},
{
/* [195] */
@@ -7453,7 +7457,7 @@
/* parameters */ ParameterIndex(209),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(104),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(108),
+ /* const_eval_fn */ ConstEvalFunctionIndex(112),
},
{
/* [196] */
@@ -7466,7 +7470,7 @@
/* parameters */ ParameterIndex(387),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(106),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [197] */
@@ -7479,7 +7483,7 @@
/* parameters */ ParameterIndex(388),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(108),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [198] */
@@ -7492,7 +7496,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(110),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [199] */
@@ -7505,7 +7509,7 @@
/* parameters */ ParameterIndex(389),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(110),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [200] */
@@ -7518,7 +7522,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(110),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(107),
+ /* const_eval_fn */ ConstEvalFunctionIndex(111),
},
{
/* [201] */
@@ -7531,7 +7535,7 @@
/* parameters */ ParameterIndex(213),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(110),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(108),
+ /* const_eval_fn */ ConstEvalFunctionIndex(112),
},
{
/* [202] */
@@ -7544,7 +7548,7 @@
/* parameters */ ParameterIndex(390),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(112),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [203] */
@@ -7557,7 +7561,7 @@
/* parameters */ ParameterIndex(391),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(114),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [204] */
@@ -7570,7 +7574,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(116),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [205] */
@@ -7583,7 +7587,7 @@
/* parameters */ ParameterIndex(392),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(116),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [206] */
@@ -7596,7 +7600,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(116),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(107),
+ /* const_eval_fn */ ConstEvalFunctionIndex(111),
},
{
/* [207] */
@@ -7609,7 +7613,7 @@
/* parameters */ ParameterIndex(217),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(116),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(108),
+ /* const_eval_fn */ ConstEvalFunctionIndex(112),
},
{
/* [208] */
@@ -7622,7 +7626,7 @@
/* parameters */ ParameterIndex(393),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(118),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [209] */
@@ -7635,7 +7639,7 @@
/* parameters */ ParameterIndex(394),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(120),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [210] */
@@ -7648,7 +7652,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(122),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [211] */
@@ -7661,7 +7665,7 @@
/* parameters */ ParameterIndex(395),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(122),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [212] */
@@ -7674,7 +7678,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(122),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(107),
+ /* const_eval_fn */ ConstEvalFunctionIndex(111),
},
{
/* [213] */
@@ -7687,7 +7691,7 @@
/* parameters */ ParameterIndex(209),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(122),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(108),
+ /* const_eval_fn */ ConstEvalFunctionIndex(112),
},
{
/* [214] */
@@ -7700,7 +7704,7 @@
/* parameters */ ParameterIndex(396),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(124),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [215] */
@@ -7713,7 +7717,7 @@
/* parameters */ ParameterIndex(397),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(126),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [216] */
@@ -7726,7 +7730,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(128),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [217] */
@@ -7739,7 +7743,7 @@
/* parameters */ ParameterIndex(398),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(128),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [218] */
@@ -7752,7 +7756,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(128),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(107),
+ /* const_eval_fn */ ConstEvalFunctionIndex(111),
},
{
/* [219] */
@@ -7765,7 +7769,7 @@
/* parameters */ ParameterIndex(213),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(128),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(108),
+ /* const_eval_fn */ ConstEvalFunctionIndex(112),
},
{
/* [220] */
@@ -7778,7 +7782,7 @@
/* parameters */ ParameterIndex(399),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(130),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [221] */
@@ -7791,7 +7795,7 @@
/* parameters */ ParameterIndex(400),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(132),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [222] */
@@ -7804,7 +7808,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(134),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [223] */
@@ -7817,7 +7821,7 @@
/* parameters */ ParameterIndex(401),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(134),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [224] */
@@ -7830,7 +7834,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(134),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(107),
+ /* const_eval_fn */ ConstEvalFunctionIndex(111),
},
{
/* [225] */
@@ -7843,7 +7847,7 @@
/* parameters */ ParameterIndex(217),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(134),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(108),
+ /* const_eval_fn */ ConstEvalFunctionIndex(112),
},
{
/* [226] */
@@ -7856,7 +7860,7 @@
/* parameters */ ParameterIndex(402),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(136),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [227] */
@@ -7869,7 +7873,7 @@
/* parameters */ ParameterIndex(403),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(138),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [228] */
@@ -7882,7 +7886,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(140),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [229] */
@@ -7895,7 +7899,7 @@
/* parameters */ ParameterIndex(404),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(140),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [230] */
@@ -7908,7 +7912,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(140),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(107),
+ /* const_eval_fn */ ConstEvalFunctionIndex(111),
},
{
/* [231] */
@@ -7921,7 +7925,7 @@
/* parameters */ ParameterIndex(209),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(140),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(108),
+ /* const_eval_fn */ ConstEvalFunctionIndex(112),
},
{
/* [232] */
@@ -7934,7 +7938,7 @@
/* parameters */ ParameterIndex(405),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(142),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [233] */
@@ -7947,7 +7951,7 @@
/* parameters */ ParameterIndex(406),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(144),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [234] */
@@ -7960,7 +7964,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(146),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [235] */
@@ -7973,7 +7977,7 @@
/* parameters */ ParameterIndex(407),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(146),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [236] */
@@ -7986,7 +7990,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(146),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(107),
+ /* const_eval_fn */ ConstEvalFunctionIndex(111),
},
{
/* [237] */
@@ -7999,7 +8003,7 @@
/* parameters */ ParameterIndex(213),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(146),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(108),
+ /* const_eval_fn */ ConstEvalFunctionIndex(112),
},
{
/* [238] */
@@ -8012,7 +8016,7 @@
/* parameters */ ParameterIndex(408),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(148),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [239] */
@@ -8025,7 +8029,7 @@
/* parameters */ ParameterIndex(409),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(150),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [240] */
@@ -8038,7 +8042,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(152),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [241] */
@@ -8051,7 +8055,7 @@
/* parameters */ ParameterIndex(410),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(152),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [242] */
@@ -8064,7 +8068,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(152),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(107),
+ /* const_eval_fn */ ConstEvalFunctionIndex(111),
},
{
/* [243] */
@@ -8077,7 +8081,7 @@
/* parameters */ ParameterIndex(217),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(152),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(108),
+ /* const_eval_fn */ ConstEvalFunctionIndex(112),
},
{
/* [244] */
@@ -8090,7 +8094,7 @@
/* parameters */ ParameterIndex(411),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(154),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [245] */
@@ -8103,7 +8107,7 @@
/* parameters */ ParameterIndex(412),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(156),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [246] */
@@ -8181,7 +8185,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(81),
+ /* const_eval_fn */ ConstEvalFunctionIndex(85),
},
{
/* [252] */
@@ -8194,7 +8198,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(81),
+ /* const_eval_fn */ ConstEvalFunctionIndex(85),
},
{
/* [253] */
@@ -8207,7 +8211,7 @@
/* parameters */ ParameterIndex(223),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(81),
+ /* const_eval_fn */ ConstEvalFunctionIndex(85),
},
{
/* [254] */
@@ -8220,7 +8224,7 @@
/* parameters */ ParameterIndex(350),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(81),
+ /* const_eval_fn */ ConstEvalFunctionIndex(85),
},
{
/* [255] */
@@ -8233,7 +8237,7 @@
/* parameters */ ParameterIndex(353),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(2),
- /* const_eval_fn */ ConstEvalFunctionIndex(81),
+ /* const_eval_fn */ ConstEvalFunctionIndex(85),
},
{
/* [256] */
@@ -8246,7 +8250,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(82),
+ /* const_eval_fn */ ConstEvalFunctionIndex(86),
},
{
/* [257] */
@@ -8259,7 +8263,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(82),
+ /* const_eval_fn */ ConstEvalFunctionIndex(86),
},
{
/* [258] */
@@ -8272,7 +8276,7 @@
/* parameters */ ParameterIndex(223),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(82),
+ /* const_eval_fn */ ConstEvalFunctionIndex(86),
},
{
/* [259] */
@@ -8285,7 +8289,7 @@
/* parameters */ ParameterIndex(350),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(82),
+ /* const_eval_fn */ ConstEvalFunctionIndex(86),
},
{
/* [260] */
@@ -8298,7 +8302,7 @@
/* parameters */ ParameterIndex(353),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(2),
- /* const_eval_fn */ ConstEvalFunctionIndex(82),
+ /* const_eval_fn */ ConstEvalFunctionIndex(86),
},
{
/* [261] */
@@ -8311,7 +8315,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(87),
+ /* const_eval_fn */ ConstEvalFunctionIndex(91),
},
{
/* [262] */
@@ -8324,7 +8328,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(87),
+ /* const_eval_fn */ ConstEvalFunctionIndex(91),
},
{
/* [263] */
@@ -8337,7 +8341,7 @@
/* parameters */ ParameterIndex(223),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(87),
+ /* const_eval_fn */ ConstEvalFunctionIndex(91),
},
{
/* [264] */
@@ -8350,7 +8354,7 @@
/* parameters */ ParameterIndex(350),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(87),
+ /* const_eval_fn */ ConstEvalFunctionIndex(91),
},
{
/* [265] */
@@ -8363,7 +8367,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(88),
+ /* const_eval_fn */ ConstEvalFunctionIndex(92),
},
{
/* [266] */
@@ -8376,7 +8380,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(88),
+ /* const_eval_fn */ ConstEvalFunctionIndex(92),
},
{
/* [267] */
@@ -8389,7 +8393,7 @@
/* parameters */ ParameterIndex(223),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(88),
+ /* const_eval_fn */ ConstEvalFunctionIndex(92),
},
{
/* [268] */
@@ -8402,7 +8406,7 @@
/* parameters */ ParameterIndex(350),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(88),
+ /* const_eval_fn */ ConstEvalFunctionIndex(92),
},
{
/* [269] */
@@ -8415,7 +8419,7 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(90),
+ /* const_eval_fn */ ConstEvalFunctionIndex(94),
},
{
/* [270] */
@@ -8428,7 +8432,7 @@
/* parameters */ ParameterIndex(233),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(90),
+ /* const_eval_fn */ ConstEvalFunctionIndex(94),
},
{
/* [271] */
@@ -8441,7 +8445,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(90),
+ /* const_eval_fn */ ConstEvalFunctionIndex(94),
},
{
/* [272] */
@@ -8454,7 +8458,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(90),
+ /* const_eval_fn */ ConstEvalFunctionIndex(94),
},
{
/* [273] */
@@ -8467,7 +8471,7 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(91),
+ /* const_eval_fn */ ConstEvalFunctionIndex(95),
},
{
/* [274] */
@@ -8480,7 +8484,7 @@
/* parameters */ ParameterIndex(233),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(91),
+ /* const_eval_fn */ ConstEvalFunctionIndex(95),
},
{
/* [275] */
@@ -8493,7 +8497,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(91),
+ /* const_eval_fn */ ConstEvalFunctionIndex(95),
},
{
/* [276] */
@@ -8506,7 +8510,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(91),
+ /* const_eval_fn */ ConstEvalFunctionIndex(95),
},
{
/* [277] */
@@ -8558,7 +8562,7 @@
/* parameters */ ParameterIndex(224),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(60),
+ /* const_eval_fn */ ConstEvalFunctionIndex(62),
},
{
/* [281] */
@@ -8571,7 +8575,7 @@
/* parameters */ ParameterIndex(228),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(60),
+ /* const_eval_fn */ ConstEvalFunctionIndex(62),
},
{
/* [282] */
@@ -8584,7 +8588,7 @@
/* parameters */ ParameterIndex(231),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(61),
+ /* const_eval_fn */ ConstEvalFunctionIndex(63),
},
{
/* [283] */
@@ -8597,7 +8601,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(31),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [284] */
@@ -8610,7 +8614,7 @@
/* parameters */ ParameterIndex(381),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(31),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [285] */
@@ -8623,7 +8627,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(31),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [286] */
@@ -8636,7 +8640,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(33),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [287] */
@@ -8649,7 +8653,7 @@
/* parameters */ ParameterIndex(17),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(33),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [288] */
@@ -8662,7 +8666,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(33),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [289] */
@@ -8675,7 +8679,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(15),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [290] */
@@ -8688,7 +8692,7 @@
/* parameters */ ParameterIndex(370),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(15),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [291] */
@@ -8701,7 +8705,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(15),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [292] */
@@ -8714,7 +8718,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(87),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [293] */
@@ -8727,7 +8731,7 @@
/* parameters */ ParameterIndex(382),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(87),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [294] */
@@ -8740,7 +8744,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(87),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [295] */
@@ -8753,7 +8757,7 @@
/* parameters */ ParameterIndex(/* invalid */),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(102),
+ /* const_eval_fn */ ConstEvalFunctionIndex(106),
},
{
/* [296] */
@@ -8766,7 +8770,7 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
/* [297] */
@@ -8779,7 +8783,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
{
/* [298] */
@@ -9780,7 +9784,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(52),
+ /* const_eval_fn */ ConstEvalFunctionIndex(54),
},
{
/* [375] */
@@ -9793,7 +9797,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(52),
+ /* const_eval_fn */ ConstEvalFunctionIndex(54),
},
{
/* [376] */
@@ -9806,7 +9810,7 @@
/* parameters */ ParameterIndex(370),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(15),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(53),
+ /* const_eval_fn */ ConstEvalFunctionIndex(55),
},
{
/* [377] */
@@ -9819,7 +9823,7 @@
/* parameters */ ParameterIndex(371),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(14),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(53),
+ /* const_eval_fn */ ConstEvalFunctionIndex(55),
},
{
/* [378] */
@@ -9832,7 +9836,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(54),
+ /* const_eval_fn */ ConstEvalFunctionIndex(56),
},
{
/* [379] */
@@ -9845,7 +9849,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(54),
+ /* const_eval_fn */ ConstEvalFunctionIndex(56),
},
{
/* [380] */
@@ -9858,7 +9862,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(57),
+ /* const_eval_fn */ ConstEvalFunctionIndex(59),
},
{
/* [381] */
@@ -9871,7 +9875,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(57),
+ /* const_eval_fn */ ConstEvalFunctionIndex(59),
},
{
/* [382] */
@@ -9884,7 +9888,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(58),
+ /* const_eval_fn */ ConstEvalFunctionIndex(60),
},
{
/* [383] */
@@ -9897,7 +9901,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(58),
+ /* const_eval_fn */ ConstEvalFunctionIndex(60),
},
{
/* [384] */
@@ -9910,7 +9914,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(59),
+ /* const_eval_fn */ ConstEvalFunctionIndex(61),
},
{
/* [385] */
@@ -9923,7 +9927,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(59),
+ /* const_eval_fn */ ConstEvalFunctionIndex(61),
},
{
/* [386] */
@@ -9936,7 +9940,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(62),
+ /* const_eval_fn */ ConstEvalFunctionIndex(64),
},
{
/* [387] */
@@ -9949,7 +9953,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(62),
+ /* const_eval_fn */ ConstEvalFunctionIndex(64),
},
{
/* [388] */
@@ -9962,7 +9966,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(63),
+ /* const_eval_fn */ ConstEvalFunctionIndex(65),
},
{
/* [389] */
@@ -9975,7 +9979,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(63),
+ /* const_eval_fn */ ConstEvalFunctionIndex(65),
},
{
/* [390] */
@@ -9988,7 +9992,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(64),
+ /* const_eval_fn */ ConstEvalFunctionIndex(66),
},
{
/* [391] */
@@ -10001,7 +10005,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(64),
+ /* const_eval_fn */ ConstEvalFunctionIndex(66),
},
{
/* [392] */
@@ -10014,7 +10018,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(65),
+ /* const_eval_fn */ ConstEvalFunctionIndex(67),
},
{
/* [393] */
@@ -10027,7 +10031,7 @@
/* parameters */ ParameterIndex(221),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(65),
+ /* const_eval_fn */ ConstEvalFunctionIndex(67),
},
{
/* [394] */
@@ -10040,7 +10044,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(66),
+ /* const_eval_fn */ ConstEvalFunctionIndex(68),
},
{
/* [395] */
@@ -10053,7 +10057,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(66),
+ /* const_eval_fn */ ConstEvalFunctionIndex(68),
},
{
/* [396] */
@@ -10066,7 +10070,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(67),
+ /* const_eval_fn */ ConstEvalFunctionIndex(69),
},
{
/* [397] */
@@ -10079,7 +10083,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(67),
+ /* const_eval_fn */ ConstEvalFunctionIndex(69),
},
{
/* [398] */
@@ -10092,7 +10096,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(68),
+ /* const_eval_fn */ ConstEvalFunctionIndex(70),
},
{
/* [399] */
@@ -10105,7 +10109,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(68),
+ /* const_eval_fn */ ConstEvalFunctionIndex(70),
},
{
/* [400] */
@@ -10118,7 +10122,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(69),
+ /* const_eval_fn */ ConstEvalFunctionIndex(71),
},
{
/* [401] */
@@ -10131,7 +10135,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(69),
+ /* const_eval_fn */ ConstEvalFunctionIndex(71),
},
{
/* [402] */
@@ -10144,7 +10148,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(71),
+ /* const_eval_fn */ ConstEvalFunctionIndex(73),
},
{
/* [403] */
@@ -10157,7 +10161,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(71),
+ /* const_eval_fn */ ConstEvalFunctionIndex(73),
},
{
/* [404] */
@@ -10222,7 +10226,7 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(78),
+ /* const_eval_fn */ ConstEvalFunctionIndex(82),
},
{
/* [409] */
@@ -10235,7 +10239,7 @@
/* parameters */ ParameterIndex(233),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(78),
+ /* const_eval_fn */ ConstEvalFunctionIndex(82),
},
{
/* [410] */
@@ -10248,7 +10252,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(79),
+ /* const_eval_fn */ ConstEvalFunctionIndex(83),
},
{
/* [411] */
@@ -10261,7 +10265,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(79),
+ /* const_eval_fn */ ConstEvalFunctionIndex(83),
},
{
/* [412] */
@@ -10274,7 +10278,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(80),
+ /* const_eval_fn */ ConstEvalFunctionIndex(84),
},
{
/* [413] */
@@ -10287,7 +10291,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(80),
+ /* const_eval_fn */ ConstEvalFunctionIndex(84),
},
{
/* [414] */
@@ -10300,7 +10304,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(89),
+ /* const_eval_fn */ ConstEvalFunctionIndex(93),
},
{
/* [415] */
@@ -10313,7 +10317,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(89),
+ /* const_eval_fn */ ConstEvalFunctionIndex(93),
},
{
/* [416] */
@@ -10326,7 +10330,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(94),
+ /* const_eval_fn */ ConstEvalFunctionIndex(98),
},
{
/* [417] */
@@ -10339,7 +10343,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(94),
+ /* const_eval_fn */ ConstEvalFunctionIndex(98),
},
{
/* [418] */
@@ -10352,7 +10356,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(95),
+ /* const_eval_fn */ ConstEvalFunctionIndex(99),
},
{
/* [419] */
@@ -10365,7 +10369,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(95),
+ /* const_eval_fn */ ConstEvalFunctionIndex(99),
},
{
/* [420] */
@@ -10378,7 +10382,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(96),
+ /* const_eval_fn */ ConstEvalFunctionIndex(100),
},
{
/* [421] */
@@ -10391,7 +10395,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(96),
+ /* const_eval_fn */ ConstEvalFunctionIndex(100),
},
{
/* [422] */
@@ -10404,7 +10408,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(97),
+ /* const_eval_fn */ ConstEvalFunctionIndex(101),
},
{
/* [423] */
@@ -10417,7 +10421,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(97),
+ /* const_eval_fn */ ConstEvalFunctionIndex(101),
},
{
/* [424] */
@@ -10430,7 +10434,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(98),
+ /* const_eval_fn */ ConstEvalFunctionIndex(102),
},
{
/* [425] */
@@ -10443,7 +10447,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(98),
+ /* const_eval_fn */ ConstEvalFunctionIndex(102),
},
{
/* [426] */
@@ -10456,7 +10460,7 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(99),
+ /* const_eval_fn */ ConstEvalFunctionIndex(103),
},
{
/* [427] */
@@ -10469,7 +10473,7 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(8),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(99),
+ /* const_eval_fn */ ConstEvalFunctionIndex(103),
},
{
/* [428] */
@@ -10482,7 +10486,7 @@
/* parameters */ ParameterIndex(16),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [429] */
@@ -10495,7 +10499,7 @@
/* parameters */ ParameterIndex(351),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(100),
+ /* const_eval_fn */ ConstEvalFunctionIndex(104),
},
{
/* [430] */
@@ -10508,7 +10512,7 @@
/* parameters */ ParameterIndex(16),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [431] */
@@ -10521,7 +10525,7 @@
/* parameters */ ParameterIndex(351),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(105),
},
{
/* [432] */
@@ -10721,6 +10725,32 @@
{
/* [447] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(374),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(33),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(52),
+ },
+ {
+ /* [448] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(375),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(33),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(53),
+ },
+ {
+ /* [449] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 2,
/* num_template_types */ 1,
/* num_template_numbers */ 1,
@@ -10729,10 +10759,10 @@
/* parameters */ ParameterIndex(149),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(55),
+ /* const_eval_fn */ ConstEvalFunctionIndex(57),
},
{
- /* [448] */
+ /* [450] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 3,
/* num_template_types */ 1,
@@ -10742,10 +10772,10 @@
/* parameters */ ParameterIndex(222),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(6),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(56),
+ /* const_eval_fn */ ConstEvalFunctionIndex(58),
},
{
- /* [449] */
+ /* [451] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 0,
/* num_template_types */ 0,
@@ -10758,7 +10788,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [450] */
+ /* [452] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 1,
/* num_template_types */ 1,
@@ -10768,35 +10798,9 @@
/* parameters */ ParameterIndex(353),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(12),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(3),
- /* const_eval_fn */ ConstEvalFunctionIndex(70),
- },
- {
- /* [451] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 1,
- /* num_template_types */ 0,
- /* num_template_numbers */ 0,
- /* template_types */ TemplateTypeIndex(/* invalid */),
- /* template_numbers */ TemplateNumberIndex(/* invalid */),
- /* parameters */ ParameterIndex(17),
- /* return_type_matcher_indices */ TypeMatcherIndicesIndex(26),
- /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(72),
},
{
- /* [452] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 1,
- /* num_template_types */ 0,
- /* num_template_numbers */ 0,
- /* template_types */ TemplateTypeIndex(/* invalid */),
- /* template_numbers */ TemplateNumberIndex(/* invalid */),
- /* parameters */ ParameterIndex(17),
- /* return_type_matcher_indices */ TypeMatcherIndicesIndex(26),
- /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(73),
- },
- {
/* [453] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 1,
@@ -10818,7 +10822,7 @@
/* template_types */ TemplateTypeIndex(/* invalid */),
/* template_numbers */ TemplateNumberIndex(/* invalid */),
/* parameters */ ParameterIndex(17),
- /* return_type_matcher_indices */ TypeMatcherIndicesIndex(28),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(26),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(75),
},
@@ -10831,12 +10835,64 @@
/* template_types */ TemplateTypeIndex(/* invalid */),
/* template_numbers */ TemplateNumberIndex(/* invalid */),
/* parameters */ ParameterIndex(17),
- /* return_type_matcher_indices */ TypeMatcherIndicesIndex(28),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(26),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(76),
},
{
/* [456] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(17),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(28),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ },
+ {
+ /* [457] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(17),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(28),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(78),
+ },
+ {
+ /* [458] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(17),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(30),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(79),
+ },
+ {
+ /* [459] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_template_types */ 0,
+ /* num_template_numbers */ 0,
+ /* template_types */ TemplateTypeIndex(/* invalid */),
+ /* template_numbers */ TemplateNumberIndex(/* invalid */),
+ /* parameters */ ParameterIndex(17),
+ /* return_type_matcher_indices */ TypeMatcherIndicesIndex(32),
+ /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
+ /* const_eval_fn */ ConstEvalFunctionIndex(80),
+ },
+ {
+ /* [460] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 1,
/* num_template_types */ 1,
@@ -10849,7 +10905,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [457] */
+ /* [461] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_template_types */ 1,
@@ -10862,7 +10918,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [458] */
+ /* [462] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 2,
/* num_template_types */ 1,
@@ -10875,7 +10931,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [459] */
+ /* [463] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 2,
/* num_template_types */ 1,
@@ -10888,7 +10944,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [460] */
+ /* [464] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_template_types */ 1,
@@ -10901,7 +10957,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [461] */
+ /* [465] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 0,
/* num_template_types */ 0,
@@ -10914,7 +10970,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [462] */
+ /* [466] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 2,
/* num_template_types */ 1,
@@ -10927,7 +10983,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [463] */
+ /* [467] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_template_types */ 1,
@@ -10937,10 +10993,10 @@
/* parameters */ ParameterIndex(1),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(77),
+ /* const_eval_fn */ ConstEvalFunctionIndex(81),
},
{
- /* [464] */
+ /* [468] */
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 2,
/* num_template_types */ 0,
@@ -10950,10 +11006,10 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(92),
+ /* const_eval_fn */ ConstEvalFunctionIndex(96),
},
{
- /* [465] */
+ /* [469] */
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 2,
/* num_template_types */ 0,
@@ -10963,10 +11019,10 @@
/* parameters */ ParameterIndex(226),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(9),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(93),
+ /* const_eval_fn */ ConstEvalFunctionIndex(97),
},
{
- /* [466] */
+ /* [470] */
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 1,
/* num_template_types */ 1,
@@ -10976,7 +11032,7 @@
/* parameters */ ParameterIndex(213),
/* return_type_matcher_indices */ TypeMatcherIndicesIndex(158),
/* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
- /* const_eval_fn */ ConstEvalFunctionIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(107),
},
};
@@ -11406,60 +11462,72 @@
},
{
/* [62] */
+ /* fn pack4xI8Clamp(vec4<i32>) -> u32 */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(447),
+ },
+ {
+ /* [63] */
+ /* fn pack4xU8Clamp(vec4<u32>) -> u32 */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(448),
+ },
+ {
+ /* [64] */
/* fn pow<T : fa_f32_f16>(T, T) -> T */
/* fn pow<N : num, T : fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(374),
},
{
- /* [63] */
+ /* [65] */
/* fn quantizeToF16(f32) -> f32 */
/* fn quantizeToF16<N : num>(vec<N, f32>) -> vec<N, f32> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(376),
},
{
- /* [64] */
+ /* [66] */
/* fn radians<T : fa_f32_f16>(T) -> T */
/* fn radians<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(378),
},
{
- /* [65] */
+ /* [67] */
/* fn reflect<N : num, T : fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(447),
+ /* overloads */ OverloadIndex(449),
},
{
- /* [66] */
+ /* [68] */
/* fn refract<N : num, T : fa_f32_f16>(vec<N, T>, vec<N, T>, T) -> vec<N, T> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(448),
+ /* overloads */ OverloadIndex(450),
},
{
- /* [67] */
+ /* [69] */
/* fn reverseBits<T : iu32>(T) -> T */
/* fn reverseBits<N : num, T : iu32>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(380),
},
{
- /* [68] */
+ /* [70] */
/* fn round<T : fa_f32_f16>(@test_value(3.5) T) -> T */
/* fn round<N : num, T : fa_f32_f16>(@test_value(3.5) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(382),
},
{
- /* [69] */
+ /* [71] */
/* fn saturate<T : fa_f32_f16>(@test_value(2) T) -> T */
/* fn saturate<T : fa_f32_f16, N : num>(@test_value(2) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(384),
},
{
- /* [70] */
+ /* [72] */
/* fn select<T : scalar>(T, T, bool) -> T */
/* fn select<T : scalar, N : num>(vec<N, T>, vec<N, T>, bool) -> vec<N, T> */
/* fn select<N : num, T : scalar>(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T> */
@@ -11467,130 +11535,142 @@
/* overloads */ OverloadIndex(280),
},
{
- /* [71] */
+ /* [73] */
/* fn sign<T : fia_fi32_f16>(T) -> T */
/* fn sign<N : num, T : fia_fi32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(386),
},
{
- /* [72] */
+ /* [74] */
/* fn sin<T : fa_f32_f16>(@test_value(1.57079632679) T) -> T */
/* fn sin<N : num, T : fa_f32_f16>(@test_value(1.57079632679) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(388),
},
{
- /* [73] */
+ /* [75] */
/* fn sinh<T : fa_f32_f16>(T) -> T */
/* fn sinh<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(390),
},
{
- /* [74] */
+ /* [76] */
/* fn smoothstep<T : fa_f32_f16>(@test_value(2) T, @test_value(4) T, @test_value(3) T) -> T */
/* fn smoothstep<N : num, T : fa_f32_f16>(@test_value(2) vec<N, T>, @test_value(4) vec<N, T>, @test_value(3) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(392),
},
{
- /* [75] */
+ /* [77] */
/* fn sqrt<T : fa_f32_f16>(T) -> T */
/* fn sqrt<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(394),
},
{
- /* [76] */
+ /* [78] */
/* fn step<T : fa_f32_f16>(T, T) -> T */
/* fn step<N : num, T : fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(396),
},
{
- /* [77] */
+ /* [79] */
/* fn storageBarrier() */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(449),
+ /* overloads */ OverloadIndex(451),
},
{
- /* [78] */
+ /* [80] */
/* fn tan<T : fa_f32_f16>(T) -> T */
/* fn tan<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(398),
},
{
- /* [79] */
+ /* [81] */
/* fn tanh<T : fa_f32_f16>(T) -> T */
/* fn tanh<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(400),
},
{
- /* [80] */
+ /* [82] */
/* fn transpose<M : num, N : num, T : fa_f32_f16>(mat<M, N, T>) -> mat<N, M, T> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(450),
+ /* overloads */ OverloadIndex(452),
},
{
- /* [81] */
+ /* [83] */
/* fn trunc<T : fa_f32_f16>(@test_value(1.5) T) -> T */
/* fn trunc<N : num, T : fa_f32_f16>(@test_value(1.5) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(402),
},
{
- /* [82] */
- /* fn unpack2x16float(u32) -> vec2<f32> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(451),
- },
- {
- /* [83] */
- /* fn unpack2x16snorm(u32) -> vec2<f32> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(452),
- },
- {
/* [84] */
- /* fn unpack2x16unorm(u32) -> vec2<f32> */
+ /* fn unpack2x16float(u32) -> vec2<f32> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(453),
},
{
/* [85] */
- /* fn unpack4x8snorm(u32) -> vec4<f32> */
+ /* fn unpack2x16snorm(u32) -> vec2<f32> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(454),
},
{
/* [86] */
- /* fn unpack4x8unorm(u32) -> vec4<f32> */
+ /* fn unpack2x16unorm(u32) -> vec2<f32> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(455),
},
{
/* [87] */
- /* fn workgroupBarrier() */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(449),
- },
- {
- /* [88] */
- /* fn workgroupUniformLoad<T>(ptr<workgroup, T, read_write>) -> T */
+ /* fn unpack4x8snorm(u32) -> vec4<f32> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(456),
},
{
- /* [89] */
- /* fn textureBarrier() */
+ /* [88] */
+ /* fn unpack4x8unorm(u32) -> vec4<f32> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(449),
+ /* overloads */ OverloadIndex(457),
+ },
+ {
+ /* [89] */
+ /* fn unpack4xI8(u32) -> vec4<i32> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(458),
},
{
/* [90] */
+ /* fn unpack4xU8(u32) -> vec4<u32> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(459),
+ },
+ {
+ /* [91] */
+ /* fn workgroupBarrier() */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(451),
+ },
+ {
+ /* [92] */
+ /* fn workgroupUniformLoad<T>(ptr<workgroup, T, read_write>) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(460),
+ },
+ {
+ /* [93] */
+ /* fn textureBarrier() */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(451),
+ },
+ {
+ /* [94] */
/* fn textureDimensions<T : fiu32>(texture: texture_1d<T>) -> u32 */
/* fn textureDimensions<T : fiu32, L : iu32>(texture: texture_1d<T>, level: L) -> u32 */
/* fn textureDimensions<T : fiu32>(texture: texture_2d<T>) -> vec2<u32> */
@@ -11622,7 +11702,7 @@
/* overloads */ OverloadIndex(0),
},
{
- /* [91] */
+ /* [95] */
/* fn textureGather<T : fiu32, C : iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> */
/* fn textureGather<T : fiu32, C : iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<T> */
/* fn textureGather<T : fiu32, C : iu32, A : iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<T> */
@@ -11639,7 +11719,7 @@
/* overloads */ OverloadIndex(93),
},
{
- /* [92] */
+ /* [96] */
/* fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32> */
/* fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureGatherCompare<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> vec4<f32> */
@@ -11650,7 +11730,7 @@
/* overloads */ OverloadIndex(174),
},
{
- /* [93] */
+ /* [97] */
/* fn textureNumLayers<T : fiu32>(texture: texture_2d_array<T>) -> u32 */
/* fn textureNumLayers<T : fiu32>(texture: texture_cube_array<T>) -> u32 */
/* fn textureNumLayers(texture: texture_depth_2d_array) -> u32 */
@@ -11660,7 +11740,7 @@
/* overloads */ OverloadIndex(246),
},
{
- /* [94] */
+ /* [98] */
/* fn textureNumLevels<T : fiu32>(texture: texture_1d<T>) -> u32 */
/* fn textureNumLevels<T : fiu32>(texture: texture_2d<T>) -> u32 */
/* fn textureNumLevels<T : fiu32>(texture: texture_2d_array<T>) -> u32 */
@@ -11675,14 +11755,14 @@
/* overloads */ OverloadIndex(129),
},
{
- /* [95] */
+ /* [99] */
/* fn textureNumSamples<T : fiu32>(texture: texture_multisampled_2d<T>) -> u32 */
/* fn textureNumSamples(texture: texture_depth_multisampled_2d) -> u32 */
/* num overloads */ 2,
/* overloads */ OverloadIndex(404),
},
{
- /* [96] */
+ /* [100] */
/* fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32> */
/* fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> */
@@ -11702,7 +11782,7 @@
/* overloads */ OverloadIndex(64),
},
{
- /* [97] */
+ /* [101] */
/* fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32> */
/* fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureSampleBias<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32) -> vec4<f32> */
@@ -11715,7 +11795,7 @@
/* overloads */ OverloadIndex(158),
},
{
- /* [98] */
+ /* [102] */
/* fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 */
/* fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32 */
/* fn textureSampleCompare<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32 */
@@ -11726,7 +11806,7 @@
/* overloads */ OverloadIndex(180),
},
{
- /* [99] */
+ /* [103] */
/* fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 */
/* fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32 */
/* fn textureSampleCompareLevel<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32 */
@@ -11737,7 +11817,7 @@
/* overloads */ OverloadIndex(186),
},
{
- /* [100] */
+ /* [104] */
/* fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
/* fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureSampleGrad<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
@@ -11750,7 +11830,7 @@
/* overloads */ OverloadIndex(166),
},
{
- /* [101] */
+ /* [105] */
/* fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32> */
/* fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureSampleLevel<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32) -> vec4<f32> */
@@ -11769,14 +11849,14 @@
/* overloads */ OverloadIndex(79),
},
{
- /* [102] */
+ /* [106] */
/* fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* num overloads */ 2,
/* overloads */ OverloadIndex(406),
},
{
- /* [103] */
+ /* [107] */
/* fn textureStore<C : iu32>(texture: texture_storage_1d<f32_texel_format, writable>, coords: C, value: vec4<f32>) */
/* fn textureStore<C : iu32>(texture: texture_storage_2d<f32_texel_format, writable>, coords: vec2<C>, value: vec4<f32>) */
/* fn textureStore<C : iu32, A : iu32>(texture: texture_storage_2d_array<f32_texel_format, writable>, coords: vec2<C>, array_index: A, value: vec4<f32>) */
@@ -11793,7 +11873,7 @@
/* overloads */ OverloadIndex(105),
},
{
- /* [104] */
+ /* [108] */
/* fn textureLoad<T : fiu32, C : iu32, L : iu32>(texture: texture_1d<T>, coords: C, level: L) -> vec4<T> */
/* fn textureLoad<T : fiu32, C : iu32, L : iu32>(texture: texture_2d<T>, coords: vec2<C>, level: L) -> vec4<T> */
/* fn textureLoad<T : fiu32, C : iu32, A : iu32, L : iu32>(texture: texture_2d_array<T>, coords: vec2<C>, array_index: A, level: L) -> vec4<T> */
@@ -11819,89 +11899,89 @@
/* overloads */ OverloadIndex(27),
},
{
- /* [105] */
- /* fn atomicLoad<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(457),
- },
- {
- /* [106] */
- /* fn atomicStore<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(458),
- },
- {
- /* [107] */
- /* fn atomicAdd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(459),
- },
- {
- /* [108] */
- /* fn atomicSub<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(459),
- },
- {
/* [109] */
- /* fn atomicMax<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(459),
- },
- {
- /* [110] */
- /* fn atomicMin<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(459),
- },
- {
- /* [111] */
- /* fn atomicAnd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(459),
- },
- {
- /* [112] */
- /* fn atomicOr<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(459),
- },
- {
- /* [113] */
- /* fn atomicXor<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(459),
- },
- {
- /* [114] */
- /* fn atomicExchange<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(459),
- },
- {
- /* [115] */
- /* fn atomicCompareExchangeWeak<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T, T) -> __atomic_compare_exchange_result<T> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(460),
- },
- {
- /* [116] */
- /* fn subgroupBallot() -> vec4<u32> */
+ /* fn atomicLoad<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T */
/* num overloads */ 1,
/* overloads */ OverloadIndex(461),
},
{
- /* [117] */
- /* fn subgroupBroadcast<T : fiu32>(value: T, @const sourceLaneIndex: u32) -> T */
+ /* [110] */
+ /* fn atomicStore<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) */
/* num overloads */ 1,
/* overloads */ OverloadIndex(462),
},
{
- /* [118] */
- /* fn _tint_materialize<T>(T) -> T */
+ /* [111] */
+ /* fn atomicAdd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
/* overloads */ OverloadIndex(463),
},
+ {
+ /* [112] */
+ /* fn atomicSub<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(463),
+ },
+ {
+ /* [113] */
+ /* fn atomicMax<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(463),
+ },
+ {
+ /* [114] */
+ /* fn atomicMin<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(463),
+ },
+ {
+ /* [115] */
+ /* fn atomicAnd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(463),
+ },
+ {
+ /* [116] */
+ /* fn atomicOr<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(463),
+ },
+ {
+ /* [117] */
+ /* fn atomicXor<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(463),
+ },
+ {
+ /* [118] */
+ /* fn atomicExchange<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(463),
+ },
+ {
+ /* [119] */
+ /* fn atomicCompareExchangeWeak<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T, T) -> __atomic_compare_exchange_result<T> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(464),
+ },
+ {
+ /* [120] */
+ /* fn subgroupBallot() -> vec4<u32> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(465),
+ },
+ {
+ /* [121] */
+ /* fn subgroupBroadcast<T : fiu32>(value: T, @const sourceLaneIndex: u32) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(466),
+ },
+ {
+ /* [122] */
+ /* fn _tint_materialize<T>(T) -> T */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(467),
+ },
};
constexpr IntrinsicInfo kUnaryOperators[] = {
@@ -12013,13 +12093,13 @@
/* [8] */
/* op &&(bool, bool) -> bool */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(464),
+ /* overloads */ OverloadIndex(468),
},
{
/* [9] */
/* op ||(bool, bool) -> bool */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(465),
+ /* overloads */ OverloadIndex(469),
},
{
/* [10] */
@@ -12294,7 +12374,7 @@
/* [17] */
/* conv packedVec3<T : concrete_scalar>(vec3<T>) -> packedVec3<T> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(466),
+ /* overloads */ OverloadIndex(470),
},
};
@@ -12335,6 +12415,8 @@
/* unary '!' */ kUnaryOperators[kUnaryOperatorNot],
/* unary '~' */ kUnaryOperators[kUnaryOperatorComplement],
/* unary '-' */ kUnaryOperators[kUnaryOperatorMinus],
+ /* unary '*' */ tint::core::intrinsic::kNoOverloads,
+ /* unary '&' */ tint::core::intrinsic::kNoOverloads,
};
} // namespace tint::wgsl::intrinsic
diff --git a/src/tint/lang/wgsl/reader/lower/lower.cc b/src/tint/lang/wgsl/reader/lower/lower.cc
index bd218d7..f9a6ed9 100644
--- a/src/tint/lang/wgsl/reader/lower/lower.cc
+++ b/src/tint/lang/wgsl/reader/lower/lower.cc
@@ -107,6 +107,8 @@
CASE(kPack4X8Unorm)
CASE(kPack4XI8)
CASE(kPack4XU8)
+ CASE(kPack4XI8Clamp)
+ CASE(kPack4XU8Clamp)
CASE(kPow)
CASE(kQuantizeToF16)
CASE(kRadians)
@@ -132,6 +134,8 @@
CASE(kUnpack2X16Unorm)
CASE(kUnpack4X8Snorm)
CASE(kUnpack4X8Unorm)
+ CASE(kUnpack4XI8)
+ CASE(kUnpack4XU8)
CASE(kWorkgroupBarrier)
CASE(kTextureBarrier)
CASE(kTextureDimensions)
diff --git a/src/tint/lang/wgsl/resolver/builtin_validation_test.cc b/src/tint/lang/wgsl/resolver/builtin_validation_test.cc
index ca20ce7..3bae4eb 100644
--- a/src/tint/lang/wgsl/resolver/builtin_validation_test.cc
+++ b/src/tint/lang/wgsl/resolver/builtin_validation_test.cc
@@ -659,6 +659,114 @@
"current environment");
}
+TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xI8Clamp) {
+ // fn func { return pack4xI8Clamp(vec4i()); }
+ Require(wgsl::LanguageFeature::kPacked4X8IntegerDotProduct);
+
+ Func("func", tint::Empty, ty.u32(),
+ Vector{
+ Return(Call(Source{Source::Location{12, 34}}, "pack4xI8Clamp", Call<vec4<i32>>())),
+ });
+
+ EXPECT_TRUE(r()->Resolve());
+}
+
+TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xI8Clamp_FeatureDisallowed) {
+ // fn func { return pack4xI8Clamp(vec4i()); }
+ Func("func", tint::Empty, ty.u32(),
+ Vector{
+ Return(Call(Source{Source::Location{12, 34}}, "pack4xI8Clamp", Call<vec4<i32>>())),
+ });
+
+ auto resolver = Resolver(this, {});
+ EXPECT_FALSE(resolver.Resolve());
+ EXPECT_EQ(resolver.error(),
+ "12:34 error: built-in function 'pack4xI8Clamp' requires the "
+ "packed_4x8_integer_dot_product language feature, which is not allowed in the "
+ "current environment");
+}
+
+TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xU8Clamp) {
+ // fn func { return pack4xU8Clamp(vec4u()); }
+ Require(wgsl::LanguageFeature::kPacked4X8IntegerDotProduct);
+
+ Func("func", tint::Empty, ty.u32(),
+ Vector{
+ Return(Call(Source{Source::Location{12, 34}}, "pack4xU8Clamp", Call<vec4<u32>>())),
+ });
+
+ EXPECT_TRUE(r()->Resolve());
+}
+
+TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xU8Clamp_FeatureDisallowed) {
+ // fn func { return pack4xU8Clamp(vec4u()); }
+ Func("func", tint::Empty, ty.u32(),
+ Vector{
+ Return(Call(Source{Source::Location{12, 34}}, "pack4xU8Clamp", Call<vec4<u32>>())),
+ });
+
+ auto resolver = Resolver(this, {});
+ EXPECT_FALSE(resolver.Resolve());
+ EXPECT_EQ(resolver.error(),
+ "12:34 error: built-in function 'pack4xU8Clamp' requires the "
+ "packed_4x8_integer_dot_product language feature, which is not allowed in the "
+ "current environment");
+}
+
+TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Unpack4xI8) {
+ // fn func { return unpack4xI8(u32()); }
+ Require(wgsl::LanguageFeature::kPacked4X8IntegerDotProduct);
+
+ Func("func", tint::Empty, ty.vec4<i32>(),
+ Vector{
+ Return(Call(Source{Source::Location{12, 34}}, "unpack4xI8", Call<u32>())),
+ });
+
+ EXPECT_TRUE(r()->Resolve());
+}
+
+TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Unpack4xI8_FeatureDisallowed) {
+ // fn func { return unpack4xI8(u32()); }
+ Func("func", tint::Empty, ty.vec4<i32>(),
+ Vector{
+ Return(Call(Source{Source::Location{12, 34}}, "unpack4xI8", Call<u32>())),
+ });
+
+ auto resolver = Resolver(this, {});
+ EXPECT_FALSE(resolver.Resolve());
+ EXPECT_EQ(resolver.error(),
+ "12:34 error: built-in function 'unpack4xI8' requires the "
+ "packed_4x8_integer_dot_product language feature, which is not allowed in the "
+ "current environment");
+}
+
+TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Unpack4xU8) {
+ // fn func { return unpack4xU8(u32()); }
+ Require(wgsl::LanguageFeature::kPacked4X8IntegerDotProduct);
+
+ Func("func", tint::Empty, ty.vec4<u32>(),
+ Vector{
+ Return(Call(Source{Source::Location{12, 34}}, "unpack4xU8", Call<u32>())),
+ });
+
+ EXPECT_TRUE(r()->Resolve());
+}
+
+TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Unpack4xU8_FeatureDisallowed) {
+ // fn func { return unpack4xU8(u32()); }
+ Func("func", tint::Empty, ty.vec4<u32>(),
+ Vector{
+ Return(Call(Source{Source::Location{12, 34}}, "unpack4xU8", Call<u32>())),
+ });
+
+ auto resolver = Resolver(this, {});
+ EXPECT_FALSE(resolver.Resolve());
+ EXPECT_EQ(resolver.error(),
+ "12:34 error: built-in function 'unpack4xU8' requires the "
+ "packed_4x8_integer_dot_product language feature, which is not allowed in the "
+ "current environment");
+}
+
TEST_F(ResolverBuiltinValidationTest, WorkgroupUniformLoad_WrongAddressSpace) {
// @group(0) @binding(0) var<storage, read_write> v : i32;
// fn foo() {
diff --git a/src/tint/lang/wgsl/resolver/resolver.cc b/src/tint/lang/wgsl/resolver/resolver.cc
index 9bc73d6..a94a59f 100644
--- a/src/tint/lang/wgsl/resolver/resolver.cc
+++ b/src/tint/lang/wgsl/resolver/resolver.cc
@@ -127,7 +127,7 @@
: b(*builder),
diagnostics_(builder->Diagnostics()),
const_eval_(builder->constants, diagnostics_),
- intrinsic_table_{builder->Types(), builder->Symbols(), builder->Diagnostics()},
+ intrinsic_table_{builder->Types(), builder->Symbols()},
sem_(builder),
validator_(builder,
sem_,
@@ -2099,8 +2099,9 @@
auto ctor_or_conv = [&](CtorConvIntrinsic ty,
const core::type::Type* template_arg) -> sem::Call* {
auto arg_tys = tint::Transform(args, [](auto* arg) { return arg->Type()->UnwrapRef(); });
- auto match = intrinsic_table_.Lookup(ty, template_arg, arg_tys, args_stage, expr->source);
+ auto match = intrinsic_table_.Lookup(ty, template_arg, arg_tys, args_stage);
if (match != Success) {
+ AddError(match.Failure(), expr->source);
return nullptr;
}
@@ -2371,8 +2372,9 @@
}
auto arg_tys = tint::Transform(args, [](auto* arg) { return arg->Type()->UnwrapRef(); });
- auto overload = intrinsic_table_.Lookup(fn, arg_tys, arg_stage, expr->source);
+ auto overload = intrinsic_table_.Lookup(fn, arg_tys, arg_stage);
if (overload != Success) {
+ AddError(overload.Failure(), expr->source);
return nullptr;
}
@@ -3546,8 +3548,9 @@
auto stage = core::EarliestStage(lhs->Stage(), rhs->Stage());
auto overload = intrinsic_table_.Lookup(expr->op, lhs->Type()->UnwrapRef(),
- rhs->Type()->UnwrapRef(), stage, expr->source, false);
+ rhs->Type()->UnwrapRef(), stage, false);
if (overload != Success) {
+ AddError(overload.Failure(), expr->source);
return nullptr;
}
@@ -3667,9 +3670,9 @@
default: {
stage = expr->Stage();
- auto overload =
- intrinsic_table_.Lookup(unary->op, expr_ty->UnwrapRef(), stage, unary->source);
+ auto overload = intrinsic_table_.Lookup(unary->op, expr_ty->UnwrapRef(), stage);
if (overload != Success) {
+ AddError(overload.Failure(), unary->source);
return nullptr;
}
ty = overload->return_type;
@@ -4751,10 +4754,10 @@
auto stage = core::EarliestStage(lhs->Stage(), rhs->Stage());
- auto overload =
- intrinsic_table_.Lookup(stmt->op, lhs->Type()->UnwrapRef(), rhs->Type()->UnwrapRef(),
- stage, stmt->source, true);
+ auto overload = intrinsic_table_.Lookup(stmt->op, lhs->Type()->UnwrapRef(),
+ rhs->Type()->UnwrapRef(), stage, true);
if (overload != Success) {
+ AddError(overload.Failure(), stmt->source);
return false;
}
diff --git a/src/tint/lang/wgsl/wgsl.def b/src/tint/lang/wgsl/wgsl.def
index cb5a480..8b40557 100644
--- a/src/tint/lang/wgsl/wgsl.def
+++ b/src/tint/lang/wgsl/wgsl.def
@@ -519,6 +519,8 @@
@must_use @const fn pack4x8unorm(vec4<f32>) -> u32
@must_use @const fn pack4xI8(vec4<i32>) -> u32
@must_use @const fn pack4xU8(vec4<u32>) -> u32
+@must_use @const fn pack4xI8Clamp(vec4<i32>) -> u32
+@must_use @const fn pack4xU8Clamp(vec4<u32>) -> u32
@must_use @const fn pow<T: fa_f32_f16>(T, T) -> T
@must_use @const fn pow<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T>
@must_use @const fn quantizeToF16(f32) -> f32
@@ -561,6 +563,8 @@
@must_use @const fn unpack2x16unorm(u32) -> vec2<f32>
@must_use @const fn unpack4x8snorm(u32) -> vec4<f32>
@must_use @const fn unpack4x8unorm(u32) -> vec4<f32>
+@must_use @const fn unpack4xI8(u32) -> vec4<i32>
+@must_use @const fn unpack4xU8(u32) -> vec4<u32>
@stage("compute") fn workgroupBarrier()
@must_use @stage("compute") fn workgroupUniformLoad<T>(ptr<workgroup, T, read_write>) -> T
diff --git a/src/tint/utils/result/result.cc b/src/tint/utils/result/result.cc
index ae3e740..2450bee 100644
--- a/src/tint/utils/result/result.cc
+++ b/src/tint/utils/result/result.cc
@@ -35,6 +35,8 @@
reason.add_error(diag::System::Unknown, err, Source{});
}
-Failure::Failure(diag::List diagnostics) : reason(diagnostics) {}
+Failure::Failure(diag::Diagnostic diagnostic) : reason(diag::List{std::move(diagnostic)}) {}
+
+Failure::Failure(diag::List diagnostics) : reason(std::move(diagnostics)) {}
} // namespace tint
diff --git a/src/tint/utils/result/result.h b/src/tint/utils/result/result.h
index a9e7a44..4342e07 100644
--- a/src/tint/utils/result/result.h
+++ b/src/tint/utils/result/result.h
@@ -53,6 +53,10 @@
/// @param err the single error diagnostic
explicit Failure(std::string_view err);
+ /// Constructor with a single diagnostic
+ /// @param diagnostic the failure diagnostic
+ explicit Failure(diag::Diagnostic diagnostic);
+
/// Constructor with a list of diagnostics
/// @param diagnostics the failure diagnostics
explicit Failure(diag::List diagnostics);
diff --git a/src/tint/utils/templates/intrinsic_table_data.tmpl.inc b/src/tint/utils/templates/intrinsic_table_data.tmpl.inc
index 7ef997c..c0f7a5e 100644
--- a/src/tint/utils/templates/intrinsic_table_data.tmpl.inc
+++ b/src/tint/utils/templates/intrinsic_table_data.tmpl.inc
@@ -300,7 +300,7 @@
{{- $N := Eval "OperatorName" $op }}
/* binary '{{$op}}' */ {{if $bin_ops.Get .}}kBinaryOperators[kBinaryOperator{{$N}}]{{else}}tint::core::intrinsic::kNoOverloads{{end}},
{{- end}}
-{{- range $op := List "!" "~" "-"}}
+{{- range $op := List "!" "~" "-" "*" "&"}}
{{- $N := Eval "OperatorName" $op }}
/* unary '{{$op}}' */ {{if $unary_ops.Get .}}kUnaryOperators[kUnaryOperator{{$N}}]{{else}}tint::core::intrinsic::kNoOverloads{{end}},
{{- end}}