diff options
| author | Yong He <yonghe@outlook.com> | 2017-11-04 19:19:23 -0400 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2017-11-04 19:19:23 -0400 |
| commit | 33d9f07d6c86e80c44af4de0693532cee6635135 (patch) | |
| tree | 7d07e83dbd7513ffb54632323178a2ca867e3100 /source/slang/syntax.cpp | |
| parent | aeb69cb8f617d3a59e2baf38a94224c1cdb4755c (diff) | |
cleanup useless code
Diffstat (limited to 'source/slang/syntax.cpp')
| -rw-r--r-- | source/slang/syntax.cpp | 79 |
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() |
