replace custom modular_bitfields fork with update upstream
part of #2468
This commit is contained in:
@@ -52,7 +52,7 @@ where
|
||||
payload_offset - header_offset
|
||||
}
|
||||
|
||||
#[derive(BitfieldSpecifier, Copy, Clone, Debug, PartialEq)]
|
||||
#[derive(Specifier, Copy, Clone, Debug, PartialEq)]
|
||||
#[bits = 7]
|
||||
pub enum ArenaHeaderTag {
|
||||
Integer = 0b10,
|
||||
|
||||
@@ -23,7 +23,7 @@ use arcu::rcu_ref::RcuRef;
|
||||
use arcu::Rcu;
|
||||
use indexmap::IndexSet;
|
||||
|
||||
use scryer_modular_bitfield::prelude::*;
|
||||
use modular_bitfield::prelude::*;
|
||||
|
||||
#[bitfield]
|
||||
#[repr(u64)]
|
||||
|
||||
@@ -17,7 +17,7 @@ use crate::types::*;
|
||||
use core::marker::PhantomData;
|
||||
use fxhash::FxBuildHasher;
|
||||
use indexmap::IndexSet;
|
||||
use scryer_modular_bitfield::prelude::*;
|
||||
use modular_bitfield::prelude::*;
|
||||
use std::cmp::Ordering;
|
||||
|
||||
use std::ops::Deref;
|
||||
@@ -496,7 +496,7 @@ impl<'a> Iterator for EagerStackfulPreOrderHeapIter<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(BitfieldSpecifier, Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[derive(Specifier, Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[bits = 2]
|
||||
enum IterStackLocTag {
|
||||
Iterable,
|
||||
@@ -504,7 +504,7 @@ enum IterStackLocTag {
|
||||
PendingMark,
|
||||
}
|
||||
|
||||
#[derive(BitfieldSpecifier, Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[derive(Specifier, Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[bits = 1]
|
||||
pub enum HeapOrStackTag {
|
||||
Heap,
|
||||
|
||||
@@ -9,14 +9,14 @@ use crate::machine::heap::*;
|
||||
use crate::machine::stack::*;
|
||||
use crate::types::*;
|
||||
|
||||
use scryer_modular_bitfield::specifiers::*;
|
||||
use scryer_modular_bitfield::*;
|
||||
use modular_bitfield::specifiers::*;
|
||||
use modular_bitfield::*;
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::mem;
|
||||
use std::ops::{IndexMut, Range};
|
||||
|
||||
#[derive(BitfieldSpecifier, Copy, Clone, Debug)]
|
||||
#[derive(Specifier, Copy, Clone, Debug)]
|
||||
#[bits = 6]
|
||||
enum TrailRefTag {
|
||||
HeapCell = 0b001011,
|
||||
|
||||
@@ -14,8 +14,8 @@ use crate::offset_table::*;
|
||||
|
||||
use fxhash::FxBuildHasher;
|
||||
use indexmap::{IndexMap, IndexSet};
|
||||
use scryer_modular_bitfield::specifiers::*;
|
||||
use scryer_modular_bitfield::{bitfield, BitfieldSpecifier};
|
||||
use modular_bitfield::specifiers::*;
|
||||
use modular_bitfield::{bitfield, Specifier};
|
||||
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::BTreeSet;
|
||||
@@ -66,7 +66,7 @@ impl PartialOrd<Ref> for HeapCellValue {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(BitfieldSpecifier, Copy, Clone, Debug, PartialEq)]
|
||||
#[derive(Specifier, Copy, Clone, Debug, PartialEq)]
|
||||
#[bits = 7]
|
||||
pub enum IndexPtrTag {
|
||||
DynamicUndefined = 0b1000101, // a predicate, declared as dynamic, whose location in code is as yet undefined.
|
||||
|
||||
@@ -14,7 +14,7 @@ use crate::machine::machine_indices::*;
|
||||
use crate::machine::machine_state::*;
|
||||
use crate::types::*;
|
||||
|
||||
pub use scryer_modular_bitfield::prelude::*;
|
||||
pub use modular_bitfield::prelude::*;
|
||||
|
||||
#[cfg(feature = "http")]
|
||||
use bytes::{buf::Reader as BufReader, Buf, Bytes};
|
||||
@@ -43,7 +43,7 @@ use warp::hyper;
|
||||
mod compat;
|
||||
pub use compat::*;
|
||||
|
||||
#[derive(Debug, BitfieldSpecifier, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Specifier, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[bits = 1]
|
||||
pub enum StreamType {
|
||||
Binary,
|
||||
@@ -76,7 +76,7 @@ impl StreamType {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, BitfieldSpecifier, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Specifier, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[bits = 2]
|
||||
pub enum EOFAction {
|
||||
EOFCode,
|
||||
@@ -84,7 +84,7 @@ pub enum EOFAction {
|
||||
Reset,
|
||||
}
|
||||
|
||||
#[derive(Debug, BitfieldSpecifier, Copy, Clone, PartialEq)]
|
||||
#[derive(Debug, Specifier, Copy, Clone, PartialEq)]
|
||||
#[bits = 2]
|
||||
pub(crate) enum AtEndOfStream {
|
||||
Not,
|
||||
|
||||
@@ -24,8 +24,8 @@ use dashu::Rational;
|
||||
use fxhash::FxBuildHasher;
|
||||
use indexmap::IndexMap;
|
||||
use ordered_float::OrderedFloat;
|
||||
use scryer_modular_bitfield::error::OutOfBounds;
|
||||
use scryer_modular_bitfield::prelude::*;
|
||||
use modular_bitfield::error::OutOfBounds;
|
||||
use modular_bitfield::prelude::*;
|
||||
|
||||
pub type Specifier = u32;
|
||||
|
||||
@@ -671,7 +671,7 @@ impl Fixnum {
|
||||
|
||||
#[inline]
|
||||
pub fn get_tag(&self) -> HeapCellValueTag {
|
||||
use scryer_modular_bitfield::Specifier;
|
||||
use modular_bitfield::Specifier;
|
||||
HeapCellValueTag::from_bytes(self.tag()).unwrap()
|
||||
}
|
||||
|
||||
|
||||
10
src/types.rs
10
src/types.rs
@@ -19,7 +19,7 @@ use std::ops::{Add, Sub, SubAssign};
|
||||
|
||||
use dashu::{Integer, Rational};
|
||||
|
||||
#[derive(BitfieldSpecifier, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Specifier, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[repr(u8)]
|
||||
#[bits = 6]
|
||||
pub enum HeapCellValueTag {
|
||||
@@ -46,7 +46,7 @@ pub enum HeapCellValueTag {
|
||||
TrailedBlackboardOffset = 0b110001,
|
||||
}
|
||||
|
||||
#[derive(BitfieldSpecifier, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Specifier, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[repr(u8)]
|
||||
#[bits = 6]
|
||||
pub enum HeapCellValueView {
|
||||
@@ -73,7 +73,7 @@ pub enum HeapCellValueView {
|
||||
TrailedBlackboardOffset = 0b110001,
|
||||
}
|
||||
|
||||
#[derive(BitfieldSpecifier, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Specifier, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[bits = 1]
|
||||
pub enum ConsPtrMaskTag {
|
||||
Cons = 0b0,
|
||||
@@ -112,7 +112,7 @@ impl ConsPtr {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(BitfieldSpecifier, Copy, Clone, Debug)]
|
||||
#[derive(Specifier, Copy, Clone, Debug)]
|
||||
#[bits = 6]
|
||||
pub(crate) enum RefTag {
|
||||
HeapCell = 0b001011,
|
||||
@@ -199,7 +199,7 @@ pub enum TrailRef {
|
||||
}
|
||||
|
||||
#[allow(clippy::enum_variant_names)] // allow the common "Trailed" prefix
|
||||
#[derive(BitfieldSpecifier, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Specifier, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[bits = 6]
|
||||
pub(crate) enum TrailEntryTag {
|
||||
TrailedHeapVar = 0b101111,
|
||||
|
||||
Reference in New Issue
Block a user