Module rustc::middle::trans::datum[src]

See the section on datums in doc.rs for an overview of what Datums are and how they are intended to be used.

Structs

Datum

A Datum encapsulates the result of evaluating an expression. It describes where the value is stored, what Rust type the value has, whether it is addressed by reference, and so forth. Please refer the section on datums in doc.rs for more details.

DatumBlock
Lvalue
Rvalue

Enums

Expr
RvalueMode

Traits

KindOps

Functions

appropriate_rvalue_mode

Indicates the "appropriate" mode for this value, which is either by ref or by value, depending on whether type is immediate or not.

immediate_rvalue
immediate_rvalue_bcx
lvalue_scratch_datum

Allocates temporary space on the stack using alloca() and returns a by-ref Datum pointing to it. The memory will be dropped upon exit from scope. The callback populate should initialize the memory. If zero is true, the space will be zeroed when it is allocated; this is not necessary unless bcx does not dominate the end of scope.

rvalue_scratch_datum

Allocates temporary space on the stack using alloca() and returns a by-ref Datum pointing to it. If zero is true, the space will be zeroed when it is allocated; this is normally not necessary, but in the case of automatic rooting in match statements it is possible to have temporaries that may not get initialized if a certain arm is not taken, so we must zero them. You must arrange any cleanups etc yourself!