Module tvix_eval::vm::generators

source ยท
Expand description

This module implements generator logic for the VM. Generators are functions used during evaluation which can suspend their execution during their control flow, and request that the VM do something.

This is used to keep the VMโ€™s stack size constant even when evaluating deeply nested recursive data structures.

We implement generators using the genawaiter crate.

Structsยง

  • This is a generator which stores its state on the heap.

Enumsยง

  • GeneratorState ๐Ÿ”’
    States that a generator can be in while being driven by the VM.
  • Messages that can be sent from generators to the VM. In most cases, the VM will suspend the generator when receiving a message and enter some other frame to process the request.
  • Responses returned to generators from the VM.

Functionsยง

Type Aliasesยง