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-check-constraint.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-check-constraint.cpp')
| -rw-r--r-- | source/slang/slang-check-constraint.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/slang-check-constraint.cpp b/source/slang/slang-check-constraint.cpp index 2dc263115..22a92bf0a 100644 --- a/source/slang/slang-check-constraint.cpp +++ b/source/slang/slang-check-constraint.cpp @@ -457,7 +457,7 @@ namespace Slang // apply the substitutions we already know... GenericSubstitution* solvedSubst = m_astBuilder->getOrCreateGenericSubstitution( - genericDeclRef.getDecl(), args, genericDeclRef.getSubst()); + genericDeclRef.getSubst(), genericDeclRef.getDecl(), args.getArrayView()); for( auto constraintDecl : genericDeclRef.getDecl()->getMembersOfType<GenericTypeConstraintDecl>() ) { @@ -510,7 +510,7 @@ namespace Slang } resultSubst = m_astBuilder->getOrCreateGenericSubstitution( - genericDeclRef.getDecl(), args, genericDeclRef.getSubst()); + genericDeclRef.getSubst(), genericDeclRef.getDecl(), args); return resultSubst; } @@ -633,7 +633,7 @@ namespace Slang auto fstGen = fst; auto sndGen = snd; // They must be specializing the same generic - if (fstGen->genericDecl != sndGen->genericDecl) + if (fstGen->getGenericDecl() != sndGen->getGenericDecl()) return false; // Their arguments must unify @@ -649,7 +649,7 @@ namespace Slang } // Their "base" specializations must unify - if (!tryUnifySubstitutions(constraints, fstGen->outer, sndGen->outer)) + if (!tryUnifySubstitutions(constraints, fstGen->getOuter(), sndGen->getOuter())) { okay = false; } |
