Use static name resolution in Interpreter (#1022)

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
This commit is contained in:
Geoff Romer
2022-01-21 09:48:11 -08:00
committed by GitHub
co-authored by Jon Meow
parent d28e75629e
commit c311c8849c
13 changed files with 304 additions and 221 deletions
+4 -9
View File
@@ -55,16 +55,11 @@ void Heap::Print(llvm::raw_ostream& out) const {
llvm::ListSeparator sep;
for (size_t i = 0; i < values_.size(); ++i) {
out << sep;
PrintAllocation(AllocationId(i), out);
if (!alive_[i]) {
out << "!!";
}
out << *values_[i];
}
}
void Heap::PrintAllocation(AllocationId allocation,
llvm::raw_ostream& out) const {
if (!alive_[allocation.index_]) {
out << "!!";
}
out << *values_[allocation.index_];
}
} // namespace Carbon