Make some things public that are required by priroda
This commit is contained in:
parent
b6d05976ea
commit
1fce886ac3
3 changed files with 8 additions and 8 deletions
|
|
@ -146,9 +146,9 @@ pub fn eval_main<'a, 'tcx: 'a>(
|
|||
}
|
||||
}
|
||||
|
||||
struct Evaluator;
|
||||
pub struct Evaluator;
|
||||
#[derive(Default)]
|
||||
struct EvaluatorData {
|
||||
pub struct EvaluatorData {
|
||||
/// Environment variables set by `setenv`
|
||||
/// Miri does not expose env vars from the host to the emulated program
|
||||
pub(crate) env_vars: HashMap<Vec<u8>, MemoryPointer>,
|
||||
|
|
@ -163,7 +163,7 @@ pub struct TlsEntry<'tcx> {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
struct MemoryData<'tcx> {
|
||||
pub struct MemoryData<'tcx> {
|
||||
/// The Key to use for the next thread-local allocation.
|
||||
next_thread_local: TlsKey,
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ impl LockInfo {
|
|||
pub struct AllocId(u64);
|
||||
|
||||
#[derive(Debug)]
|
||||
enum AllocIdKind {
|
||||
pub enum AllocIdKind {
|
||||
/// We can't ever have more than `usize::max_value` functions at the same time
|
||||
/// since we never "deallocate" functions
|
||||
Function(usize),
|
||||
|
|
@ -89,7 +89,7 @@ enum AllocIdKind {
|
|||
}
|
||||
|
||||
impl AllocIdKind {
|
||||
fn into_alloc_id(self) -> AllocId {
|
||||
pub fn into_alloc_id(self) -> AllocId {
|
||||
match self {
|
||||
AllocIdKind::Function(n) => AllocId(n as u64),
|
||||
AllocIdKind::Runtime(n) => AllocId((1 << 63) | n),
|
||||
|
|
@ -103,10 +103,10 @@ impl AllocId {
|
|||
self.0 >> 63
|
||||
}
|
||||
/// Yields everything but the discriminant bits
|
||||
fn index(self) -> u64 {
|
||||
pub fn index(self) -> u64 {
|
||||
self.0 & ((1 << 63) - 1)
|
||||
}
|
||||
fn into_alloc_id_kind(self) -> AllocIdKind {
|
||||
pub fn into_alloc_id_kind(self) -> AllocIdKind {
|
||||
match self.discriminant() {
|
||||
0 => AllocIdKind::Function(self.index() as usize),
|
||||
1 => AllocIdKind::Runtime(self.index()),
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ pub use self::eval_context::{EvalContext, Frame, ResourceLimits, StackPopCleanup
|
|||
|
||||
pub use self::lvalue::{Lvalue, LvalueExtra, GlobalId};
|
||||
|
||||
pub use self::memory::{AllocId, Memory, MemoryPointer, MemoryKind, HasMemory};
|
||||
pub use self::memory::{AllocId, Memory, MemoryPointer, MemoryKind, HasMemory, AllocIdKind};
|
||||
|
||||
use self::memory::{PointerArithmetic, Lock, AccessKind};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue