Merge pull request #3252 from Skgland/towards-a-crate-without-syn@1

replace custom modular_bitfields fork with update upstream
This commit is contained in:
Mark Thom
2026-03-09 22:08:28 -07:00
committed by GitHub
13 changed files with 52 additions and 72 deletions

View File

@@ -1,5 +1,3 @@
#![allow(unused_parens)] // see mthom/scryer-prolog#3092 and rust-lang/rust#147126
use fxhash::FxBuildHasher;
use indexmap::IndexSet;
@@ -9,14 +7,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,

View File

@@ -1,6 +1,3 @@
#![allow(clippy::new_without_default)] // annotating structs annotated with #[bitfield] doesn't work
#![allow(unused_parens)] // see mthom/scryer-prolog#3092 and rust-lang/rust#147126
use crate::parser::ast::*;
use crate::atom_table::*;
@@ -14,8 +11,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 +63,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.

View File

@@ -1,5 +1,3 @@
#![allow(unused_parens)] // see mthom/scryer-prolog#3092 and rust-lang/rust#147126
use crate::arena::*;
use crate::atom_table::*;
use crate::functor_macro::*;
@@ -14,7 +12,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 +41,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 +74,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 +82,7 @@ pub enum EOFAction {
Reset,
}
#[derive(Debug, BitfieldSpecifier, Copy, Clone, PartialEq)]
#[derive(Debug, Specifier, Copy, Clone, PartialEq)]
#[bits = 2]
pub(crate) enum AtEndOfStream {
Not,