gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: [Axiom-developer] 2.7.0 reports


From: Stephen Wilson
Subject: [Gcl-devel] Re: [Axiom-developer] 2.7.0 reports
Date: 08 Jul 2007 20:42:10 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Hello Camm,

Another issue has come up, again w.r.t the handling of logical
operations.

I hope these reports are not just pointing out known issues!  I only
wish I had the knowledge to fix them myself.


==--- test.lisp ---

(defun test (x) 
  (when (or (and (consp x) (eq (car x) 'X) t)
            (and (consp x) (eq (car x) '|x|) t))
    'OK))

==-----------------

Note that if the T's are dropped from the AND expressions, the
function behaves as expected.


steve:tmp> gcl
GCL (GNU Common Lisp)  2.7.0 ANSI    Jul  7 2007 19:13:09
Source License: LGPL(gcl,gmp,pargcl), GPL(unexec,bfd,xgcl)
Binary License:  GPL due to GPL'ed components: (XGCL READLINE BFD UNEXEC)
Modifications of this banner must retain notice of a compatible license
Dedicated to the memory of W. Schelter

Use (help) to get some basic information on how to use GCL.

Temporary directory for compiler files set to /tmp/

>(compile-file "test.lisp")

;; Compiling test.lisp.
;; End of Pass 1.  
;; End of Pass 2.  
;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, 
(Debug quality ignored)
;; Finished compiling test.o.
#P"/home/steve/tmp/test.o"
NIL
NIL

>(load "test.o")

;; Loading test.o
 ;; start address -T 0xb4acd8 ;; Finished loading test.o
80

>(test '(X))

OK

>(test '(|x|))

NIL

>(disassemble 'test)

;; Compiling /tmp/gazonk_18523_0.lsp.
;; End of Pass 1.  
;; End of Pass 2.  
;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, 
(Debug quality ignored)
;; Finished compiling /tmp/gazonk_18523_0.o.

#include "gazonk_18523_0.h"
void init_code(){do_init((void *)VV);}
/*      local entry for function TEST   */

static object LI1(V2)

object V2;
{        VMB1 VMS1 VMV1
        goto TTL;
TTL:;
        if(!(consp((V2)))){
        goto T2;}
        /*(CAR X)*/
        {object V4;
        V4= (V2);
        V3= ((V4))->c.c_car;}
        /* END (CAR X)*/
        if(!((V3)==(((object)VV[0])))){
        goto T2;}
        {object V5 = ((object)VV[1]);VMR1
        (V5);}
        goto T2;
T2:;
        {object V6 = Cnil;VMR1
        (V6);}
        return Cnil;
}
#(#(X OK
    (%INIT
     . #((LET ((*DISABLE-RECOMPILE* T))
           (MFSFUN 'TEST 0 1 0)
           (ADD-HASH 'TEST '((T) SYMBOL)
               '((CAR (LIST) T) (EQ (T T) BOOLEAN) (CONSP (T) T))
COMMON-LISP-USER
LISPLAMBDA!
           ,DECLA,OPTIMIZ,SAFETY        ,BLOCK
                                              TEST      ,IF     ,OR
!,AN!,CONSP-    !,E!,CAR!,QUOTE-!,T
/-      12
          x,PROG2
                 OK '/tmp/gazonk_18523_0.lsp))
         (DO-RECOMPILE)))))
static object LI1();
#define VMB1 object  V3;
#define VMS1
#define VMV1
#define VMR1(VMT1) return(VMT1);
#define VM1 0
static void * VVi[3]={
#define Cdata VV[2]
(void *)(LI1)
};
#define VV (VVi)

/tmp/gazonk_18523_0.o:     file format elf32-i386

Disassembly of section .text:

00000000 <init_code>:
   0:   68 00 00 00 00          push   $0x0
   5:   e8 fc ff ff ff          call   6 <init_code+0x6>
   a:   58                      pop    %eax
   b:   c3                      ret    

0000000c <LI1>:
   c:   8b 54 24 04             mov    0x4(%esp),%edx
  10:   81 fa 00 00 00 00       cmp    $0x0,%edx
  16:   74 25                   je     3d <LI1+0x31>
  18:   81 fa ff ff ff bf       cmp    $0xbfffffff,%edx
  1e:   77 1d                   ja     3d <LI1+0x31>
  20:   f6 02 01                testb  $0x1,(%edx)
  23:   74 08                   je     2d <LI1+0x21>
  25:   81 3a ff ff ff bf       cmpl   $0xbfffffff,(%edx)
  2b:   76 10                   jbe    3d <LI1+0x31>
  2d:   a1 00 00 00 00          mov    0x0,%eax
  32:   39 42 04                cmp    %eax,0x4(%edx)
  35:   75 06                   jne    3d <LI1+0x31>
  37:   a1 04 00 00 00          mov    0x4,%eax
  3c:   c3                      ret    
  3d:   b8 00 00 00 00          mov    $0x0,%eax
  42:   c3                      ret    
NIL

>(defun test (x) 
    (when (or (and (consp x) (eq (car x) 'X))
              (and (consp x) (eq (car x) '|x|)))
      'OK))

TEST

>(compile 'test)

;; Compiling /tmp/gazonk_18523_0.lsp.
;; End of Pass 1.  
;; End of Pass 2.  
;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, 
(Debug quality ignored)
;; Finished compiling /tmp/gazonk_18523_0.o.
;; Loading /tmp/gazonk_18523_0.o
 ;; start address -T 0xb4bd68 ;; Finished loading /tmp/gazonk_18523_0.o
#<compiled-function TEST>
NIL
NIL

>(test '(X))

OK

>(test '(|x|))

OK











reply via email to

[Prev in Thread] Current Thread [Next in Thread]