Change Declaration passing to use Ptr (#758)

This commit is contained in:
Jon Meow
2021-08-19 11:33:32 -07:00
committed by GitHub
parent 50cfda0e1c
commit 925c60b669
10 changed files with 37 additions and 34 deletions
@@ -183,8 +183,8 @@ void InitEnv(const Declaration& d, Env* env) {
}
}
static void InitGlobals(const std::list<const Declaration*>& fs) {
for (const auto* d : fs) {
static void InitGlobals(const std::list<Ptr<const Declaration>>& fs) {
for (const auto d : fs) {
InitEnv(*d, &globals);
}
}
@@ -1236,7 +1236,7 @@ void Step() {
}
// Interpret the whole porogram.
auto InterpProgram(const std::list<const Declaration*>& fs) -> int {
auto InterpProgram(const std::list<Ptr<const Declaration>>& fs) -> int {
state = global_arena->RawNew<State>(); // Runtime state.
if (tracing_output) {
llvm::outs() << "********** initializing globals **********\n";