https://github.com/shader-slang/slang
Revision df6eeb93c1718334779ae328db277cdf7a9d7b04 authored by Yong He on 12 January 2018, 22:15:56 UTC, committed by Tim Foley on 12 January 2018, 22:15:56 UTC
This commit changes the type of `DeclRefBase::substitutions` from `RefPtr<Substitutions>` to `SubstitutionSet`, which is a new type defined as following:
```
struct SubstitutionSet
{
    RefPtr<GenericSubstitution> genericSubstitutions;
    RefPtr<ThisTypeSubstitution> thisTypeSubstitution;
    RefPtr<GlobalGenericParamSubstitution> globalGenParamSubstitutions;
}
```
This change get rid of most helper functions to retreive the substitution of a certain type, as well as surgery operations to insert a `ThisTypeSubstitution` or `GlobalGenericTypeSubstittuion` at top or bottom of the substitution chain. It also simplies type comparison when certain type of substitution should not be considered as part of type definition.
1 parent 8daafcc
History
Tip revision: df6eeb93c1718334779ae328db277cdf7a9d7b04 authored by Yong He on 12 January 2018, 22:15:56 UTC
Refactor substitution representation in DeclRefBase (#363)
Tip revision: df6eeb9
File Mode Size
build
docs
examples
external
source
tests
tools
.gitattributes -rw-r--r-- 95 bytes
.gitignore -rw-r--r-- 398 bytes
.gitmodules -rw-r--r-- 107 bytes
.travis.yml -rw-r--r-- 1.6 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.1 KB
LICENSE -rw-r--r-- 1.1 KB
Makefile -rw-r--r-- 6.3 KB
README.md -rw-r--r-- 6.2 KB
appveyor.yml -rw-r--r-- 3.5 KB
slang.h -rw-r--r-- 41.9 KB
slang.sln -rw-r--r-- 9.1 KB
test.bat -rw-r--r-- 1.4 KB

README.md

back to top