guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-12-206-g0


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-12-206-g03604fc
Date: Tue, 12 Oct 2010 22:06:43 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=03604fcf509892f894ce58096bbd3458080e3a19

The branch, master has been updated
       via  03604fcf509892f894ce58096bbd3458080e3a19 (commit)
       via  978c52d10889164079300bef55db2b6019b6b729 (commit)
       via  796c980a6ac19863b9bd8f46a023bcc601845144 (commit)
      from  3d59aa7c0bdcba61d9d3d4a4ac831e53b37bcd24 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 03604fcf509892f894ce58096bbd3458080e3a19
Author: Ludovic Courtès <address@hidden>
Date:   Tue Oct 12 22:57:08 2010 +0200

    Allocate complex numbers in contiguous pointer-less memory.
    
    * libguile/numbers.h (SCM_COMPLEX_MEM): Remove.
      (SCM_COMPLEX_REAL): Change to just fetch the `real' field of the
      pointed-to `scm_t_complex'.
      (SCM_COMPLEX_IMAG): Likewise.
      (scm_t_complex)[type, pad]: New fields.
    
    * libguile/numbers.c (scm_c_make_rectangular): Allocate the whole
      complex contiguously, with `scm_gc_malloc_pointerless'.

commit 978c52d10889164079300bef55db2b6019b6b729
Author: Ludovic Courtès <address@hidden>
Date:   Tue Oct 12 22:00:28 2010 +0200

    Allocate inexact numbers in pointer-less memory.
    
    * libguile/numbers.c (scm_from_double): Use `scm_gc_malloc_pointerless'
      instead of `scm_double_cell'.

commit 796c980a6ac19863b9bd8f46a023bcc601845144
Author: Ludovic Courtès <address@hidden>
Date:   Tue Oct 12 21:59:53 2010 +0200

    Placate `-Wformat'.
    
    * module/scripts/compile.scm (fail): Use a fancy format string instead
      of a non-literal one.

-----------------------------------------------------------------------

Summary of changes:
 libguile/numbers.c         |   12 +++++++++---
 libguile/numbers.h         |    7 ++++---
 module/scripts/compile.scm |    3 +--
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/libguile/numbers.c b/libguile/numbers.c
index 8480513..fbc6cc8 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -5723,9 +5723,10 @@ scm_c_make_rectangular (double re, double im)
   else
     {
       SCM z;
-      SCM_NEWSMOB (z, scm_tc16_complex,
-                  scm_gc_malloc_pointerless (sizeof (scm_t_complex),
+
+      z = PTR2SCM (scm_gc_malloc_pointerless (sizeof (scm_t_complex),
                                              "complex"));
+      SCM_SET_CELL_TYPE (z, scm_tc16_complex);
       SCM_COMPLEX_REAL (z) = re;
       SCM_COMPLEX_IMAG (z) = im;
       return z;
@@ -6325,8 +6326,13 @@ scm_to_double (SCM val)
 SCM
 scm_from_double (double val)
 {
-  SCM z = scm_double_cell (scm_tc16_real, 0, 0, 0);
+  SCM z;
+
+  z = PTR2SCM (scm_gc_malloc_pointerless (sizeof (scm_t_double), "real"));
+
+  SCM_SET_CELL_TYPE (z, scm_tc16_real);
   SCM_REAL_VALUE (z) = val;
+
   return z;
 }
 
diff --git a/libguile/numbers.h b/libguile/numbers.h
index a69f5af..a3701a6 100644
--- a/libguile/numbers.h
+++ b/libguile/numbers.h
@@ -128,9 +128,8 @@ typedef scm_t_int32 scm_t_wchar;
 #define SCM_COMPLEXP(x) (!SCM_IMP (x) && SCM_TYP16 (x) == scm_tc16_complex)
 
 #define SCM_REAL_VALUE(x) (((scm_t_double *) SCM2PTR (x))->real)
-#define SCM_COMPLEX_MEM(x) ((scm_t_complex *) SCM_CELL_WORD_1 (x))
-#define SCM_COMPLEX_REAL(x) (SCM_COMPLEX_MEM (x)->real)
-#define SCM_COMPLEX_IMAG(x) (SCM_COMPLEX_MEM (x)->imag)
+#define SCM_COMPLEX_REAL(x) (((scm_t_complex *) SCM2PTR (x))->real)
+#define SCM_COMPLEX_IMAG(x) (((scm_t_complex *) SCM2PTR (x))->imag)
 
 /* Each bignum is just an mpz_t stored in a double cell starting at word 1. */
 #define SCM_I_BIG_MPZ(x) (*((mpz_t *) (SCM_CELL_OBJECT_LOC((x),1))))
@@ -157,6 +156,8 @@ typedef struct scm_t_double
 
 typedef struct scm_t_complex
 {
+  SCM type;
+  SCM pad;
   double real;
   double imag;
 } scm_t_complex;
diff --git a/module/scripts/compile.scm b/module/scripts/compile.scm
index 3e451a6..f3853ff 100644
--- a/module/scripts/compile.scm
+++ b/module/scripts/compile.scm
@@ -39,8 +39,7 @@
 
 
 (define (fail . messages)
-  (format (current-error-port)
-         (string-concatenate `("error: " ,@messages "~%")))
+  (format (current-error-port) "error: ~{~a~}~%" messages)
   (exit 1))
 
 (define %options


hooks/post-receive
-- 
GNU Guile



reply via email to

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