From d4567053523cb3fc0a2b54245c9b25cdc52365aa Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 14 Mar 2023 00:44:48 +0300 Subject: 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 Reviewed-by: raitobezarius --- tvix/eval/src/vm/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tvix/eval/src/vm/mod.rs') diff --git a/tvix/eval/src/vm/mod.rs b/tvix/eval/src/vm/mod.rs index 610246abe0c8..fbecab959054 100644 --- a/tvix/eval/src/vm/mod.rs +++ b/tvix/eval/src/vm/mod.rs @@ -37,7 +37,7 @@ use crate::{ use generators::{call_functor, Generator, GeneratorState}; -use self::generators::{GeneratorRequest, GeneratorResponse}; +use self::generators::{VMRequest, VMResponse}; /// Internal helper trait for ergonomically converting from a `Result` to a `Result` using the current span of a call frame. @@ -300,7 +300,7 @@ impl<'o> VM<'o> { let initial_msg = if catchable_error_occurred { catchable_error_occurred = false; - Some(GeneratorResponse::ForceError) + Some(VMResponse::ForceError) } else { None }; @@ -1009,8 +1009,8 @@ async fn resolve_with( ) -> Result { /// Fetch and force a value on the with-stack from the VM. async fn fetch_forced_with(co: &GenCo, idx: usize) -> Value { - match co.yield_(GeneratorRequest::WithValue(idx)).await { - GeneratorResponse::Value(value) => value, + match co.yield_(VMRequest::WithValue(idx)).await { + VMResponse::Value(value) => value, msg => panic!( "Tvix bug: VM responded with incorrect generator message: {}", msg @@ -1020,8 +1020,8 @@ async fn resolve_with( /// Fetch and force a value on the *captured* with-stack from the VM. async fn fetch_captured_with(co: &GenCo, idx: usize) -> Value { - match co.yield_(GeneratorRequest::CapturedWithValue(idx)).await { - GeneratorResponse::Value(value) => value, + match co.yield_(VMRequest::CapturedWithValue(idx)).await { + VMResponse::Value(value) => value, msg => panic!( "Tvix bug: VM responded with incorrect generator message: {}", msg -- cgit 1.4.1