Move all new's to global_arena, and remove ASAN disabling (#690)

Note this changes identifiers from char* to string to avoid malloc.

Fixes #580
This commit is contained in:
Jon Meow
2021-08-02 11:08:22 -07:00
committed by GitHub
parent f1028fcc27
commit 9829f188b7
18 changed files with 130 additions and 120 deletions
@@ -5,6 +5,7 @@
#include "executable_semantics/syntax/syntax_helpers.h"
#include "common/ostream.h"
#include "executable_semantics/common/arena.h"
#include "executable_semantics/common/tracing_flag.h"
#include "executable_semantics/interpreter/interpreter.h"
#include "executable_semantics/interpreter/typecheck.h"
@@ -19,7 +20,7 @@ void ExecProgram(std::list<Declaration>* fs) {
}
llvm::outs() << "********** type checking **********\n";
}
state = new State(); // Compile-time state.
state = global_arena->New<State>(); // Compile-time state.
TypeCheckContext p = TopLevel(fs);
TypeEnv top = p.types;
Env ct_top = p.values;