Module rustc::middle::trans::expr[src]
Translation of Expressions
Public entry points:
trans_into(bcx, expr, dest) -> bcx: evaluates an expression, storing the result intodest. This is the preferred form, if you can manage it.trans(bcx, expr) -> DatumBlock: evaluates an expression, yieldingDatumwith the result. You can then store the datum, inspect the value, etc. This may introduce temporaries if the datum is a structural type.trans_to_lvalue(bcx, expr, "...") -> DatumBlock: evaluates an expression and ensures that the result has a cleanup associated with it, creating a temporary stack slot if necessary.trans_local_var -> Datum: looks up a local variable or upvar.
See doc.rs for more comments.
Enums
| Dest | |
| cast_kind |
Functions
| cast_type_kind | |
| trans | Translates an expression, returning a datum (and new block)
encapsulating the result. When possible, it is preferred to
use |
| trans_into | This function is equivalent to |
| trans_local_var | Translates a reference to a local variable or argument. This always results in an lvalue datum. |
| trans_to_lvalue | Translates an expression in "lvalue" mode -- meaning that it returns a reference to the memory that the expr represents. |
| with_field_tys | Helper for enumerating the field types of structs, enums, or records.
The optional node ID here is the node ID of the path identifying the enum
variant in use. If none, this cannot possibly an enum variant (so, if it
is and |