mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 19:41:07 +01:00
Use static name resolution in Interpreter (#1022)
Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
co-authored by
Jon Meow
parent
d28e75629e
commit
c311c8849c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user