diff options
| author | Yong He <yonghe@outlook.com> | 2023-03-16 22:17:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-16 22:17:51 -0700 |
| commit | 77d3630eef4ea1c4b0424a46526a6be476a89230 (patch) | |
| tree | 7c097dfcf9ee2b678d3044ffa70fc232c2b3714e /source | |
| parent | fc9cba5307d166f7fda3f7e2c8b5bed7b06fef54 (diff) | |
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 <yhe@nvidia.com>
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-mangle.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
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<FuncCallIntVal>(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<WitnessLookupIntVal>(val)) + { + emitRaw(context, "KL"); + emitVal(context, lookupIntVal->witness); + emitName(context, lookupIntVal->key->getName()); + } + else if (auto polynomialIntVal = dynamicCast<PolynomialIntVal>(val)) + { + emitRaw(context, "KX"); + } else { SLANG_UNEXPECTED("unimplemented case in mangling"); |
