diff options
Diffstat (limited to 'compiler/stable_mir/src')
| -rw-r--r-- | compiler/stable_mir/src/fold.rs | 2 | ||||
| -rw-r--r-- | compiler/stable_mir/src/mir/body.rs | 20 | ||||
| -rw-r--r-- | compiler/stable_mir/src/ty.rs | 4 | ||||
| -rw-r--r-- | compiler/stable_mir/src/visitor.rs | 2 | 
4 files changed, 14 insertions, 14 deletions
| diff --git a/compiler/stable_mir/src/fold.rs b/compiler/stable_mir/src/fold.rs index 6471b2c2a3a..ca6ea92c4a1 100644 --- a/compiler/stable_mir/src/fold.rs +++ b/compiler/stable_mir/src/fold.rs @@ -155,7 +155,7 @@ impl Foldable for RigidTy { RigidTy::FnDef(_, args) => *args = args.fold(folder)?, RigidTy::FnPtr(sig) => *sig = sig.fold(folder)?, RigidTy::Closure(_, args) => *args = args.fold(folder)?, - RigidTy::Generator(_, args, _) => *args = args.fold(folder)?, + RigidTy::Coroutine(_, args, _) => *args = args.fold(folder)?, RigidTy::Dynamic(pred, r, _) => { *pred = pred.fold(folder)?; *r = r.fold(folder)?; diff --git a/compiler/stable_mir/src/mir/body.rs b/compiler/stable_mir/src/mir/body.rs index 72f026ee8de..4de1f8940d9 100644 --- a/compiler/stable_mir/src/mir/body.rs +++ b/compiler/stable_mir/src/mir/body.rs @@ -1,4 +1,4 @@ -use crate::ty::{AdtDef, ClosureDef, Const, GeneratorDef, GenericArgs, Movability, Region}; +use crate::ty::{AdtDef, ClosureDef, Const, CoroutineDef, GenericArgs, Movability, Region}; use crate::Opaque; use crate::{ty::Ty, Span}; @@ -59,7 +59,7 @@ pub enum TerminatorKind { target: usize, unwind: UnwindAction, }, - GeneratorDrop, + CoroutineDrop, InlineAsm { template: String, operands: Vec<InlineAsmOperand>, @@ -94,8 +94,8 @@ pub enum AssertMessage { OverflowNeg(Operand), DivisionByZero(Operand), RemainderByZero(Operand), - ResumedAfterReturn(GeneratorKind), - ResumedAfterPanic(GeneratorKind), + ResumedAfterReturn(CoroutineKind), + ResumedAfterPanic(CoroutineKind), MisalignedPointerDereference { required: Operand, found: Operand }, } @@ -132,13 +132,13 @@ pub enum UnOp { } #[derive(Clone, Debug)] -pub enum GeneratorKind { - Async(AsyncGeneratorKind), +pub enum CoroutineKind { + Async(AsyncCoroutineKind), Gen, } #[derive(Clone, Debug)] -pub enum AsyncGeneratorKind { +pub enum AsyncCoroutineKind { Block, Closure, Fn, @@ -227,8 +227,8 @@ pub enum Rvalue { /// `dest = Foo { x: ..., y: ... }` from `dest.x = ...; dest.y = ...;` in the case that `Foo` /// has a destructor. /// - /// Disallowed after deaggregation for all aggregate kinds except `Array` and `Generator`. After - /// generator lowering, `Generator` aggregate kinds are disallowed too. + /// Disallowed after deaggregation for all aggregate kinds except `Array` and `Coroutine`. After + /// generator lowering, `Coroutine` aggregate kinds are disallowed too. Aggregate(AggregateKind, Vec<Operand>), /// * `Offset` has the same semantics as `<*const T>::offset`, except that the second @@ -331,7 +331,7 @@ pub enum AggregateKind { Tuple, Adt(AdtDef, VariantIdx, GenericArgs, Option<UserTypeAnnotationIndex>, Option<FieldIdx>), Closure(ClosureDef, GenericArgs), - Generator(GeneratorDef, GenericArgs, Movability), + Coroutine(CoroutineDef, GenericArgs, Movability), } #[derive(Clone, Debug)] diff --git a/compiler/stable_mir/src/ty.rs b/compiler/stable_mir/src/ty.rs index 003045a4696..0ed2813bccf 100644 --- a/compiler/stable_mir/src/ty.rs +++ b/compiler/stable_mir/src/ty.rs @@ -142,7 +142,7 @@ pub enum RigidTy { FnDef(FnDef, GenericArgs), FnPtr(PolyFnSig), Closure(ClosureDef, GenericArgs), - Generator(GeneratorDef, GenericArgs, Movability), + Coroutine(CoroutineDef, GenericArgs, Movability), Dynamic(Vec<Binder<ExistentialPredicate>>, Region, DynKind), Never, Tuple(Vec<Ty>), @@ -196,7 +196,7 @@ impl FnDef { pub struct ClosureDef(pub DefId); #[derive(Clone, Copy, PartialEq, Eq, Debug)] -pub struct GeneratorDef(pub DefId); +pub struct CoroutineDef(pub DefId); #[derive(Clone, Copy, PartialEq, Eq, Debug)] pub struct ParamDef(pub DefId); diff --git a/compiler/stable_mir/src/visitor.rs b/compiler/stable_mir/src/visitor.rs index 96100958138..a6020cc5bd9 100644 --- a/compiler/stable_mir/src/visitor.rs +++ b/compiler/stable_mir/src/visitor.rs @@ -148,7 +148,7 @@ impl Visitable for RigidTy { RigidTy::FnDef(_, args) => args.visit(visitor), RigidTy::FnPtr(sig) => sig.visit(visitor), RigidTy::Closure(_, args) => args.visit(visitor), - RigidTy::Generator(_, args, _) => args.visit(visitor), + RigidTy::Coroutine(_, args, _) => args.visit(visitor), RigidTy::Dynamic(pred, r, _) => { pred.visit(visitor)?; r.visit(visitor) | 
