summaryrefslogtreecommitdiffstats
path: root/source/slang/syntax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/syntax.cpp')
-rw-r--r--source/slang/syntax.cpp79
1 files changed, 0 insertions, 79 deletions
diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp
index 255cf4ff1..9acdadad6 100644
--- a/source/slang/syntax.cpp
+++ b/source/slang/syntax.cpp
@@ -376,85 +376,6 @@ void Type::accept(IValVisitor* visitor, void* extra)
(int)(typeid(this).hash_code()));
}
- // ThisType
-
- String ThisType::ToString()
- {
- return "<this_type>";
- }
-
- int ThisType::GetHashCode()
- {
- return 0;
- }
-
- bool ThisType::EqualsImpl(Type * /*type*/)
- {
- return true;
- }
-
- Type* ThisType::CreateCanonicalType()
- {
- // A declaration reference is already canonical
- return this;
- }
-
- RefPtr<Val> ThisType::SubstituteImpl(Substitutions* subst, int* /*ioDiff*/)
- {
- while (subst)
- {
- if (auto thisTypeSubst = dynamic_cast<ThisTypeSubstitution*>(subst))
- {
- return thisTypeSubst->sourceType;
- }
- subst = subst->outer;
- }
- return this;
- }
-
- // MemberType
- /*
- String MemberType::ToString()
- {
- return objectType->ToString() + "::" + declRef.toString();
- }
-
- int MemberType::GetHashCode()
- {
- return combineHash(objectType->GetHashCode(), declRef.GetHashCode());
- }
-
- bool MemberType::EqualsImpl(Type * type)
- {
- if (auto memberType = dynamic_cast<MemberType*>(type))
- return objectType->Equals(memberType->objectType.Ptr()) && declRef.Equals(memberType->declRef);
- return false;
- }
-
- Type* MemberType::CreateCanonicalType()
- {
- if (auto declRefType = objectType->As<DeclRefType>())
- {
- if (auto aggDeclRef = declRefType->declRef.As<AggTypeDecl>())
- {
- Decl* targetDecl = nullptr;
- if (aggDeclRef.getDecl()->memberDictionary.TryGetValue(declRef.getDecl()->nameAndLoc.name, targetDecl))
- {
- if (auto typeDefDecl = dynamic_cast<TypeDefDecl*>(targetDecl))
- return typeDefDecl->type.type;
- else
- return DeclRefType::Create(getSession(), DeclRef<Decl>(targetDecl, aggDeclRef.substitutions));
- }
- }
- }
- return this;
- }
-
- RefPtr<Val> MemberType::SubstituteImpl(Substitutions* subst, int* ioDiff)
- {
- return this;
- }
- */
// DeclRefType
String DeclRefType::ToString()