From 77d3630eef4ea1c4b0424a46526a6be476a89230 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 16 Mar 2023 22:17:51 -0700 Subject: Fix name mangling of `FuncCallIntVal` in func signatures. (#2709) * Fix name mangling of `FuncCallIntVal` in func signatures. * Enhance the test. * Fix. * Fix. --------- Co-authored-by: Yong He --- source/slang/slang-mangle.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source') diff --git a/source/slang/slang-mangle.cpp b/source/slang/slang-mangle.cpp index a7d047a0c..2386e9f5a 100644 --- a/source/slang/slang-mangle.cpp +++ b/source/slang/slang-mangle.cpp @@ -287,6 +287,24 @@ namespace Slang emitRaw(context, "k"); emit(context, (UInt) constantIntVal->value); } + else if (auto funcCallIntVal = dynamicCast(val)) + { + emitRaw(context, "KC"); + emit(context, funcCallIntVal->args.getCount()); + emitName(context, funcCallIntVal->funcDeclRef.getName()); + for (Index i = 0; i < funcCallIntVal->args.getCount(); i++) + emitVal(context, funcCallIntVal->args[i]); + } + else if (auto lookupIntVal = dynamicCast(val)) + { + emitRaw(context, "KL"); + emitVal(context, lookupIntVal->witness); + emitName(context, lookupIntVal->key->getName()); + } + else if (auto polynomialIntVal = dynamicCast(val)) + { + emitRaw(context, "KX"); + } else { SLANG_UNEXPECTED("unimplemented case in mangling"); -- cgit v1.2.3