Subject: Re: What is the best Open-Source Lisp?
From: (Rob Warnock)
Date: Wed, 22 Feb 2006 03:00:15 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Edmond Dantes  <> wrote:
| I take it that CMUCL and SBCL can compile Lisp as well?
| And is the compilation to native or intermediate "bytecode"?

    cmu> (cons (lisp-implementation-type) (lisp-implementation-version))

    ("CMU Common Lisp" . "19a")
    cmu> (machine-type)

    cmu> (defun foo (a b c)
	   (declare (optimize (speed 3) (safety 0) (debug 0))
		    (fixnum a b c))
	   (the fixnum (* (the fixnum (+ a b)) c)))

    cmu> (compile 'foo)
    ; Compiling LAMBDA (A B): 
    ; Compiling Top-Level Form: 

    cmu> (disassemble 'foo)
    58972CA8:       .ENTRY FOO()                 ; FUNCTION
	  C0:       POP     DWORD PTR [EBP-8]
	  C3:       LEA     ESP, [EBP-32]
	  C6:       ADD     EDX, EDI             ; No-arg-parsing entry point
	  C8:       SAR     EDX, 2
	  CB:       IMUL    EDX, ESI
	  CE:       MOV     ECX, [EBP-8]
	  D1:       MOV     EAX, [EBP-4]
	  D4:       ADD     ECX, 2
	  D7:       MOV     ESP, EBP
	  D9:       MOV     EBP, EAX
	  DB:       JMP     ECX
	  DD:       NOP
	  DE:       NOP
	  DF:       NOP


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607