summaryrefslogtreecommitdiff
path: root/source/slang/compiler.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2018-01-03 18:09:35 -0800
committerGitHub <noreply@github.com>2018-01-03 18:09:35 -0800
commite90dfcfd6a0a6d92688012b1216c46c24965cfc0 (patch)
tree89b1e0e3f0e95ea0bf586bd67fa36066f0021ce7 /source/slang/compiler.h
parent5da16a6360e40b9fd4d2275a5ef5b1af740c4abb (diff)
parent550405d2de2ca617046e73fe5ec7e5e1765a5c97 (diff)
Merge pull request #349 from csyonghe/master
Add API for querying TypeLayout from a Type
Diffstat (limited to 'source/slang/compiler.h')
-rw-r--r--source/slang/compiler.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/compiler.h b/source/slang/compiler.h
index 0e85a1088..1fca4751c 100644
--- a/source/slang/compiler.h
+++ b/source/slang/compiler.h
@@ -16,6 +16,7 @@ namespace Slang
class CompileRequest;
class ProgramLayout;
class PtrType;
+ class TypeLayout;
enum class CompilerMode
{
@@ -197,6 +198,9 @@ namespace Slang
// in the parent compile request (indexing matches
// the order they are given in the compile request)
List<CompileResult> entryPointResults;
+
+ // TypeLayouts created on the fly by reflection API
+ Dictionary<Type*, RefPtr<TypeLayout>> typeLayouts;
};
// A directory to be searched when looking for files (e.g., `#include`)
@@ -255,6 +259,9 @@ namespace Slang
// assocaited with a translation unit).
List<RefPtr<EntryPointRequest> > entryPoints;
+ // Types constructed by reflection API
+ Dictionary<String, RefPtr<Type>> types;
+
// The code generation profile we've been asked to use.
Profile profile;
@@ -366,6 +373,8 @@ namespace Slang
Name* name,
SourceLoc const& loc);
+ Decl* lookupGlobalDecl(Name* name);
+
SourceManager* getSourceManager()
{
return sourceManager;