On Thu, Jul 17, 2014 at 3:58 PM, Stephan Frank <defclass@googlemail.com> wrote:

;     (SB-GMP::DEFGMPFUN SB-GMP:MPZ-ADD
;         (SB-GMP::A SB-GMP::B)
;       (SB-GMP::WITH-ALLOCATED-RESULTS ((SB-GMP::RESULT (1+ #)))
;         (SB-GMP::WITH-MPZ-VARS ((SB-GMP::A SB-GMP::GA) (SB-GMP::B
SB-GMP::GB))
;           (SB-GMP::__GMPZ_ADD (ADDR SB-GMP::RESULT) (ADDR SB-GMP::GA)
;            (ADDR SB-GMP::GB)))))
; --> PROGN DEFUN PROGN
; ==>
;   (SB-IMPL::%DEFUN 'SB-GMP:MPZ-ADD
;                    (SB-INT:NAMED-LAMBDA SB-GMP:MPZ-ADD
;                        (SB-GMP::A SB-GMP::B)
;                      (DECLARE (OPTIMIZE (SPEED 3) (SPACE 3))
;                               (TYPE INTEGER SB-GMP::A SB-GMP::B))
;                      (BLOCK SB-GMP:MPZ-ADD
;                        (SB-GMP::WITH-ALLOCATED-RESULTS (#)
;                          (SB-GMP::WITH-MPZ-VARS #
;                            #))))
;                    NIL
;                    '(SB-C:LAMBDA-WITH-LEXENV NIL NIL NIL (SB-GMP::A
SB-GMP::B)
;                      (DECLARE (OPTIMIZE (SPEED 3) (SPACE 3))
;                               (TYPE INTEGER SB-GMP::A SB-GMP::B))
;                      (BLOCK SB-GMP:MPZ-ADD
;                        (SB-GMP::WITH-ALLOCATED-RESULTS (#)
;                          (SB-GMP::WITH-MPZ-VARS #
;                            #))))
;                    (SB-C:SOURCE-LOCATION))
;
; note: Return type not fixed values, so can't use known return convention:
;   NIL

Values appears to be quite fixed (this is a simple instance, there are
other functions with two return values). What do I have to do to make
SBCL be aware of the fixed values (and what is this NIL in the compiler
note)?

I don't know quite what's going on here, but the NIL looks to be the return type as known to the compiler (see RETURN-VALUE-EFFICIENCY-NOTE in SYS:SRC;COMPILER;GTN.LISP).

Many thanks and best regards,
Stephan

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel