pub struct MachineState {
pub atom_tbl: Arc<AtomTable>,
pub arena: Arena,
pub heap: Vec<HeapCellValue>,
/* private fields */
}
Fields§
§atom_tbl: Arc<AtomTable>
§arena: Arena
§heap: Vec<HeapCellValue>
Implementations§
Source§impl MachineState
impl MachineState
pub fn get_number(&mut self, at: &ArithmeticTerm) -> Result<Number, MachineStub>
pub fn get_rational( &mut self, at: &ArithmeticTerm, caller: impl Fn() -> [HeapCellValue; 3] + 'static, ) -> Result<TypedArenaPtr<Rational>, MachineStub>
Source§impl MachineState
impl MachineState
pub fn copy_term(&mut self, attr_var_policy: AttrVarPolicy)
Source§impl MachineState
impl MachineState
pub fn neck_cut(&mut self)
pub fn write_read_term_options( &mut self, var_list: Vec<(VarKey, HeapCellValue, usize)>, singleton_var_list: Vec<HeapCellValue>, ) -> CallResult
pub fn read_term_body( &mut self, term_write_result: TermWriteResult, ) -> CallResult
pub fn read_term_from_user_input_eof_handler( &mut self, stream: Stream, ) -> Result<OnEOF, MachineStub>
pub fn read_term_from_user_input( &mut self, stream: Stream, indices: &mut IndexStore, ) -> CallResult
pub fn read_term_eof_handler( &mut self, stream: Stream, ) -> Result<OnEOF, MachineStub>
pub fn read_term( &mut self, stream: Stream, indices: &mut IndexStore, eof_handler: impl Fn(&mut Self, Stream) -> Result<OnEOF, MachineStub>, ) -> CallResult
Source§impl MachineState
impl MachineState
pub fn deref(&self, addr: HeapCellValue) -> HeapCellValue
pub fn trail(&mut self, r: TrailRef)
pub fn allocate(&mut self, num_cells: usize)
pub fn bind(&mut self, r1: Ref, a2: HeapCellValue)
pub fn bind_attr_var(&mut self, h: usize, addr: HeapCellValue)
pub fn unify(&mut self)
pub fn unify_structure(&mut self, s1: usize, value: HeapCellValue)
pub fn unify_atom(&mut self, atom: Atom, value: HeapCellValue)
pub fn unify_list(&mut self, l1: usize, value: HeapCellValue)
pub fn unify_complete_string(&mut self, atom: Atom, value: HeapCellValue)
pub fn unify_partial_string( &mut self, value_1: HeapCellValue, value_2: HeapCellValue, )
pub fn unify_char(&mut self, c: char, value: HeapCellValue)
pub fn unify_fixnum(&mut self, n1: Fixnum, value: HeapCellValue)
pub fn unify_big_int( &mut self, n1: TypedArenaPtr<Integer>, value: HeapCellValue, )
pub fn unify_rational( &mut self, n1: TypedArenaPtr<Rational>, value: HeapCellValue, )
pub fn unify_f64(&mut self, f1: F64Ptr, value: HeapCellValue)
pub fn unify_constant(&mut self, ptr: UntypedArenaPtr, value: HeapCellValue)
pub fn compare_term_test( &mut self, var_comparison: VarComparison, ) -> Option<Ordering>
pub fn match_partial_string( &mut self, value: HeapCellValue, string: Atom, has_tail: bool, )
pub fn is_cyclic_term(&mut self, value: HeapCellValue) -> bool
pub fn try_arg(&mut self) -> CallResult
pub fn eq_test(&mut self, h1: HeapCellValue, h2: HeapCellValue) -> bool
pub fn try_functor(&mut self) -> CallResult
pub fn try_from_list( &mut self, value: HeapCellValue, stub_gen: impl Fn() -> [HeapCellValue; 3], ) -> Result<Vec<HeapCellValue>, MachineStub>
pub fn ground_test(&mut self) -> bool
pub fn integers_to_bytevec( &mut self, value: HeapCellValue, stub_gen: impl Fn() -> [HeapCellValue; 3], ) -> Vec<u8> ⓘ
pub fn project_onto_key( &mut self, value: HeapCellValue, ) -> Result<HeapCellValue, MachineStub>
pub fn deallocate(&mut self)
pub fn throw_interrupt_exception(&mut self)
Source§impl MachineState
impl MachineState
pub fn skip_max_list(&mut self) -> CallResult
pub fn value_to_str_like( &mut self, value: HeapCellValue, ) -> Option<AtomOrString>
Trait Implementations§
Source§impl Debug for MachineState
impl Debug for MachineState
Source§impl Index<RegType> for MachineState
impl Index<RegType> for MachineState
Auto Trait Implementations§
impl !Freeze for MachineState
impl !RefUnwindSafe for MachineState
impl !Send for MachineState
impl !Sync for MachineState
impl Unpin for MachineState
impl UnwindSafe for MachineState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self
to use its LowerHex
implementation when
Debug
-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self
to use its UpperHex
implementation when
Debug
-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.