ForwardReferences

Struct ForwardReferences 

Source
pub struct ForwardReferences {
Show 17 fields pub idx_lit: usize, pub idx_flit: usize, pub idx_exit: usize, pub idx_zero_branch: usize, pub idx_branch: usize, pub idx_do: usize, pub idx_qdo: usize, pub idx_loop: usize, pub idx_plus_loop: usize, pub idx_s_quote: usize, pub idx_type: usize, pub idx_over: usize, pub idx_equal: usize, pub idx_drop: usize, pub idx__postpone: usize, pub idx_to_r: usize, pub idx__does: usize,
}

Fields§

§idx_lit: usize§idx_flit: usize§idx_exit: usize§idx_zero_branch: usize§idx_branch: usize§idx_do: usize§idx_qdo: usize§idx_loop: usize§idx_plus_loop: usize§idx_s_quote: usize§idx_type: usize§idx_over: usize§idx_equal: usize§idx_drop: usize§idx__postpone: usize§idx_to_r: usize§idx__does: usize

Implementations§

Source§

impl ForwardReferences

Source

pub fn new() -> ForwardReferences

Examples found in repository?
examples/vm.rs (line 105)
85    pub fn new(data_pages: usize) -> VM {
86        let mut labels = Vec::with_capacity(LABEL_COUNT as _);
87        labels.resize(LABEL_COUNT as _, 0);
88        let mut vm = VM {
89            current_task: 0,
90            tasks: [
91                // Only operator task has its own input buffer.
92                Task::new_terminal(),
93                Task::new_background(),
94                Task::new_background(),
95                Task::new_background(),
96                Task::new_background(),
97            ],
98            last_error: None,
99            handler: 0,
100            wordlist: Wordlist::with_capacity(1000),
101            data_space: DataSpace::new(data_pages),
102            tkn: Some(String::with_capacity(64)),
103            outbuf: Some(String::with_capacity(128)),
104            hldbuf: String::with_capacity(128),
105            references: ForwardReferences::new(),
106            now: Instant::now(),
107            forward_bitset: BitSet::with_capacity(LABEL_COUNT),
108            resolved_bitset: BitSet::with_capacity(LABEL_COUNT),
109            labels,
110        };
111        vm.add_core();
112        vm.add_output();
113        vm.add_tools();
114        vm.add_environment();
115        vm.add_facility();
116        vm.add_float();
117        vm.add_units();
118        vm.add_file_access();
119        vm.add_loader();
120
121        vm.load_core_fth();
122
123        vm
124    }

Auto Trait Implementations§

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.