Skip to content

Commit

Permalink
Merge branch 'master' into hawaii
Browse files Browse the repository at this point in the history
Incorporate fix of replacing = with - as flagged by @domokato.
  • Loading branch information
lspector committed Jan 1, 2017
2 parents dd981ec + 628881e commit 3f08b23
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/clojush/instructions/tag.clj
Expand Up @@ -161,7 +161,7 @@
^{:stack-types [:integer :tag :exec]}
(fn [state]
(if (not (empty? (:integer state)))
(push-item (symbol (str "tagged_" (mod (#(if (neg? %) (= %) %) (stack-ref :integer 0 state))
(push-item (symbol (str "tagged_" (mod (#(if (neg? %) (- %) %) (stack-ref :integer 0 state))
@global-tag-limit)))
:exec
(pop-item :integer state))
Expand All @@ -172,7 +172,7 @@
^{:stack-types [:integer :tag :exec]}
(fn [state]
(if (not (empty? (:integer state)))
(push-item (symbol (str "untag_" (mod (#(if (neg? %) (= %) %) (stack-ref :integer 0 state))
(push-item (symbol (str "untag_" (mod (#(if (neg? %) (- %) %) (stack-ref :integer 0 state))
@global-tag-limit)))
:exec
(pop-item :integer state))
Expand All @@ -183,7 +183,7 @@
^{:stack-types [:integer :tag :exec]}
(fn [state]
(if (not (empty? (:integer state)))
(push-item (symbol (str "tag_exec_" (mod (#(if (neg? %) (= %) %) (stack-ref :integer 0 state))
(push-item (symbol (str "tag_exec_" (mod (#(if (neg? %) (- %) %) (stack-ref :integer 0 state))
@global-tag-limit)))
:exec
(pop-item :integer state))
Expand All @@ -194,7 +194,7 @@
^{:stack-types [:integer :tag :exec :code]}
(fn [state]
(if (not (empty? (:integer state)))
(push-item (symbol (str "tag_code_" (mod (#(if (neg? %) (= %) %) (stack-ref :integer 0 state))
(push-item (symbol (str "tag_code_" (mod (#(if (neg? %) (- %) %) (stack-ref :integer 0 state))
@global-tag-limit)))
:exec
(pop-item :integer state))
Expand All @@ -205,7 +205,7 @@
^{:stack-types [:integer :tag :exec]}
(fn [state]
(if (not (empty? (:integer state)))
(push-item (symbol (str "tag_integer_" (mod (#(if (neg? %) (= %) %) (stack-ref :integer 0 state))
(push-item (symbol (str "tag_integer_" (mod (#(if (neg? %) (- %) %) (stack-ref :integer 0 state))
@global-tag-limit)))
:exec
(pop-item :integer state))
Expand All @@ -216,7 +216,7 @@
^{:stack-types [:integer :tag :exec :float]}
(fn [state]
(if (not (empty? (:integer state)))
(push-item (symbol (str "tag_float_" (mod (#(if (neg? %) (= %) %) (stack-ref :integer 0 state))
(push-item (symbol (str "tag_float_" (mod (#(if (neg? %) (- %) %) (stack-ref :integer 0 state))
@global-tag-limit)))
:exec
(pop-item :integer state))
Expand All @@ -227,7 +227,7 @@
^{:stack-types [:integer :tag :exec :boolean]}
(fn [state]
(if (not (empty? (:integer state)))
(push-item (symbol (str "tag_boolean_" (mod (#(if (neg? %) (= %) %) (stack-ref :integer 0 state))
(push-item (symbol (str "tag_boolean_" (mod (#(if (neg? %) (- %) %) (stack-ref :integer 0 state))
@global-tag-limit)))
:exec
(pop-item :integer state))
Expand All @@ -238,7 +238,7 @@
^{:stack-types [:integer :tag :exec :char]}
(fn [state]
(if (not (empty? (:integer state)))
(push-item (symbol (str "tag_char_" (mod (#(if (neg? %) (= %) %) (stack-ref :integer 0 state))
(push-item (symbol (str "tag_char_" (mod (#(if (neg? %) (- %) %) (stack-ref :integer 0 state))
@global-tag-limit)))
:exec
(pop-item :integer state))
Expand All @@ -249,7 +249,7 @@
^{:stack-types [:integer :tag :exec :string]}
(fn [state]
(if (not (empty? (:integer state)))
(push-item (symbol (str "tag_string_" (mod (#(if (neg? %) (= %) %) (stack-ref :integer 0 state))
(push-item (symbol (str "tag_string_" (mod (#(if (neg? %) (- %) %) (stack-ref :integer 0 state))
@global-tag-limit)))
:exec
(pop-item :integer state))
Expand All @@ -260,7 +260,7 @@
^{:stack-types [:integer :tag :exec :zip]}
(fn [state]
(if (not (empty? (:integer state)))
(push-item (symbol (str "tag_zip_" (mod (#(if (neg? %) (= %) %) (stack-ref :integer 0 state))
(push-item (symbol (str "tag_zip_" (mod (#(if (neg? %) (- %) %) (stack-ref :integer 0 state))
@global-tag-limit)))
:exec
(pop-item :integer state))
Expand All @@ -271,8 +271,9 @@
^{:stack-types [:integer :tag :exec :genome]}
(fn [state]
(if (not (empty? (:integer state)))
(push-item (symbol (str "tag_genome_" (mod (#(if (neg? %) (= %) %) (stack-ref :integer 0 state))
(push-item (symbol (str "tag_genome_" (mod (#(if (neg? %) (- %) %) (stack-ref :integer 0 state))
@global-tag-limit)))
:exec
(pop-item :integer state))
state)))

0 comments on commit 3f08b23

Please sign in to comment.