Hello,
I experience an error with disassembling with the current Debian
version. Is this error known? My version seems quite old, so maybe I
should switch to the CVS version...
----------------------------------------------------------------
Starting /usr/bin/lisp ...
ILISP V5.11.1 Use M-x ilisp-bug for problems and suggestions.
0] ; Loading #p"/home/neuss/init.lisp".
CMU Common Lisp release x86-linux 2.4.22 3 October 2000 build 1154, running on toba
Send questions to [EMAIL PROTECTED] and bug reports to [EMAIL PROTECTED]
Loaded subsystems:
Python 1.0, target Intel x86
CLOS based on PCL version: September 16 92 PCL (f)
*
* (defun test (x) (* x x))
TEST
* (compile 'test)
Compiling LAMBDA (X):
Compiling Top-Level Form:
TEST
NIL
NIL
* (disassemble 'test)
4809CD48: .ENTRY TEST(x) ; (FUNCTION (T) NUMBER)
60: POP DWORD PTR [EBP-8]
63: LEA ESP, [EBP-32]
66: CMP ECX, 4
69: JNE
Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
"L0" is not of type (UNSIGNED-BYTE 32)
Restarts:
0: [ABORT] Return to Top-Level.
Debug (type H for help)
(DISASSEM:MAYBE-NOTE-ASSEMBLER-ROUTINE 3 "L0" NIL #<DISASSEM:DISASSEM-STATE +33 in
#<DISASSEM:SEGMENT #x4809CD48[37] in #<Code Object "LAMBDA (X)"
{4809CD37}>>>)[:EXTERNAL]
0] back
0: (DISASSEM:MAYBE-NOTE-ASSEMBLER-ROUTINE 3 "L0" NIL #<DISASSEM:DISASSEM-STATE +33 in
#<DISASSEM:SEGMENT #x4809CD48[37] in #<Code Object "LAMBDA (X)"
{4809CD37}>>>)[:EXTERNAL]
1: (X86::DISPLACEMENT-PRINTER-WRAPPER "L0" #<Synonym Stream to SYSTEM:*STDOUT*>
#<DISASSEM:DISASSEM-STATE +33 in #<DISASSEM:SEGMENT #x4809CD48[37] in #<Code Object
"LAMBDA (X)" {4809CD37}>>>)
2: (DISASSEM:MAP-SEGMENT-INSTRUCTIONS #<Closure Over Function "DEFUN
DISASSEMBLE-SEGMENT" {480AACC1}> #1=#<DISASSEM:SEGMENT #x4809CD48[37] in #<Code Object
"LAMBDA (X)" {4809CD37}>> #<DISASSEM:DISASSEM-STATE +33 in #1#> #<Synonym Stream to
SYSTEM:*STDOUT*>)
3: (DISASSEM:DISASSEMBLE-SEGMENT #1=#<DISASSEM:SEGMENT #x4809CD48[37] in #<Code Object
"LAMBDA (X)" {4809CD37}>> #<Synonym Stream to SYSTEM:*STDOUT*>
#<DISASSEM:DISASSEM-STATE +33 in #1#>)
4: (DISASSEM:DISASSEMBLE-SEGMENTS (#1=#<DISASSEM:SEGMENT #x4809CD48[37] in #2=#<Code
Object "LAMBDA (X)" {4809CD37}>> #<DISASSEM:SEGMENT #x4809CD6D[40] in #2#>) #<Synonym
Stream to SYSTEM:*STDOUT*> #<DISASSEM:DISASSEM-STATE +33 in #1#>)
5: (DISASSEMBLE TEST :STREAM NIL :USE-LABELS ...)
6: (INTERACTIVE-EVAL (DISASSEMBLE (QUOTE TEST)))
7: (COMMON-LISP::%TOP-LEVEL)
8: (COMMON-LISP::RESTART-LISP)
0]
----------------------------------------------------------------
Second question: when defining
(defun test (x)
(declare (type double-float x))
(the double-float (* x x)))
and asking for description I get:
----------------------------------------------------------------
* ;;; Describe test
TEST is an internal symbol in the COMMON-LISP-USER package.
Function: #<Function TEST {481D94C1}>
Function arguments:
(x)
Its defined argument types are:
(DOUBLE-FLOAT)
Its result type is:
*
On Wednesday, 3/20/02 06:43:23 pm [-1] it was compiled from:
#(#'(LAMBDA ()
(DEFUN TEST (X)
(DECLARE (TYPE DOUBLE-FLOAT X))
(THE DOUBLE-FLOAT (* X X)))))
*
----------------------------------------------------------------
Why is the result type *? When using (declare (values double-float))
instead of "the", I see a result type
(OR (DOUBLE-FLOAT (0.0d0)) (MEMBER 0.0d0))
which seems correct but a little too complicated...
Yours, Nicolas.