5dda89e955a3
Fix up `dis`
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Sun, 07 Aug 2016 13:54:42 +0000 |
parents | cb1e9c623738 |
children | e5c5cf8143a2 |
branches/tags | (none) |
files | losh.lisp |
Changes
--- a/losh.lisp Sun Aug 07 13:50:59 2016 +0000 +++ b/losh.lisp Sun Aug 07 13:54:42 2016 +0000 @@ -461,7 +461,6 @@ (format t (format nil "~~~D,'0B" size) (ldb (byte size 0) n)) (values)) - (defmacro dis (arglist &body body) "Disassemble the code generated for a `lambda` with `arglist` and `body`. @@ -469,12 +468,11 @@ doing what you think it should be doing. " - `(->> '(lambda ,arglist - (declare (optimize speed)) - ,@body) - (compile nil) - #+sbcl sb-disassem:disassemble-code-component - #-sbcl disassemble)) + (let ((%disassemble #+sbcl 'sb-disassem:disassemble-code-component + #-sbcl 'disassemble)) + `(,%disassemble (compile nil '(lambda ,arglist + (declare (optimize speed)) + ,@body))))) ;;;; File IO