[Top][All Lists]

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

[Guile-commits] GNU Guile branch, wip-cps-bis, updated. v2.1.0-176-g7e29

From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, wip-cps-bis, updated. v2.1.0-176-g7e29869
Date: Thu, 15 Aug 2013 08:41:03 +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-cps-bis has been updated
       via  7e298699bfb8a9f96d2acda17c59d2cb9c8b9ca6 (commit)
       via  095d6304935a2d5cca9c75b865d8038d329cb728 (commit)
       via  521c542199afa4f199746d5bbffc18a988cb30bc (commit)
       via  8d5d0425ce10dcf035fbf717852938291261bd7e (commit)
       via  b57162c3d21fdc9e48572d7a9d4009c37f2c647a (commit)
       via  62744c1a6a6d5fb3f2d6036ce82023beebbff2c1 (commit)
      from  6d05bf6c8fb473028a13c4a2a1513c442d69cb68 (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 7e298699bfb8a9f96d2acda17c59d2cb9c8b9ca6
Merge: 095d630 521c542
Author: Mark H Weaver <address@hidden>
Date:   Thu Aug 15 04:40:28 2013 -0400

    Merge remote-tracking branch 'origin/master' into wip-cps-bis

commit 095d6304935a2d5cca9c75b865d8038d329cb728
Author: Mark H Weaver <address@hidden>
Date:   Thu Aug 15 04:11:59 2013 -0400

    RTL Compiler: Add support for 'vector-set!'.
    * module/language/cps/arities.scm (*rtl-instruction-aliases*):
      Add 'vector-set!' to 'vector-set' mapping.
    * module/language/cps/compile-rtl.scm (emit-rtl-sequence): Add
      'vector-set!' rule to 'emit-seq'.


Summary of changes:
 doc/ref/api-compound.texi           |    8 ++++----
 module/                  |    1 +
 module/ice-9/match.scm              |    4 ++--
 module/ice-9/match.upstream.scm     |    5 ++++-
 module/language/cps/arities.scm     |    3 ++-
 module/language/cps/compile-rtl.scm |    2 ++
 6 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/doc/ref/api-compound.texi b/doc/ref/api-compound.texi
index 699e760..1990d77 100644
--- a/doc/ref/api-compound.texi
+++ b/doc/ref/api-compound.texi
@@ -459,8 +459,8 @@ list results if the last argument is not a proper list.
 @end lisp
 @code{append} doesn't modify the given lists, but the return may share
-structure with the final @var{obj}.  @code{append!} modifies the
-given lists to form its return.
+structure with the final @var{obj}.  @code{append!} is permitted, but
+not required, to modify the given lists to form its return.
 For @code{scm_append} and @code{scm_append_x}, @var{lstlst} is a list
 of the list operands @var{lst} @dots{} @var{obj}.  That @var{lstlst}
@@ -474,8 +474,8 @@ itself is not modified or used in the return.
 @deffnx {C Function} scm_reverse_x (lst, newtail)
 Return a list comprising the elements of @var{lst}, in reverse order.
address@hidden constructs a new list, @code{reverse!} modifies
address@hidden in constructing its return.
address@hidden constructs a new list.  @code{reverse!} is permitted, but
+not required, to modify @var{lst} in constructing its return.
 For @code{reverse!}, the optional @var{newtail} is appended to the
 result.  @var{newtail} isn't reversed, it simply becomes the list
diff --git a/module/ b/module/
index aa214b9..dcd311c 100644
--- a/module/
+++ b/module/
@@ -36,6 +36,7 @@ VM_TARGETS := system/vm/assembler.go system/vm/disassembler.go
 $(VM_TARGETS): $(top_builddir)/libguile/vm-operations.h
 ice-9/boot-9.go: ice-9/boot-9.scm ice-9/quasisyntax.scm 
+ice-9/match.go: ice-9/match.scm ice-9/match.upstream.scm
 # We can compile these in any order, but it's fastest if we compile
 # psyntax and boot-9 first, then the compiler itself, then the rest of
diff --git a/module/ice-9/match.scm b/module/ice-9/match.scm
index 7fd191a..099afb5 100644
--- a/module/ice-9/match.scm
+++ b/module/ice-9/match.scm
@@ -24,9 +24,9 @@
-(define (error _ msg)
+(define (error _ . args)
   ;; Error procedure for run-time "no matching pattern" errors.
-  (throw 'match-error "match" msg))
+  (apply throw 'match-error "match" args))
 ;; Support for record matching.
diff --git a/module/ice-9/match.upstream.scm b/module/ice-9/match.upstream.scm
index 29f9dbe..4609883 100644
--- a/module/ice-9/match.upstream.scm
+++ b/module/ice-9/match.upstream.scm
@@ -284,7 +284,10 @@
   (syntax-rules (=>)
     ;; no more clauses, the match failed
     ((match-next v g+s)
-     (error 'match "no matching pattern"))
+     ;; Here we wrap error within a double set of parentheses, so that
+     ;; the call to 'error' won't be in tail position.  This allows the
+     ;; backtrace to show the source location of the failing match form.
+     ((error 'match "no matching pattern" v)))
     ;; named failure continuation
     ((match-next v g+s (pat (=> failure) . body) . rest)
      (let ((failure (lambda () (match-next v g+s . rest))))
diff --git a/module/language/cps/arities.scm b/module/language/cps/arities.scm
index b6a8c0b..4c3cac1 100644
--- a/module/language/cps/arities.scm
+++ b/module/language/cps/arities.scm
@@ -127,7 +127,8 @@
     (* . mul) (/ . div)
     (quotient . quo) (remainder . rem)
     (modulo . mod)
-    (define! . define)))
+    (define! . define)
+    (vector-set! . vector-set)))
 (define *macro-instruction-arities*
   '((cache-current-module! . (0 . 2))
diff --git a/module/language/cps/compile-rtl.scm 
index 96eac4e..d14cf1c 100644
--- a/module/language/cps/compile-rtl.scm
+++ b/module/language/cps/compile-rtl.scm
@@ -228,6 +228,8 @@
            (emit `(free-set! ,(slot closure) ,(slot value) ,(constant idx))))
           (($ $primcall 'box-set! (box value))
            (emit `(box-set! ,(slot box) ,(slot value))))
+          (($ $primcall 'vector-set! (vector index value))
+           (emit `(vector-set ,(slot vector) ,(slot index) ,(slot value))))
           (($ $primcall 'define! (sym value))
            (emit `(define ,(slot sym) ,(slot value))))
           (($ $primcall name args)

GNU Guile

reply via email to

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