Refactor usage of SecondaryMap impls (serde, PartialEq)

This commit is contained in:
Artur Jamro
2019-08-22 10:09:40 -07:00
committed by Dan Gohman
parent bb0a443747
commit fad70eb8bb
19 changed files with 65 additions and 290 deletions

View File

@@ -12,7 +12,7 @@ use std::ops::Range;
use std::vec::Vec;
/// Compiled machine code: body and jump table offsets.
#[derive(Debug, Clone)]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct CodeAndJTOffsets {
/// The function body.
pub body: Vec<u8>,
@@ -24,7 +24,7 @@ pub struct CodeAndJTOffsets {
type Functions = PrimaryMap<DefinedFuncIndex, CodeAndJTOffsets>;
/// The result of compiling a WebAssembly module's functions.
#[derive(Deserialize, Serialize, Debug)]
#[derive(Deserialize, Serialize, Debug, PartialEq, Eq)]
pub struct Compilation {
/// Compiled machine code for the function bodies.
functions: Functions,
@@ -95,7 +95,7 @@ impl<'a> Iterator for Iter<'a> {
}
/// A record of a relocation to perform.
#[derive(Serialize, Deserialize, Debug, Clone)]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct Relocation {
/// The relocation code.
pub reloc: binemit::Reloc,