mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-15 20:58:15 +00:00
Move a little logic into TypeChecker to narrow what's exposed. (#938)
This commit is contained in:
1 parent
27e084d37a
commit
2f15a64a6b
4 files changed
+40
-27
No files matched your search
@@ -50,13 +50,7 @@ void ExecProgram(Nonnull<Arena*> arena, AST ast, bool trace) {
|
||||
// (particularly templates) may require more passes.
|
||||
ResolveNames(arena, ast);
|
||||
ResolveControlFlow(ast);
|
||||
TypeChecker type_checker(arena, trace);
|
||||
TypeChecker::TypeCheckContext p = type_checker.TopLevel(&ast.declarations);
|
||||
TypeEnv top = p.types;
|
||||
Env ct_top = p.values;
|
||||
for (const auto decl : ast.declarations) {
|
||||
type_checker.TypeCheck(decl, top, ct_top);
|
||||
}
|
||||
TypeChecker(arena, trace).TypeCheck(ast);
|
||||
if (trace) {
|
||||
llvm::outs() << "\n";
|
||||
llvm::outs() << "********** type checking complete **********\n";
|
||||
|
||||
Reference in new issue
Block a user