Struct cardinal_codegen::instruction::InstBlock[][src]

pub struct InstBlock {
    pub block_type: BlockType,
    pub elses: Vec<InstBlock>,
    pub else_block: Option<Box<InstBlock>>,
    pub values: Vec<ValueInfo>,
    pub insts: Vec<InstructionInfo>,
    pub imports: Vec<String>,
    pub blocks: Vec<InstBlock>,
}
Expand description

A block for instruction building.

Fields

block_type: BlockType

The type of the block.

elses: Vec<InstBlock>

A list of elseif statements for the block, if any.

else_block: Option<Box<InstBlock>>

An else_block for If blocks.

values: Vec<ValueInfo>

A list of values defined in the block.

insts: Vec<InstructionInfo>

A list of instructions in the block.

imports: Vec<String>

A list of imports in the block.

blocks: Vec<InstBlock>

A list of nested blocks in the block.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Adds a required import.

Defines a value in the InstBuilder’s values table, then returning the value.

Creates a block and registers it in the InstBuilder’s block table, returning a reference to said block. Read more

Pushes an instruction to the InstBuilder’s instruction list.

Returns a pointer to the given block.

Creates an unsigned 64-bit integer constant.

Creates an unsigned 64-bit float constant.

Creates an unsigned 64-bit double constant.

Creates a boolean constant.

Creates a string constant.

Creates a named reference constant.

Creates a named reference constant including the provided properties.

Returns a new basic NamedProperty.

Returns a new static NamedProperty.

Returns a new pointer NamedProperty.

Returns a new index NamedProperty.

Creates a C target specific boolean type. Requires the stdbool.h standard library to be provided by your C compiler. Read more

Creates a C target specific 8 bit unsigned integer type. Requires the stdint.h standard library to be provided by your C compiler. Read more

Creates a C target specific 16 bit unsigned integer type. Requires the stdint.h standard library to be provided by your C compiler. Read more

Creates a C target specific 32 bit unsigned integer type. Requires the stdint.h standard library to be provided by your C compiler. Read more

Creates a C target specific 64 bit unsigned integer type. Requires the stdint.h standard library to be provided by your C compiler. Read more

Creates a C target specific size that scales to the target’s architecture. For 32-bit processors, this is the same as a uint32 and for 64-bit architectures this is the same as a uint64. Read more

Creates a C target specific 8 bit integer type. Requires the stdint.h standard library to be provided by your C compiler. Read more

Creates a C target specific 16 bit integer type. Requires the stdint.h standard library to be provided by your C compiler. Read more

Creates a C target specific 32 bit integer type. Requires the stdint.h standard library to be provided by your C compiler. Read more

Creates a C target specific 64 bit integer type. Requires the stdint.h standard library to be provided by your C compiler. Read more

Creates a C target specific size that scales to the target’s architecture. For 32-bit processors, this is the same as an int32 and for 64-bit architectures this is the same as an int64. Read more

A C-specific character type.

Adds two values together and returns the sum of the expression.

Subtracts two values together and returns the sum of the expression.

Multiplies two values together and returns the sum of the expression.

Divides two values together and returns the sum of the expression.

Divides two values together and returns the remainder of the expression. Equivalent to the % (modulus) operator. Read more

Returns the results of the Bitwise AND operation.

Returns the results of the Bitwise OR operation.

Returns the results of the Bitwise XOR operation.

Returns the results of the Bitwise NOT operation.

Returns the results of the Bitwise left shift operation.

Returns the results of the Bitwise right shift operation.

Tests if two values are equal to eachother. Returns a boolean value with the result of the operation. Read more

Tests if two values are not equal to eachother. Returns a boolean value with the result of the operation. Read more

Tests if the first value is greater than the second. Returns a boolean value with the result of the operation. Read more

Tests if the first value is greater than or equal to the second. Returns a boolean value with the result of the operation. Read more

Tests if the first value is less than the second. Returns a boolean value with the result of the operation. Read more

Tests if the first value is less than or equal to the second. Returns a boolean value with the result of the operation. Read more

Negates a boolean value.

Returns if either value is equal to true.

Returns if both values are equal to true.

Unconditionally jumps to a certain block.

Uses a named reference as a value.

Sets a value, equivalent to the = assignment operator in most programming languages.

Makes a function call with the specified function name and arguments.

Makes a function call and returns the value that the function call returns.

Returns a value from the function that this InstBuilder resides in.

Returns and exits the function, without returning a value. The function should have a return type of void. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.