chore(tvix): Generator{Request|Response} -> VM{Request|Response}

We settled on this being the most reasonable name for this construct.

Change-Id: Ic31c45461a842f22aa05f4446123fe3a61dfdbc0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8291
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
This commit is contained in:
Vincent Ambo 2023-03-14 00:44:48 +03:00 committed by tazjin
parent 1e80b9ea8b
commit d456705352
3 changed files with 121 additions and 130 deletions

View file

@ -11,7 +11,7 @@ use std::rc::Rc;
use tabwriter::TabWriter;
use crate::chunk::Chunk;
use crate::generators::GeneratorRequest;
use crate::generators::VMRequest;
use crate::opcode::{CodeIdx, OpCode};
use crate::value::Lambda;
use crate::SourceCode;
@ -58,7 +58,7 @@ pub trait RuntimeObserver {
fn observe_suspend_generator(&mut self, _frame_at: usize, _name: &str, _stack: &[Value]) {}
/// Called when a generator requests an action from the VM.
fn observe_generator_request(&mut self, _name: &str, _msg: &GeneratorRequest) {}
fn observe_generator_request(&mut self, _name: &str, _msg: &VMRequest) {}
/// Called when the runtime replaces the current call frame for a
/// tail call.
@ -249,7 +249,7 @@ impl<W: Write> RuntimeObserver for TracingObserver<W> {
self.write_stack(stack);
}
fn observe_generator_request(&mut self, name: &str, msg: &GeneratorRequest) {
fn observe_generator_request(&mut self, name: &str, msg: &VMRequest) {
let _ = writeln!(
&mut self.writer,
"=== generator '{}' requested {} ===",