mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add underscores to private data members (#898)
This is the last PR I plan to have focused on #720
This commit is contained in:
@@ -26,7 +26,7 @@ using Env = Dictionary<std::string, Address>;
|
||||
class Interpreter {
|
||||
public:
|
||||
explicit Interpreter(Nonnull<Arena*> arena, bool trace)
|
||||
: arena(arena), globals(arena), heap(arena), trace_(trace) {}
|
||||
: arena_(arena), globals_(arena), heap_(arena), trace_(trace) {}
|
||||
|
||||
// Interpret the whole program.
|
||||
auto InterpProgram(llvm::ArrayRef<Nonnull<Declaration*>> fs,
|
||||
@@ -47,7 +47,7 @@ class Interpreter {
|
||||
|
||||
// Support TypeChecker allocating values on the heap.
|
||||
auto AllocateValue(Nonnull<const Value*> v) -> Address {
|
||||
return heap.AllocateValue(v);
|
||||
return heap_.AllocateValue(v);
|
||||
}
|
||||
|
||||
void InitEnv(const Declaration& d, Env* env);
|
||||
@@ -152,14 +152,14 @@ class Interpreter {
|
||||
|
||||
void PrintState(llvm::raw_ostream& out);
|
||||
|
||||
Nonnull<Arena*> arena;
|
||||
Nonnull<Arena*> arena_;
|
||||
|
||||
// Globally-defined entities, such as functions, structs, or choices.
|
||||
Env globals;
|
||||
Env globals_;
|
||||
|
||||
Stack<Nonnull<Frame*>> stack;
|
||||
Heap heap;
|
||||
std::optional<Nonnull<const Value*>> program_value;
|
||||
Stack<Nonnull<Frame*>> stack_;
|
||||
Heap heap_;
|
||||
std::optional<Nonnull<const Value*>> program_value_;
|
||||
|
||||
bool trace_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user