From 6c7120d684cc46caafbe348d658158c0060a7638 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 5 Jul 2023 14:37:48 -0700 Subject: Bottleneck DeclRef creation through ASTBuilder. (#2689) * Bottleneck DeclRef creation through ASTBuilder. * Fix clang error. * Fix. * Fix. * More fix. * Rebase on top of tree. --------- Co-authored-by: Yong He --- source/slang/slang-check-constraint.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-check-constraint.cpp') diff --git a/source/slang/slang-check-constraint.cpp b/source/slang/slang-check-constraint.cpp index f0df78c43..65d716db0 100644 --- a/source/slang/slang-check-constraint.cpp +++ b/source/slang/slang-check-constraint.cpp @@ -285,7 +285,7 @@ namespace Slang // These seem more reasonable to have influence constraint solving, since it could // conceivably let us specialize a `X : IContainer` to `X` if we find // that `X.IndexType == T`. - for( auto constraintDeclRef : getMembersOfType(genericDeclRef) ) + for( auto constraintDeclRef : getMembersOfType(m_astBuilder, genericDeclRef) ) { if(!TryUnifyTypes(*system, getSub(m_astBuilder, constraintDeclRef), getSup(m_astBuilder, constraintDeclRef))) return SubstitutionSet(); @@ -323,7 +323,7 @@ namespace Slang // and try to solve for each. // Count paramCounter = 0; - for (auto m : getMembers(genericDeclRef)) + for (auto m : getMembers(m_astBuilder, genericDeclRef)) { if (auto typeParam = m.as()) { @@ -461,7 +461,7 @@ namespace Slang for( auto constraintDecl : genericDeclRef.getDecl()->getMembersOfType() ) { - DeclRef constraintDeclRef( + DeclRef constraintDeclRef = m_astBuilder->getSpecializedDeclRef( constraintDecl, solvedSubst); -- cgit v1.2.3