struct AsyncDestructorCtorShimBuilder<'tcx> {
tcx: TyCtxt<'tcx>,
def_id: DefId,
self_ty: Option<Ty<'tcx>>,
span: Span,
source_info: SourceInfo,
typing_env: TypingEnv<'tcx>,
stack: Vec<Operand<'tcx>>,
last_bb: BasicBlock,
top_cleanup_bb: Option<BasicBlock>,
locals: IndexVec<Local, LocalDecl<'tcx>>,
bbs: IndexVec<BasicBlock, BasicBlockData<'tcx>>,
}
Expand description
Builder for async_drop_in_place shim. Functions as a stack machine to build up an expression using combinators. Stack contains pairs of locals and types. Combinator is a not yet instantiated pair of a function and a type, is considered to be an operator which consumes operands from the stack by instantiating its function and its type with operand types and moving locals into the function call. Top pair is considered to be the last operand.
Fields§
§tcx: TyCtxt<'tcx>
§def_id: DefId
§self_ty: Option<Ty<'tcx>>
§span: Span
§source_info: SourceInfo
§typing_env: TypingEnv<'tcx>
§stack: Vec<Operand<'tcx>>
§last_bb: BasicBlock
§top_cleanup_bb: Option<BasicBlock>
§locals: IndexVec<Local, LocalDecl<'tcx>>
§bbs: IndexVec<BasicBlock, BasicBlockData<'tcx>>
Implementations§
Source§impl<'tcx> AsyncDestructorCtorShimBuilder<'tcx>
impl<'tcx> AsyncDestructorCtorShimBuilder<'tcx>
const SELF_PTR: Local
const INPUT_COUNT: usize = 1usize
const MAX_STACK_LEN: usize = 2usize
fn new(tcx: TyCtxt<'tcx>, def_id: DefId, self_ty: Option<Ty<'tcx>>) -> Self
fn build(self) -> Body<'tcx>
fn build_enum( self, adt_def: AdtDef<'tcx>, args: GenericArgsRef<'tcx>, surface_drop: Option<SurfaceDropKind>, ) -> Body<'tcx>
fn build_chain<I>( self, surface_drop: Option<SurfaceDropKind>, elem_tys: I, ) -> Body<'tcx>
fn build_zst_output(self) -> Body<'tcx>
fn build_deferred_drop_in_place(self) -> Body<'tcx>
fn build_fused_async_surface(self) -> Body<'tcx>
fn build_fused_sync_surface(self) -> Body<'tcx>
fn build_slice(self, is_array: bool, elem_ty: Ty<'tcx>) -> Body<'tcx>
fn put_zst_output(&mut self)
Sourcefn put_array_as_slice(&mut self, elem_ty: Ty<'tcx>)
fn put_array_as_slice(&mut self, elem_ty: Ty<'tcx>)
Given that Self is [ElemTy; N]
puts to_drop: *mut [ElemTy]
on top of the stack.
Sourcefn put_field(&mut self, field: FieldIdx, field_ty: Ty<'tcx>)
fn put_field(&mut self, field: FieldIdx, field_ty: Ty<'tcx>)
If given Self is a struct puts to_drop: *mut FieldTy
on top
of the stack.
Sourcefn put_variant_field(
&mut self,
variant_sym: Symbol,
variant: VariantIdx,
field: FieldIdx,
field_ty: Ty<'tcx>,
)
fn put_variant_field( &mut self, variant_sym: Symbol, variant: VariantIdx, field: FieldIdx, field_ty: Ty<'tcx>, )
If given Self is an enum puts to_drop: *mut FieldTy
on top of
the stack.
Sourcefn put_discr(&mut self, discr: Discr<'tcx>)
fn put_discr(&mut self, discr: Discr<'tcx>)
If given Self is an enum puts to_drop: *mut FieldTy
on top of
the stack.
Sourcefn put_temp_rvalue(&mut self, rvalue: Rvalue<'tcx>)
fn put_temp_rvalue(&mut self, rvalue: Rvalue<'tcx>)
Puts x: RvalueType
on top of the stack.
Sourcefn put_operand(&mut self, operand: Operand<'tcx>)
fn put_operand(&mut self, operand: Operand<'tcx>)
Puts operand on top of the stack.
fn combine_async_surface(&mut self) -> Ty<'tcx>
fn combine_sync_surface(&mut self) -> Ty<'tcx>
fn combine_deferred_drop_in_place(&mut self) -> Ty<'tcx>
fn combine_fuse(&mut self, inner_future_ty: Ty<'tcx>) -> Ty<'tcx>
fn combine_slice(&mut self, elem_ty: Ty<'tcx>) -> Ty<'tcx>
fn combine_defer(&mut self, to_drop_ty: Ty<'tcx>) -> Ty<'tcx>
fn combine_chain(&mut self, first: Ty<'tcx>, second: Ty<'tcx>) -> Ty<'tcx>
fn combine_either(&mut self, other: Ty<'tcx>, matched: Ty<'tcx>) -> Ty<'tcx>
fn return_(self) -> Body<'tcx>
fn apply_combinator( &mut self, arity: usize, function: LangItem, args: &[GenericArg<'tcx>], ) -> Ty<'tcx>
Auto Trait Implementations§
impl<'tcx> DynSend for AsyncDestructorCtorShimBuilder<'tcx>
impl<'tcx> DynSync for AsyncDestructorCtorShimBuilder<'tcx>
impl<'tcx> Freeze for AsyncDestructorCtorShimBuilder<'tcx>
impl<'tcx> !RefUnwindSafe for AsyncDestructorCtorShimBuilder<'tcx>
impl<'tcx> !Send for AsyncDestructorCtorShimBuilder<'tcx>
impl<'tcx> !Sync for AsyncDestructorCtorShimBuilder<'tcx>
impl<'tcx> Unpin for AsyncDestructorCtorShimBuilder<'tcx>
impl<'tcx> !UnwindSafe for AsyncDestructorCtorShimBuilder<'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<P> IntoQueryParam<P> for P
impl<P> IntoQueryParam<P> for P
fn into_query_param(self) -> P
Source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
default fn from_cycle_error( tcx: Tcx, cycle_error: &CycleError, _guar: ErrorGuaranteed, ) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 152 bytes