Skip to main content

Machine

Struct Machine 

Source
pub struct Machine<'p, 'u, 'w> { /* private fields */ }

Implementations§

Source§

impl<'p, 'u, 'w> Machine<'p, 'u, 'w>

Source

pub fn activation( compiled: &'p Compiled, me: usize, unit: &'u mut RunUnit<'w>, main: bool, ) -> Result<Self, Abend>

An activation of loaded program me. Its storage is initialized on its first activation, after a CANCEL, and on every activation of an INITIAL program.

Source

pub fn unbound( compiled: &'p Compiled, me: usize, unit: &'u mut RunUnit<'w>, ) -> Result<Self, Abend>

An activation with no EXTERNAL or GLOBAL record bound, which VALUE clauses never reach: the storage lowering keeps as a program’s initial image.

Source

pub fn run_procedure(&mut self) -> Result<Ending, Abend>

Trait Implementations§

Source§

impl<'a, 'w> Arguments<'w, &'a Ref, &'a Operand> for Machine<'_, '_, 'w>

Source§

fn item(&self, operand: &&'a Operand) -> Option<&'a Ref>

The data item an operand names, when it names one.
Source§

fn length_of(&self, operand: &&'a Operand) -> bool

Whether an operand is LENGTH OF, which BY CONTENT passes as a binary fullword.
Source§

fn content_item(&mut self, place: &'a Ref) -> Result<Loc, Abend>

A data item BY CONTENT copies, located and given NUMCHECK’s test.
Source§

impl<'a, 'w> CicsHost<'w, &'a Ref, &'a Operand, &'a str> for Machine<'_, '_, 'w>

Source§

fn handlers(&mut self) -> &mut Handlers

Source§

fn content(&mut self, operand: &&'a Operand, pos: Pos) -> Result<Vec<u8>, Abend>

An operand’s bytes as CALL BY CONTENT passes them.
Source§

fn integer_of(&mut self, operand: &&'a Operand, pos: Pos) -> Result<i64, Abend>

An operand’s value as a subscript takes it.
Source§

fn text(&self, text: &&'a str) -> String

Source§

fn activation(&self) -> u64

This activation of the program, which a HANDLE ABEND LABEL it sets belongs to.
Source§

fn program_id(&self) -> String

Source§

fn commarea(&self) -> Option<usize>

Where DFHCOMMAREA is, when the program has one with an address.
Source§

fn mapset(&mut self, name: &str) -> Option<Result<Mapset, String>>

A mapset from the copy libraries; None when no library holds it.
Source§

fn item_named(&mut self, name: &str, pos: Pos) -> Result<Option<Loc>, Abend>

The data item a name alone refers to, when it names one.
Source§

fn locate_named(&mut self, name: &str, pos: Pos) -> Result<Loc, Abend>

The data item a name alone refers to, or the abend a reference to it gives.
Source§

fn unaddressed(&mut self, place: &'a Ref) -> Option<usize>

The length of the data item place when it is in a LINKAGE record with no address, where ADDRESS OF gives NULL; None when it has storage to locate.
Source§

fn run_program( &mut self, program: Option<Rc<Compiled>>, index: usize, commarea: Option<usize>, xctl: bool, ) -> Result<Ending, Abend>

Runs program index from its start with DFHEIBLK and commarea as its USING items; for XCTL, in this program’s place at its logical level, with the handlers Handlers::xctl leaves it (C239, C146). program is None for the task’s first program, whose handle the run unit does not hold (C148).
Source§

impl<'a, 'p> Host<&'a Ref> for Machine<'p, '_, '_>

Source§

type Facts = Facts<'p>

Source§

fn facts(&self) -> Facts<'p>

Source§

fn mem(&mut self) -> &mut [u8] ⓘ

Source§

fn taint(&mut self) -> Option<&mut Taint>

The run unit’s taint, when it traces input; a write through Host::mem marks its bytes here, as [write] does.
Source§

fn locate(&mut self, place: &'a Ref, receiving: bool) -> Result<Loc, Abend>

With receiving, a group holding the object of its own OCCURS DEPENDING ON is its maximum length.
Source§

fn integer(&mut self, place: &'a Ref, pos: Pos) -> Result<i64, Abend>

The place’s value as a subscript takes it.
Source§

fn assign( &mut self, dest: Loc, val: Val, src: Option<Loc>, pos: Pos, ) -> Result<(), Abend>

MOVE into dest; src is the sender’s storage when it has any.
Source§

fn store_fixed( &mut self, dest: Loc, value: &Fixed, pos: Pos, ) -> Result<(), Abend>

A numeric store, not ROUNDED, with no size error.
Source§

impl<'w> LeHost<'w> for Machine<'_, '_, 'w>

Source§

fn page(&self) -> &'static CodePage

Source§

fn method_name(program: &Rc<Compiled>) -> Option<String>

Class.method for a loaded COBOL method; None for a program, which a dump lists by name.
Source§

impl<'p> ReportHost<'p, Expr, Ref, Literal, (usize, usize)> for Machine<'p, '_, '_>

Source§

fn value(&mut self, expr: &Expr, pos: Pos) -> Result<Val, Abend>

Source§

fn operand( &mut self, expr: &Expr, pos: Pos, ) -> Option<Result<(Val, Option<Loc>), Abend>>

A lone operand’s value and its storage, when it has any; None for any other expression.
Source§

fn literal(&mut self, value: &Literal, pos: Pos) -> Result<Val, Abend>

Source§

fn item(&self, item: usize) -> Loc

Source§

fn store_value( &mut self, dest: Loc, value: Val, rounded: bool, keep_on_size_error: bool, pos: Pos, ) -> Result<bool, Abend>

Stores an arithmetic result; true when it was a size error.
Source§

fn store_checked( &mut self, dest: Loc, value: &Fixed, pos: Pos, ) -> Result<bool, Abend>

A numeric store, not ROUNDED, that keeps the receiver on a size error; true when it was one.
Source§

fn report_file(&mut self, k: usize) -> ReportFile

Source§

fn write_line( &mut self, k: usize, loc: Loc, space: Spacing, pos: Pos, ) -> Result<(), Abend>

WRITE … AFTER ADVANCING space of the record at loc to file k.
Source§

fn use_before_reporting( &mut self, (first, last): &Section, pos: Pos, ) -> Result<UseEnd, Abend>

Performs a USE BEFORE REPORTING procedure.
Source§

fn err(&mut self) -> &mut dyn Write

Source§

impl<'w> UnitHost<'w> for Machine<'_, '_, 'w>

Source§

type Program = Rc<Compiled>

Source§

type Loader = Library

Source§

fn unit(&mut self) -> &mut RunUnit<'w>

Source§

impl<'a> Values<&'a Ref, &'a Operand> for Machine<'_, '_, '_>

Source§

fn value(&mut self, operand: &&'a Operand, pos: Pos) -> Result<Val, Abend>

Auto Trait Implementations§

§

impl<'p, 'u, 'w> !RefUnwindSafe for Machine<'p, 'u, 'w>

§

impl<'p, 'u, 'w> !Send for Machine<'p, 'u, 'w>

§

impl<'p, 'u, 'w> !Sync for Machine<'p, 'u, 'w>

§

impl<'p, 'u, 'w> !UnwindSafe for Machine<'p, 'u, 'w>

§

impl<'p, 'u, 'w> Freeze for Machine<'p, 'u, 'w>

§

impl<'p, 'u, 'w> Unpin for Machine<'p, 'u, 'w>

§

impl<'p, 'u, 'w> UnsafeUnpin for Machine<'p, 'u, 'w>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.