Function greengold::run
[−]
[src]
pub fn run<T: AtomExtender>(
code: &Vec<u8>,
stack: &mut Stack,
pc: usize,
extender: T,
memory: &mut Vec<Data>
) -> Result<(), (usize, Error)>
Run some code. The stack and memory parameters can be non-empty; this is how data is passed to a Forth function. Since they are only borrowed return values can be extracted from them.
PC should be set to the beginning of one of the words in memory. A return without a branch triggers a full return, no longer a Return Stack Underflow.