[meta] Add some Debug derives
This commit is contained in:
@@ -8,6 +8,7 @@ use cranelift_entity::{entity_impl, PrimaryMap};
|
|||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub enum Expr {
|
pub enum Expr {
|
||||||
Var(VarIndex),
|
Var(VarIndex),
|
||||||
Literal(Literal),
|
Literal(Literal),
|
||||||
@@ -363,6 +364,7 @@ impl VarPool {
|
|||||||
///
|
///
|
||||||
/// An `Apply` AST expression is created by using function call syntax on instructions. This
|
/// An `Apply` AST expression is created by using function call syntax on instructions. This
|
||||||
/// applies to both bound and unbound polymorphic instructions.
|
/// applies to both bound and unbound polymorphic instructions.
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Apply {
|
pub struct Apply {
|
||||||
pub inst: Instruction,
|
pub inst: Instruction,
|
||||||
pub args: Vec<Expr>,
|
pub args: Vec<Expr>,
|
||||||
|
|||||||
@@ -79,12 +79,14 @@ impl InstructionGroup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct PolymorphicInfo {
|
pub struct PolymorphicInfo {
|
||||||
pub use_typevar_operand: bool,
|
pub use_typevar_operand: bool,
|
||||||
pub ctrl_typevar: TypeVar,
|
pub ctrl_typevar: TypeVar,
|
||||||
pub other_typevars: Vec<TypeVar>,
|
pub other_typevars: Vec<TypeVar>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct InstructionContent {
|
pub struct InstructionContent {
|
||||||
/// Instruction mnemonic, also becomes opcode name.
|
/// Instruction mnemonic, also becomes opcode name.
|
||||||
pub name: String,
|
pub name: String,
|
||||||
@@ -139,7 +141,7 @@ pub struct InstructionContent {
|
|||||||
pub writes_cpu_flags: bool,
|
pub writes_cpu_flags: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct Instruction {
|
pub struct Instruction {
|
||||||
content: Rc<InstructionContent>,
|
content: Rc<InstructionContent>,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use crate::cdsl::typevar::{DerivedFunc, TypeSet, TypeVar};
|
|||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::iter::FromIterator;
|
use std::iter::FromIterator;
|
||||||
|
|
||||||
#[derive(Hash, PartialEq, Eq)]
|
#[derive(Debug, Hash, PartialEq, Eq)]
|
||||||
pub enum Constraint {
|
pub enum Constraint {
|
||||||
/// Constraint specifying that a type var tv1 must be wider than or equal to type var tv2 at
|
/// Constraint specifying that a type var tv1 must be wider than or equal to type var tv2 at
|
||||||
/// runtime. This requires that:
|
/// runtime. This requires that:
|
||||||
|
|||||||
Reference in New Issue
Block a user