Skip to content

Commit

Permalink
[cl-backend] strip nam-ann when printing out the op tree
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Jan 28, 2011
1 parent 79f1b8c commit 0877070
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions cl-backend/backend.lisp
Expand Up @@ -10,10 +10,17 @@

(log-message :info "cl-backend started")

(defun nam-op-log (name result) (log-message :info (format nil "~a => ~w" name result)) result)
(defun nam-op-log (name result) (log-message :info (format nil "~a => ~w" name (strip-ann result))) result)



(defun strip-ann (thing)
(if (consp thing)
(if (eq (first thing) 'nam-ann)
(strip-ann (cadddr thing))
(mapcar #'strip-ann thing)
)
thing))

(defun concat-symbol (a b) (intern (concatenate 'string (string a) (string b))))

Expand Down Expand Up @@ -182,8 +189,7 @@


(let ((compiled-unit (compile-unit (json:decode-json (open (first *args*))))))
(format t "~w~%~%~%" compiled-unit)
(format t "~w~%~%~%" (strip-ann compiled-unit))
(let ((wrapped (wrap-for-eval compiled-unit)))
; (format t "~a~%" wrapped)
(eval wrapped)
))

0 comments on commit 0877070

Please sign in to comment.