Module sway_ir::instruction
source · [−]Expand description
Instructions for data manipulation, but mostly control flow.
Since Sway abstracts most low level operations behind traits they are translated into function calls which contain ASM blocks. Therefore at this stage Sway-IR doesn’t need low level operations such as binary arithmetic and logic operators.
Unfortuntely, using opaque ASM blocks limits the effectiveness of certain optimizations and this should be addressed in the future, perhaps by using compiler intrinsic calls instead of the ASM blocks where possible.
Structs
Provide a context for appending new Instruction
s to a Block
.
Iterate over all Instruction
s in a specific Block
.