axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Re: debugging


From: Waldek Hebisch
Subject: Re: [Axiom-developer] Re: debugging
Date: Sat, 14 Jul 2007 02:51:38 +0200 (CEST)

I wrote:
> > Greetings!  
> > 
> > Previous message a false alarm, as my fresh build just failed, though
> > not with any segfault.  Again, but in a different place:
> > 
> > (DEFUN |DFLOAT;base;Pi;7| ($)
> >   (PROG ()
> >     (RETURN
> >       (FLOAT-RADIX
> >           '#1=#((|DoubleFloat|)
> >                 (#<compiled-function |lookupComplete|> #1#
> > 
> > 
> > Same function that you found with the objnull.  Question -- what
> > function(s) write this source?
> > 
> 
> There are several functions involved.  In case of #<OBJNULL> using
> traces I see that |compDefineCapsuleFunction| function (defined
> in 'define.boot.pamphlet') gets:
> 
>  1> (|compDefineCapsuleFunction|
>          (DEF (|base|) (NIL) (NIL)
>               ((|elt| |Lisp| FLOAT-RADIX) (|elt| $ (|Zero|))))
> ...
> ...
> 
> 
> It seems that (|elt| $ (|Zero|)) give us '#<OBJNULL>.  |elt| is
> handled in 'compiler.boot.pamphlet':
> 
> 
>     2> (|compForm1| ((|elt| |Lisp| FLOAT-RADIX) (|elt| $ (|Zero|)))
> 
>       3> (|compElt| (|elt| $ (|Zero|)) |$EmptyMode|
> ....
> ....
>       <3 (|compElt|
>              ((|call| (XLAM |ignore| '#<OBJNULL>)) $
> 

I have narrowed down the problem:

   compiling exported base : () -> PositiveInteger
  1> (|genDeltaEntry| (|Zero| ($ $) (T (CONST $ 18))))
    2> (|optDeltaEntry| |Zero| ($) $ CONST)
      3> (|compiledLookup| |Zero| ((|DoubleFloat|))
             #<vector 0000000002b66f90>)
      <3 (|compiledLookup|
             (|makeSpadConstant|
                 #<compiled-function |DFLOAT;Zero;$;15|>
                 #<vector 0000000002b66f90> 25))
    <2 (|optDeltaEntry| (XLAM |ignore| '#<OBJNULL>))
  <1 (|genDeltaEntry| (XLAM |ignore| '#<OBJNULL>))


|makeSpadConstant| calls its argument.  Checking this I get:

)lisp (|DFLOAT;Zero;$;15| nil)

Value = #<OBJNULL>

)lisp (disassemble '|DFLOAT;Zero;$;15|)
^M
   >> System error:
   Condition in DISASSEMBLE [or a callee]: INTERNAL-SIMPLE-END-OF-FILE: Stream 
error on stream #<input stream "/tmp/gazonk0.c">: Unexpected end of file:

Looking at "/tmp/gazonk0.c" I see:


#include "cmpinclude.h"
#include "gazonk0.h"
void init__tmp_gazonk0(){do_init((void *)VV);}
/*      local entry for function DFLOAT;Zero;$;15       */

static double LI1__DFLOAT$Zero$$$15___gazonk0(V2)

object V2;
{        VMB1 VMS1 VMV1
        goto TTL;
TTL:;
        /*(FLOAT 0 MOST-POSITIVE-DOUBLE-FLOAT)*/
        {fixnum V3;
        V3= (fixnum)0;
        V3= (fixnum)0;
        {double V4 = (    1.    )*((fixnum)0);VMR1
        (V4);}}
        /* END (FLOAT 0 MOST-POSITIVE-DOUBLE-FLOAT)*/
        {double V5 = lf(Cnil);VMR1
        (V5);}
}
/*      global entry for the function DFLOAT;Zero;$;15  */

static void L1__DFLOAT$Zero$$$15___gazonk0()
{       register object *base=vs_base;
        check_arg(1);
        base[0]=make_longfloat(LI1__DFLOAT$Zero$$$15___gazonk0((base[0])));
        vs_top=(vs_base=base)+1;
}

        #ifdef SYSTEM_SPECIAL_INIT
        SYSTEM_SPECIAL_INIT
        #endif


The assignment to V5 looks wrong...

The file DFLOAT.o where |DFLOAT;Zero;$;15| lives was compiled in
the previous step.

-- 
                              Waldek Hebisch
address@hidden 




reply via email to

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