Struct gccjit::Block [] [src]

pub struct Block<'ctx> { /* fields omitted */ }

Block represents a basic block in gccjit. Blocks are created by functions. A basic block consists of a series of instructions terminated by a terminator instruction, which can be either a jump to one block, a conditional branch to two blocks (true/false branches), a return, or a void return.

Methods

impl<'ctx> Block<'ctx>
[src]

Evaluates the rvalue parameter and discards its result. Equivalent to (void) in C.

Assigns the value of an rvalue to an lvalue directly. Equivalent to = in C.

Performs a binary operation on an LValue and an RValue, assigning the result of the binary operation to the LValue upon completion. Equivalent to the *=, +=, -=, etc. operator family in C.

Adds a comment to a block. It's unclear from the documentation what this actually means.

Terminates a block by branching to one of two blocks, depending on the value of a conditional RValue.

Terminates a block by unconditionally jumping to another block.

Terminates a block by returning from the containing function, setting the rvalue to be the return value of the function. This is equivalent to C's "return ". This function can only be used to terminate a block within a function whose return type is not void.

Terminates a block by returning from the containing function, returning no value. This is equivalent to C's bare "return" with no expression. This function can only be used to terminate a block within a function that returns void.

Trait Implementations

impl<'ctx> Copy for Block<'ctx>
[src]

impl<'ctx> Clone for Block<'ctx>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'ctx> ToObject<'ctx> for Block<'ctx>
[src]

impl<'ctx> Debug for Block<'ctx>
[src]

Formats the value using the given formatter.