diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2021-02-02 15:45:19 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-02 15:45:19 -0800 |
| commit | a1d543d9b1bf3b2bcd813a498d2d3e24de67106d (patch) | |
| tree | 2e467372f90afa561c4673517db86cd4a13254de /source/slang/slang-lower-to-ir.cpp | |
| parent | 17d2b2492d42e54ea4e0d907b4d84aa17f4a6f33 (diff) | |
Remove GlobalGenericParamSubstitution (#1684)
The `GlobalGenericParamSubsitution` class used to be used to represent the mapping of global-scope generic parameters to their concrete arguments, so that we could make use of those concrete arguments for things like layout. That representation caused a lot of pain for other parts of the compiler, though, because everything that dealt with `Substitution`s needed to account for the possibility of global-generic-param subsitutions even if they logically could not occur in most parts of the compiler.
We have since moved to a model where the values for global-scope generic parameters are stored in a single explicit global structure that is used by both layout computation and IR lowering. There is no actual code that construct `GlobalGenericParamSubstitution`s from scratch any more, so all of the support code for them was actually unused.
This change removes all the unused code, and shows that the tests still pass without it (even the tests that use global-scope generic parameters).
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index 1ea3c71fb..06e463d7d 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -7339,11 +7339,6 @@ LoweredValInfo emitDeclRef( // We need to proceed by considering the specializations that // have been put in place. - // Ignore any global generic type substitutions during lowering. - // Really, we don't even expect these to appear. - while(auto globalGenericSubst = as<GlobalGenericParamSubstitution>(subst)) - subst = globalGenericSubst->outer; - // If the declaration would not get wrapped in a `IRGeneric`, // even if it is nested inside of an AST `GenericDecl`, then // we should also ignore any generic substitutions. |
