-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompilationContext.cs
More file actions
38 lines (27 loc) · 991 Bytes
/
Copy pathCompilationContext.cs
File metadata and controls
38 lines (27 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using Surab.Analysis;
using Surab.Compilation.LLVM;
namespace Surab.Compilation;
public sealed class CompilationContext
{
internal CompilationContext(
SurabProject project,
Target target,
LLVMCompilationContext llvmCompilationContext,
CompilationOptions options)
{
Project = project;
Target = target;
LLVM = llvmCompilationContext;
Options = options;
LLVMTarget = LLVMTarget.Create(this);
}
public SurabProject Project { get; }
public Target Target { get; }
internal LLVMTarget LLVMTarget { get; }
internal LLVMCompilationContext LLVM { get; }
public CompilationOptions Options { get; }
// TODO: Some of these might need to be moved to a reasoner context so that we can bust them as we rebuild reasoners on changes.
// Also, some of these should not be here in the first place as they're tied to LLVM.
internal Dictionary<HirValue, LLVMUnit> ValueToLLVMUnit { get; } = [];
internal Dictionary<HirType, SCPPTypeRef> TypeToLLVMType { get; } = [];
}