mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 17:11:04 +01:00
Merge HandleValue into the Step functions (#598)
* moved most of logic from HandleValue into the Step functions * removed the HandleValue function * added some comments * responses to Geoffrey * move increment of act->pos out of the step logic for value actions * changed act->pos to start at 0 and not have any gaps * Update executable_semantics/interpreter/action.h Co-authored-by: Geoff Romer <gromer@google.com> * update comment based on Geoffrey's suggestion Co-authored-by: Geoff Romer <gromer@google.com>
This commit is contained in:
committed by
GitHub
co-authored by
Geoff Romer
parent
19e4bc55ce
commit
b60ef90d62
@@ -32,7 +32,11 @@ struct Action {
|
||||
const Value* val; // for finished actions with a value (ValAction)
|
||||
Address delete_tmp;
|
||||
} u;
|
||||
int pos; // position or state of the action
|
||||
int pos; // position or state of the action, starts at 0 and goes up to
|
||||
// the number of subexpressions.
|
||||
// pos indicates how many of the entries in the following `results` vector
|
||||
// will be filled in the next time this action is active.
|
||||
// For each i < pos, results[i] contains a pointer to a Value.
|
||||
std::vector<const Value*> results; // results from subexpression
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user