mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 07:21:04 +01:00
Express stack updates using return values. (#747)
This enables the interpreter logic to express its intent more directly, especially in the common cases, and enables us to get rid of ValAction. It's also a step toward simplifying and encapsulating `state->stack`.
This commit is contained in:
@@ -35,9 +35,6 @@ void Action::Print(llvm::raw_ostream& out) const {
|
||||
case Action::Kind::StatementAction:
|
||||
cast<StatementAction>(*this).Stmt()->PrintDepth(1, out);
|
||||
break;
|
||||
case Action::Kind::ValAction:
|
||||
out << *cast<ValAction>(*this).Val();
|
||||
break;
|
||||
}
|
||||
out << "<" << pos << ">";
|
||||
if (results.size() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user