From 545de51298ddda52ac51ded03ad489c98bdda397 Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Mon, 21 Nov 2022 10:29:57 -0500 Subject: WIP: Fixed inout struct and added testing for calls to non-differentiable functions (#2505) * Added non-differentiable call test * Extended testing for nondifferentiable calls * Fixed subtle issue with extensions on generic types not applying the correct substitutions, leading to unspecialized generics at the emit stage * More fixes. inout struct params now work fine * Update inout-struct-parameters-jvp.slang * Update slang-ir.cpp * Fixed hoisting lookup_interface_method * Fixed non-diff call return value * Fixed issue with phi nodes * Fixed problem with IRSpecialize preventing hoisitng of DifferentialPairType * Fixed non-diff call test to conform to the new 'no_diff' system --- source/slang/slang-check-decl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/slang/slang-check-decl.cpp') diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp index 009d0a987..5a1218abe 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -6024,6 +6024,13 @@ namespace Slang // without any additional substitutions. if (extDecl->targetType->equals(type)) { + /* + auto subst = trySolveConstraintSystem( + &constraints, + DeclRef(extGenericDecl, nullptr).as(), + as(as(type)->declRef.substitutions.substitutions)); + return DeclRef(extDecl, subst).as(); + */ return createDefaultSubstitutionsIfNeeded(m_astBuilder, this, extDeclRef).as(); } -- cgit v1.2.3