Skip to content

v0.0.0-10077-g62bfdc9b5

Choose a tag to compare

Bytecode interpreter support for explicit state access.

The basic idea is:
* Introduce a new kind of InterpValue for a reference to a state element.
* Have type inference store these as the constexpr value for a state element NameDef in a proc with explicit state access.
* Add bytecode operations for read and write, corresponding to the builtin functions, and emit these operations for the builtin calls.
* Add a map of state element InterpValue by NameDef when interpreting a proc, and have the read and write operations use it.
* Stop expecting next() to return updated state when using explicit state access.

PiperOrigin-RevId: 925817995