Coverage report: /home/ellis/comp/core/lib/obj/tree/node.lisp
Kind | Covered | All | % |
expression | 3 | 10 | 30.0 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; lib/obj/tree/node.lisp --- Tree Nodes
3
;; SBCL provides excellent support for the ANSI CL built-in types such as
4
;; vector/array, list, hash-table. We don't need to provide much in terms of
5
;; additional support for these. There are some internal SBCL collections such
6
;; as RBTREE, AVLTREE and BROTHERTREE which we expose here and provide
7
;; additional support for.
10
(in-package :obj/tree)
12
(deftype keytype () 'sb-vm:word)
14
(defstruct (tree-node (:copier nil)
15
(:constructor make-tree-node (key)))
16
(key 0 :type keytype))
18
(defstruct (unary-node (:include tree-node))
21
(defstruct (binary-node (:include tree-node)
23
(:constructor make-binary-node (key left right)))
26
;; temporary nodes eliminated when a tree is compiled
27
(defstruct (ternary-node (:include binary-node)
29
(:constructor make-ternary-node (left key1 middle key2 right)))
32
(defstruct (avl-node (:include tree-node)
34
(:constructor make-avl-node (key data left right)))