summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-insts-stable-names.lua
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-10-06 17:21:37 -0700
committerGitHub <noreply@github.com>2025-10-07 00:21:37 +0000
commit6af3381f47e3c22e1657c0e0064fa466e8bde0f6 (patch)
treebe187939b58bd6196fb0b2e5824d5d60f312b6b3 /source/slang/slang-ir-insts-stable-names.lua
parentf4449d9376f0a5c32274fd812d135f3595159bae (diff)
Use symbol alias instead of wrapper synthesis to implement link-time types. (#8603)
This change achieves link-time type resolution with a different mechanism. For `extern struct Foo : IFoo = FooImpl;`, instead of synthesizing a wrapper type `Foo` that has a `FooImpl inner` field and dispatches all interface method calls to `inner.method()`, this PR completely removes this synthesis step, and instead just lower such `extern`/`export` types as `IRSymbolAlias` instructions that is just a reference to the type being wrapped. Then we extend the linker logic to clone the referenced symbol instead of the SymbolAlias insts itself during linking. By doing so, we greatly simply the logic need to support link-time types, and achieves higher robustness by not having to deal with many AST synthesis scenarios. Closes #8554. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-ir-insts-stable-names.lua')
-rw-r--r--source/slang/slang-ir-insts-stable-names.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/slang-ir-insts-stable-names.lua b/source/slang/slang-ir-insts-stable-names.lua
index 4b56cc52f..7032f2016 100644
--- a/source/slang/slang-ir-insts-stable-names.lua
+++ b/source/slang/slang-ir-insts-stable-names.lua
@@ -677,4 +677,5 @@ return {
["Decoration.DisableCopyEliminationDecoration"] = 673,
["Decoration.TempCallArgImmutableVar"] = 674,
["CastResourceToDescriptorHandle"] = 675,
+ ["SymbolAlias"] = 676,
}