mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Remove global_arena (#814)
With this, only main.cpp instantiates an arena. Maybe we'll want to split that up more later (e.g., so that the runtime interpreter uses its own arena), but given the intent to have type-checking update the AST, I thought this was a reasonable approach for now in order to avoid ownership complexities. Fixes #769
This commit is contained in:
@@ -135,8 +135,8 @@ class If : public Statement {
|
||||
|
||||
class Return : public Statement {
|
||||
public:
|
||||
explicit Return(SourceLocation loc)
|
||||
: Return(loc, global_arena->New<TupleLiteral>(loc), true) {}
|
||||
Return(Ptr<Arena> arena, SourceLocation loc)
|
||||
: Return(loc, arena->New<TupleLiteral>(loc), true) {}
|
||||
Return(SourceLocation loc, Ptr<const Expression> exp, bool is_omitted_exp)
|
||||
: Statement(Kind::Return, loc),
|
||||
exp(exp),
|
||||
|
||||
Reference in New Issue
Block a user