# HG changeset patch # User Steve Losh # Date 1458906480 0 # Node ID 2579f5d00526d1fde77f04a31be9882e27c94408 # Parent e2bb4ea1bfe7dbb44d9599e91ee8dfbd0b7f8b42 Move and clean up the functor wrapper functions diff -r e2bb4ea1bfe7 -r 2579f5d00526 src/wam.lisp --- a/src/wam.lisp Fri Mar 25 11:47:29 2016 +0000 +++ b/src/wam.lisp Fri Mar 25 11:48:00 2016 +0000 @@ -76,6 +76,17 @@ (+tag-functor+ "FUN"))) +(defun* cell-functor-name ((cell heap-cell)) + (:returns string) + ;; todo + "functor") + +(defun* cell-functor-arity ((cell heap-cell)) + (:returns (integer 0)) + (logand (cell-value cell) + functor-arity-bitmask)) + + (defun* make-cell ((tag heap-cell-tag) (value heap-cell-value)) (:returns heap-cell) (logior (ash value +cell-tag-width+) @@ -98,12 +109,6 @@ (make-cell +tag-functor+ arity)) -; (defun cell-functor-name) -(defun cell-functor-arity (cell) - (logand (cell-value cell) - functor-arity-bitmask)) - - ;;;; Heap (deftype heap-index () `(integer 0 ,array-total-size-limit))