summaryrefslogtreecommitdiff
path: root/source/slang/mangle.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2018-01-12 14:15:56 -0800
committerTim Foley <tfoleyNV@users.noreply.github.com>2018-01-12 14:15:56 -0800
commitdf6eeb93c1718334779ae328db277cdf7a9d7b04 (patch)
treef4d53d3106cdc717727701e46411a1ebe23105fb /source/slang/mangle.h
parent8daafcc2e4bf7b2dfb66d7a3b7ac60c86b2d926c (diff)
Refactor substitution representation in DeclRefBase (#363)
This commit changes the type of `DeclRefBase::substitutions` from `RefPtr<Substitutions>` to `SubstitutionSet`, which is a new type defined as following: ``` struct SubstitutionSet { RefPtr<GenericSubstitution> genericSubstitutions; RefPtr<ThisTypeSubstitution> thisTypeSubstitution; RefPtr<GlobalGenericParamSubstitution> globalGenParamSubstitutions; } ``` This change get rid of most helper functions to retreive the substitution of a certain type, as well as surgery operations to insert a `ThisTypeSubstitution` or `GlobalGenericTypeSubstittuion` at top or bottom of the substitution chain. It also simplies type comparison when certain type of substitution should not be considered as part of type definition.
Diffstat (limited to 'source/slang/mangle.h')
-rw-r--r--source/slang/mangle.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/mangle.h b/source/slang/mangle.h
index 406796951..45b1d4bd1 100644
--- a/source/slang/mangle.h
+++ b/source/slang/mangle.h
@@ -12,7 +12,7 @@ namespace Slang
String getMangledName(DeclRef<Decl> const & declRef);
String getMangledName(DeclRefBase const & declRef);
- String mangleSpecializedFuncName(String baseName, RefPtr<Substitutions> subst);
+ String mangleSpecializedFuncName(String baseName, SubstitutionSet subst);
String getMangledNameForConformanceWitness(
Type* sub,
Type* sup);