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: BlockTypeThe 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
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.
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 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
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
impl RefUnwindSafe for InstBlock
impl UnwindSafe for InstBlock
Blanket Implementations
Mutably borrows from an owned value. Read more