This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Again: compile time debug mode


Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:
> What about applying some patch like below, which was taken from a mail
> from Ken Raeburn?  In the beginning this patch does not inhibit any
> compilation, but allows for smoothly changing guile's source in a way that
> it will finally be possible to compile with GUILE_COMPILE_TIME_DEBUG_MODE
> defined.

Under many configurations, returning (and occasionally passing) a
union is done by reference, so that change would be bad for
performance.  It would also be an incompatible change; an application
built with header files using the union would not be able to call a
pre-built shared library built using the integral type.

The better idea we've come up with is to use gcc's transparent union,
once some fixes get into the compiler to make it apply properly to
return values.  (I'm supposed to be working on those compiler patches,
but no progress yet.  Gotta bug the boss again about paperwork.)
Then, when a recent enough gcc is used, an efficient and compatible
calling sequence will be used, with the avoidance of type confusion;
when gcc is not used, or too old a version is used, the integral type
will be used, keeping the performance and losing the type checks.

Ken

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]