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
@@ -5,6 +5,7 @@
#ifndef EXECUTABLE_SEMANTICS_INTERPRETER_HEAP_ALLOCATION_INTERFACE_H_
#define EXECUTABLE_SEMANTICS_INTERPRETER_HEAP_ALLOCATION_INTERFACE_H_
#include "executable_semantics/common/arena.h"
#include "executable_semantics/common/nonnull.h"
#include "executable_semantics/interpreter/address.h"
@@ -26,6 +27,9 @@ class HeapAllocationInterface {
// Marks this allocation, and all of its sub-objects, as dead.
virtual void Deallocate(AllocationId allocation) = 0;
// Returns the arena used to allocate the values in this heap.
virtual auto arena() const -> Arena& = 0;
protected:
HeapAllocationInterface() = default;
virtual ~HeapAllocationInterface() = default;