Skip to main content

Module operand

Module operand 

Source

Re-exportsΒ§

use std::fmt; πŸ”’
use itertools::Either; πŸ”’
use rustc_abi as abi; πŸ”’
use rustc_abi as abi; πŸ”’
use rustc_abi::Align; πŸ”’
use rustc_abi::BackendRepr; πŸ”’
use rustc_abi::FIRST_VARIANT; πŸ”’
use rustc_abi::FieldIdx; πŸ”’
use rustc_abi::Primitive; πŸ”’
use rustc_abi::Size; πŸ”’
use rustc_abi::TagEncoding; πŸ”’
use rustc_abi::VariantIdx; πŸ”’
use rustc_abi::Variants; πŸ”’
use rustc_attr_ir::lang_items::LangItem; πŸ”’
use rustc_middle::mir::interpret::Pointer; πŸ”’
use rustc_middle::mir::interpret::Scalar; πŸ”’
use rustc_middle::mir::interpret::alloc_range; πŸ”’
use rustc_middle::mir; πŸ”’
use rustc_middle::mir::ConstValue; πŸ”’
use rustc_middle::ty::layout::LayoutOf; πŸ”’
use rustc_middle::ty::layout::TyAndLayout; πŸ”’
use rustc_middle::ty; πŸ”’
use rustc_middle::ty::Ty; πŸ”’
use rustc_session::config::AnnotateMoves; πŸ”’
use rustc_session::config::DebugInfo; πŸ”’
use rustc_session::config::OptLevel; πŸ”’
use rustc_span::bug; πŸ”’
use rustc_span::span_bug; πŸ”’
use tracing::debug; πŸ”’
use tracing::instrument; πŸ”’
use tracing::instrument; πŸ”’
use super::place::PlaceRef; πŸ”’
use super::place::PlaceValue; πŸ”’
use super::rvalue::transmute_scalar; πŸ”’
use super::FunctionCx; πŸ”’
use super::LocalRef; πŸ”’
use crate::MemFlags; πŸ”’
use crate::common::IntPredicate; πŸ”’
use crate::traits::*; πŸ”’

StructsΒ§

OperandRef
An OperandRef is an β€œSSA” reference to a Rust value, along with its type.
OperandRefBuilder πŸ”’
Allows building up an OperandRef by setting fields one at a time.

EnumsΒ§

OperandValue
The representation of a Rust value. The enum variant is in fact uniquely determined by the value’s type, but is kept as a safety check.
OperandValueBuilder πŸ”’
Each of these variants starts out as Either::Right when it’s uninitialized, then setting the field changes that to Either::Left with the backend value.

ConstantsΒ§

MOVE_ANNOTATION_DEFAULT_LIMIT πŸ”’
Default size limit for move/copy annotations (in bytes). 64 bytes is a common size of a cache line, and the assumption is that anything this size or below is very cheap to move/copy, so only annotate copies larger than this.