Defines the two main modes, compile-mode and function-mode, which are used to define new word definitions, and to invoke word definitions with their own word definition scope.
compile-mode is called when a function is first defined with
arg-start-token
, and this compilation mode is finished upon
reaching the end of the new definition defined by arg-end-token
.
function-mode is entered when a word definition is invoked from the code queue.
Defines the two main modes, compile-mode and function-mode, which are used to define new word definitions, and to invoke word definitions with their own word definition scope. compile-mode is called when a function is first defined with `arg-start-token`, and this compilation mode is finished upon reaching the end of the new definition defined by `arg-end-token`. function-mode is entered when a word definition is invoked from the code queue.
(compile-mode sm)
Represents the compilation mode
Represents the compilation mode
(inner-compile-mode sm)
inner-compile mode is used to circumvent issues with inner function definitions. It is used to ignore these inner function definitions by placing them into a new mode of operation where it places the word values onto the stack.
inner-compile mode is used to circumvent issues with inner function definitions. It is used to ignore these inner function definitions by placing them into a new mode of operation where it places the word values onto the stack.
(start-defn sm)
We retrieved the start-token word, and we push it onto the stack and set our compile flag
We retrieved the start-token word, and we push it onto the stack and set our compile flag
(wrap-compiled-fn wbody)
Used to wrap a word definition for use within the stack
machine. wbody
is a collection of words which make up the word
definition. This function is then placed within the stack machine
using fif.stack-machine/set-word.
Notes:
Used to wrap a word definition for use within the stack machine. `wbody` is a collection of words which make up the word definition. This function is then placed within the stack machine using fif.stack-machine/set-word. Notes: - Note that invoking this wrapper, places the stack machine in the function-mode, which creates a new scope. This scope serves the purpose of storing local variables for that function, until it leaves function-mode.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close