Skip to content

Commit

Permalink
Make gen field final
Browse files Browse the repository at this point in the history
  • Loading branch information
michalmarczyk committed Jun 25, 2015
1 parent 4284794 commit 2b98f69
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/ctries/clj.clj
Expand Up @@ -43,8 +43,6 @@
:methods
[[makeMainNodeUpdater []
java.util.concurrent.atomic.AtomicReferenceFieldUpdater]
[makeGenUpdater []
java.util.concurrent.atomic.AtomicReferenceFieldUpdater]
[cas [ctries.clj.IMainNode ctries.clj.IMainNode] boolean]
[getMain [] ctries.clj.IMainNode]
[setMain [ctries.clj.IMainNode] void]
Expand Down Expand Up @@ -249,19 +247,14 @@
(getValue [this]
v))

(declare
^AtomicReferenceFieldUpdater indirection-node-mnode-updater
^AtomicReferenceFieldUpdater indirection-node-gen-updater)
(declare ^AtomicReferenceFieldUpdater indirection-node-mnode-updater)

(deftype IndirectionNode [^:volatile-mutable ^IMainNode mnode
^:volatile-mutable ^Gen gen]
^Gen gen]
IIndirectionNode
(makeMainNodeUpdater [this]
(AtomicReferenceFieldUpdater/newUpdater IndirectionNode Object "mnode"))

(makeGenUpdater [this]
(AtomicReferenceFieldUpdater/newUpdater IndirectionNode Object "gen"))

(cas [this o n]
(.compareAndSet indirection-node-mnode-updater this o n))

Expand All @@ -280,9 +273,6 @@
(def ^:private ^AtomicReferenceFieldUpdater indirection-node-mnode-updater
(.makeMainNodeUpdater (IndirectionNode. nil nil)))

(def ^:private ^AtomicReferenceFieldUpdater indirection-node-gen-updater
(.makeGenUpdater (IndirectionNode. nil nil)))

(declare
^AtomicReferenceFieldUpdater bitmap-indexed-node-prev-updater
->HashCollisionNode)
Expand Down

0 comments on commit 2b98f69

Please sign in to comment.