diff options
| author | Yong He <yonghe@outlook.com> | 2023-07-18 08:08:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-18 15:08:11 +0000 |
| commit | 4cb3eeb832b5fb29a61f2934b3daa5e42a3d6cde (patch) | |
| tree | 89713b5d83b4fee0dad6aa52b72d5ca695f4e8f1 /source/slang/slang-ast-type.cpp | |
| parent | 138a44ef272841cb555fa0eb5c49cc889bf1d64a (diff) | |
Simplify Lookup and improve compiler performance. (#2996)
* Simplify lookup.
* Various bug fixes.
* Report type dictionary size in perf benchmark.
* Remove type duplication.
* increase initial dict size.
* Bug fix.
* Fix bugs.
* Fixup.
* Revert type legalization looping.
* Fix specialization pass.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ast-type.cpp')
| -rw-r--r-- | source/slang/slang-ast-type.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp index 9b6b439ce..ee5d1d40e 100644 --- a/source/slang/slang-ast-type.cpp +++ b/source/slang/slang-ast-type.cpp @@ -772,10 +772,8 @@ DeclRef<InterfaceDecl> ExtractExistentialType::getSpecializedInterfaceDeclRef() SubtypeWitness* openedWitness = getSubtypeWitness(); - ThisTypeSubstitution* openedThisType = m_astBuilder->create<ThisTypeSubstitution>(); - openedThisType->outer = originalInterfaceDeclRef.getSubst(); - openedThisType->interfaceDecl = interfaceDecl; - openedThisType->witness = openedWitness; + ThisTypeSubstitution* openedThisType = m_astBuilder->getOrCreateThisTypeSubstitution( + interfaceDecl, openedWitness, originalInterfaceDeclRef.getSubst()); DeclRef<InterfaceDecl> specialiedInterfaceDeclRef = m_astBuilder->getSpecializedDeclRef<InterfaceDecl>(interfaceDecl, openedThisType); |
