Created
August 21, 2015 14:20
-
-
Save dmsurti/8364dcd636829eaf83d1 to your computer and use it in GitHub Desktop.
Trace CLOS method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CL-USER 1 > (load "~/tmp/trace-method.lisp") | |
; Loading text file /Users/deepaksurti/tmp/trace-method.lisp | |
#P"/Users/deepaksurti/tmp/trace-method.lisp" | |
CL-USER 2 > (test-foo) | |
1 | |
CL-USER 3 > (trace (method foo (fixnum))) | |
((METHOD FOO (FIXNUM))) | |
CL-USER 4 > (test-foo) | |
0 (METHOD FOO (FIXNUM)) > ... | |
>> X : 1 | |
0 (METHOD FOO (FIXNUM)) < ... | |
<< VALUE-0 : 1 | |
1 | |
CL-USER 5 > (untrace) | |
((METHOD FOO (FIXNUM))) | |
CL-USER 6 > (test-foo) | |
1 | |
CL-USER 7 > (trace foo) | |
(FOO) | |
CL-USER 8 > (test-foo) | |
0 FOO > ... | |
>> X : "hello" | |
0 FOO < ... | |
<< VALUE-0 : "hello" | |
0 FOO > ... | |
>> X : 1 | |
0 FOO < ... | |
<< VALUE-0 : 1 | |
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defgeneric foo (x) | |
(:documentation "generic foo")) | |
(defmethod foo ((x fixnum)) | |
x) | |
(defmethod foo ((x string)) | |
x) | |
(defun test-foo () | |
(foo "hello") | |
(foo 1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment