feat: suspend managed calls on generic awaitable operands
This commit is contained in:
@@ -38,6 +38,7 @@ pub struct EndorFrame {
|
||||
pub(crate) name: String,
|
||||
pub(crate) instruction_offset: usize,
|
||||
pub(crate) current_offset: usize,
|
||||
pub(crate) waiting: bool,
|
||||
pub(crate) localsplus: Vec<Option<Value>>,
|
||||
pub(crate) stack: Vec<StackEntry>,
|
||||
}
|
||||
@@ -118,8 +119,17 @@ pub(crate) struct SuspendedCall {
|
||||
/// not keep a VM-wide heap scope active between quanta.
|
||||
#[derive(Debug)]
|
||||
pub enum CoroutineProgress {
|
||||
Pending { instructions: usize },
|
||||
Complete { value: Value, instructions: usize },
|
||||
Waiting {
|
||||
awaitable: ObjectRef,
|
||||
instructions: usize,
|
||||
},
|
||||
Pending {
|
||||
instructions: usize,
|
||||
},
|
||||
Complete {
|
||||
value: Value,
|
||||
instructions: usize,
|
||||
},
|
||||
}
|
||||
#[derive(Debug)]
|
||||
pub(crate) enum CoroutineState {
|
||||
|
||||
Reference in New Issue
Block a user