mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 16:26:39 +00:00
Store named constant values in the AST (#1011)
This enables us to stop using `Env` in the typechecker. As a byproduct, this commit also restructures the interpreter to handle run-time global initialization as part of ordinary execution, using the Action stack.
This commit is contained in:
1 parent
d88f95ad31
commit
461e178273
15 files changed
+309
-242
No files matched your search
@@ -344,6 +344,9 @@ class Continuation : public Statement {
|
||||
auto has_static_type() const -> bool { return static_type_.has_value(); }
|
||||
|
||||
auto value_category() const -> ValueCategory { return ValueCategory::Var; }
|
||||
auto constant_value() const -> std::optional<Nonnull<const Value*>> {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string name_;
|
||||
|
||||
Reference in new issue
Block a user