mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 14:00:14 +01:00
Store named constant values in the AST (#1011)
This enables us to stop using `Env` in the typechecker. As a byproduct, this commit also restructures the interpreter to handle run-time global initialization as part of ordinary execution, using the Action stack.
This commit is contained in:
@@ -41,8 +41,7 @@ void ExecProgram(Nonnull<Arena*> arena, AST ast, bool trace) {
|
||||
}
|
||||
llvm::outs() << "********** starting execution **********\n";
|
||||
}
|
||||
int result =
|
||||
Interpreter(arena, trace).InterpProgram(ast.declarations, *ast.main_call);
|
||||
int result = Interpreter(arena, trace).InterpProgram(ast);
|
||||
llvm::outs() << "result: " << result << "\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user