propeller.push.instructions
FIXME: write docs
-cls->type
FIXME: write docs
-def-instruction
(def-instruction instruction function)
Defines a Push instruction as a keyword-function pair, and adds it to the instruction table
+Generated by Codox
Propeller 0.3.0
propeller.push.instructions
Push Instructions
+def-instruction
(def-instruction instruction function)
Defines a Push instruction as a keyword-function pair, and adds it to the instruction table
generate-instructions
(generate-instructions stacks functions)
Given a sequence of stacks, e.g. :float :integer, and a sequence of suffix function strings, e.g. _add, _mult, _eq, automates the generation of all possible combination instructions, which here would be :float_add, :float_mult, :float_eq, :integer_add, :integer_mult, and :integer_eq, also transferring and updating the generic function’s stack-type metadata. For some vector instructions, the placeholder :elem will be replaced with the stack of the corresponding element type (e.g. for :vector_integer, with :integer)
get-literal-type
(get-literal-type data)
If a piece of data is a literal, return its corresponding stack name e.g. :integer
. Otherwise, return nil
.
get-stack-instructions
(get-stack-instructions stacks)
Given a set of stacks, returns all instructions that operate on those stacks only. Won’t include random instructions unless :random is in the set as well
diff --git a/docs/propeller.push.state.html b/docs/propeller.push.state.html index a361a5d..357f641 100644 --- a/docs/propeller.push.state.html +++ b/docs/propeller.push.state.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.push.state
FIXME: write docs
+Generated by Codox
Propeller 0.3.0
propeller.push.state
Push states
empty-stack?
(empty-stack? state stack)
Returns true if the stack is empty
example-state
FIXME: write docs
get-args-from-stacks
(get-args-from-stacks state stacks)
Takes a state and a collection of stacks to take args from. If there are enough args on each of the desired stacks, returns a map with keys {:state :args}, where :state is the new state and :args is a list of args popped from the stacks. If there aren’t enough args on the stacks, returns :not-enough-args without popping anything
diff --git a/src/propeller/push/instructions.cljc b/src/propeller/push/instructions.cljc index 7a66236..4f65c3c 100644 --- a/src/propeller/push/instructions.cljc +++ b/src/propeller/push/instructions.cljc @@ -1,4 +1,5 @@ (ns propeller.push.instructions + "Push Instructions" (:require [clojure.set] [propeller.push.state :as state] [propeller.utils :as u] @@ -45,7 +46,7 @@ can be either constant literals or functions that take and return a Push state" #?(:clj - (def cls->type + (def ^{:no-doc true} cls->type {Boolean :boolean Short :integer Integer :integer diff --git a/src/propeller/push/state.cljc b/src/propeller/push/state.cljc index 8a9bbac..f99d03d 100755 --- a/src/propeller/push/state.cljc +++ b/src/propeller/push/state.cljc @@ -1,4 +1,5 @@ (ns propeller.push.state + "Push states" (:require [propeller.push.limits :as l] #?(:cljs [goog.string :as gstring])))