From 9f3e83cf0d664c87a618edf08d834829178030e6 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 6 Sep 2022 16:08:48 -0700 Subject: Specialize and SSA in a loop + better diagnostics on dynamic dispatch failure (#2396) * Report diagnostic when dynamic dispatch failed instead of crashing. * Specialize and SSA in a loop. Explicit specialization only interface. Co-authored-by: Yong He --- source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp') diff --git a/source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp b/source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp index 89b965739..0cfa86a1c 100644 --- a/source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp +++ b/source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp @@ -197,7 +197,8 @@ struct AssociatedTypeLookupSpecializationContext if (inst->getOp() == kIROp_WitnessTable) { auto seqId = inst->findDecoration(); - SLANG_RELEASE_ASSERT(seqId); + if (!seqId) + return; // Insert code to pack sequential ID into an uint2 at all use sites. IRUse* nextUse = nullptr; for (auto use = inst->firstUse; use; use = nextUse) -- cgit v1.2.3