[Top][All Lists]

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

[Guile-commits] GNU Guile branch, wip-rtl, updated. v2.1.0-309-gc24fed1

From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, wip-rtl, updated. v2.1.0-309-gc24fed1
Date: Tue, 05 Jun 2012 21:17:01 +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".

The branch, wip-rtl has been updated
       via  c24fed19329e145cb534494005b236c6c042c397 (commit)
      from  63316ab0f0067edb7e5e3d3d21894312d3d0544c (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 c24fed19329e145cb534494005b236c6c042c397
Author: Andy Wingo <address@hidden>
Date:   Tue Jun 5 23:16:55 2012 +0200

    fix string loading
    * module/system/vm/rtl.scm (static?): Factor out, again.
      (init-non-immediate): Use static? to determine how to load constants.
      (init-symbol): Use make-non-immediate to load the string.


Summary of changes:
 module/system/vm/rtl.scm |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/module/system/vm/rtl.scm b/module/system/vm/rtl.scm
index ae20032..8eb64cf 100644
--- a/module/system/vm/rtl.scm
+++ b/module/system/vm/rtl.scm
@@ -360,9 +360,10 @@
                (hashq-set! assemblers 'name emit)
+(define (static? x)
+  (or (pair? x) (vector? x) (string? x)))
 (define-macro-assembler (load-constant asm dst obj)
-  (define (static? x)
-    (or (pair? x) (vector? x)))
    ((immediate? obj)
     (let ((bits (object-address obj)))
@@ -778,7 +779,7 @@
 (define-macro-assembler (init-non-immediate asm label offset obj)
   (let ((obj-label (cdr (vhash-assoc obj (archive-constants
                                           (asm-archive asm))))))
-    (if (or (pair? obj) (vector? obj))
+    (if (static? obj)
         (emit-make-non-immediate asm 0 obj-label)
         (emit-static-ref asm 0 obj-label))
     (emit-static-set! asm 0 label offset)))
@@ -792,7 +793,7 @@
 (define-macro-assembler (init-symbol asm label obj)
   (let ((str-label (cdr (vhash-assoc (symbol->string obj)
                                      (archive-constants (asm-archive asm))))))
-    (emit-static-ref asm 0 str-label)
+    (emit-make-non-immediate asm 0 str-label)
     (emit-string->symbol asm 0 0)
     (emit-static-set! asm 0 label 0)))

GNU Guile

reply via email to

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