diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2024-09-16 16:04:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-16 16:04:45 -0400 |
| commit | d866c0b9dfc0fdc8ad8cede4d7a8593f7ddf4716 (patch) | |
| tree | 77cd8713987e575aaf8c7436cd9d2fda8ddc9e63 /source/slang/slang-compiler.h | |
| parent | c46ca4cfeff2c78078aa3c4014cd6b0341ee01fc (diff) | |
Add API method to specialize function reference with argument types (#4966)
* Add `FunctionReflection::specializeWithArgTypes()`
* Update slang.cpp
* Use a shared semantics context on linkage
Improve performance on reflection queries
* Try to fix linux/mac compile errors
Diffstat (limited to 'source/slang/slang-compiler.h')
| -rwxr-xr-x | source/slang/slang-compiler.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/slang/slang-compiler.h b/source/slang/slang-compiler.h index 62e4c5f4a..0c788ae18 100755 --- a/source/slang/slang-compiler.h +++ b/source/slang/slang-compiler.h @@ -40,7 +40,9 @@ namespace Slang { struct PathInfo; - struct IncludeHandler; + struct IncludeHandler; + struct SharedSemanticsContext; + class ProgramLayout; class PtrType; class TargetProgram; @@ -2170,6 +2172,11 @@ namespace Slang DeclRef<Decl> declRef, List<Expr*> argExprs, DiagnosticSink* sink); + + DeclRef<Decl> specializeWithArgTypes( + DeclRef<Decl> funcDeclRef, + List<Type*> argTypes, + DiagnosticSink* sink); DiagnosticSink::Flags diagnosticSinkFlags = 0; @@ -2183,6 +2190,9 @@ namespace Slang m_retainedSession = nullptr; } + // Get shared semantics information for reflection purposes. + SharedSemanticsContext* getSemanticsForReflection(); + private: /// The global Slang library session that this linkage is a child of Session* m_session = nullptr; @@ -2236,6 +2246,8 @@ namespace Slang List<Type*> m_specializedTypes; + RefPtr<SharedSemanticsContext> m_semanticsForReflection; + }; /// Shared functionality between front- and back-end compile requests. |
