feat(cfg): derive more base traits for CFG blocks (#6320)

This commit is contained in:
DonIsaac 2024-10-07 05:01:07 +00:00
parent 7672793542
commit fa4d505b92

View file

@ -3,7 +3,7 @@ use petgraph::stable_graph::NodeIndex;
pub type BasicBlockId = NodeIndex;
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct BasicBlock {
pub instructions: Vec<Instruction>,
pub unreachable: bool,
@ -31,7 +31,7 @@ impl Instruction {
}
}
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum InstructionKind {
Unreachable,
Statement,
@ -43,19 +43,19 @@ pub enum InstructionKind {
Iteration(IterationInstructionKind),
}
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ReturnInstructionKind {
ImplicitUndefined,
NotImplicitUndefined,
}
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum LabeledInstruction {
Labeled,
Unlabeled,
}
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum IterationInstructionKind {
Of,
In,