summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-lower-generics.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-07-21 22:52:27 -0700
committerGitHub <noreply@github.com>2022-07-21 22:52:27 -0700
commit73b52f6075eb8a4f674e5d66d2a6192ca71f26d3 (patch)
tree0fb7fbea8356323dcb0ac4173cf2fc97c02d3fcf /source/slang/slang-ir-lower-generics.cpp
parent91c8c3f32c4b827dedc74d2ecdfe72a3403fc357 (diff)
Allow dynamic dispatch to handle nested interface-typed fields. (#2336)
Diffstat (limited to 'source/slang/slang-ir-lower-generics.cpp')
-rw-r--r--source/slang/slang-ir-lower-generics.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/slang/slang-ir-lower-generics.cpp b/source/slang/slang-ir-lower-generics.cpp
index f517719ad..3b9a17738 100644
--- a/source/slang/slang-ir-lower-generics.cpp
+++ b/source/slang/slang-ir-lower-generics.cpp
@@ -5,6 +5,7 @@
#include "slang-ir-augment-make-existential.h"
#include "slang-ir-generics-lowering-context.h"
#include "slang-ir-lower-existential.h"
+#include "slang-ir-lower-tuple-types.h"
#include "slang-ir-lower-generic-function.h"
#include "slang-ir-lower-generic-call.h"
#include "slang-ir-lower-generic-type.h"
@@ -194,15 +195,19 @@ namespace Slang
if (sink->getErrorCount() != 0)
return;
- generateAnyValueMarshallingFunctions(&sharedContext);
- if (sink->getErrorCount() != 0)
- return;
-
// This optional step replaces all uses of witness tables and RTTI objects with
// sequential IDs. Without this step, we will emit code that uses function pointers and
// real RTTI objects and witness tables.
specializeRTTIObjects(&sharedContext, sink);
+ lowerTuples(module, sink);
+ if (sink->getErrorCount() != 0)
+ return;
+
+ generateAnyValueMarshallingFunctions(&sharedContext);
+ if (sink->getErrorCount() != 0)
+ return;
+
// We might have generated new temporary variables during lowering.
// An SSA pass can clean up unnecessary load/stores.
constructSSA(module);