diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-07-06 09:52:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-06 09:52:53 -0700 |
| commit | 21a14cb4e0d578bc4f8a460016269a1199cac0da (patch) | |
| tree | 88a04619ceaaa37b87199dd82334cc9d102c156d /source/slang/lower.h | |
| parent | f313df379dd9e0d4395f072ffb87016a6f20d5a1 (diff) | |
| parent | f145e09a6dcbcf326f782b3e6a76dbf291c792cf (diff) | |
Merge pull request #53 from tfoleyNV/cross-compilation
Initial work on cross-compilation
Diffstat (limited to 'source/slang/lower.h')
| -rw-r--r-- | source/slang/lower.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/source/slang/lower.h b/source/slang/lower.h new file mode 100644 index 000000000..c690ea025 --- /dev/null +++ b/source/slang/lower.h @@ -0,0 +1,38 @@ +// lower.h +#ifndef SLANG_LOWER_H_INCLUDED +#define SLANG_LOWER_H_INCLUDED + +// The "lowering" step takes an input AST written in the complete Slang +// language and turns it into a more minimal format (still using the +// same AST) suitable for emission into lower-level languages. + +#include "../core/basic.h" + +#include "compiler.h" +#include "syntax.h" + +namespace Slang +{ + class EntryPointRequest; + class ProgramLayout; + class TranslationUnitRequest; + + struct LoweredEntryPoint + { + // The actual lowered entry point + RefPtr<FunctionSyntaxNode> entryPoint; + + // The generated program AST that + // contains the entry point and any + // other declarations it uses + RefPtr<ProgramSyntaxNode> program; + }; + + // Emit code for a single entry point, based on + // the input translation unit. + LoweredEntryPoint lowerEntryPoint( + EntryPointRequest* entryPoint, + ProgramLayout* programLayout, + CodeGenTarget target); +} +#endif |
