Implement serde and equality traits for SecondaryMap
This commit is contained in:
@@ -33,7 +33,7 @@ pub type CodeOffset = u32;
|
||||
pub type Addend = i64;
|
||||
|
||||
/// Relocation kinds for every ISA
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
|
||||
pub enum Reloc {
|
||||
/// absolute 4-byte
|
||||
|
||||
@@ -101,7 +101,7 @@ impl fmt::Display for StackSlotKind {
|
||||
}
|
||||
|
||||
/// Contents of a stack slot.
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
|
||||
pub struct StackSlotData {
|
||||
/// The kind of stack slot.
|
||||
@@ -154,7 +154,7 @@ impl fmt::Display for StackSlotData {
|
||||
/// Stack frame manager.
|
||||
///
|
||||
/// Keep track of all the stack slots used by a function.
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
|
||||
pub struct StackSlots {
|
||||
/// All allocated stack slots.
|
||||
|
||||
@@ -12,7 +12,7 @@ use std::vec::Vec;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Value location range.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
|
||||
pub struct ValueLocRange {
|
||||
/// The ValueLoc containing a ValueLabel during this range.
|
||||
|
||||
Reference in New Issue
Block a user