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-14-19-g88


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-14-19-g8891bd1
Date: Tue, 04 Jan 2011 17:38:04 +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=8891bd1b166b7210c241a0c1a730fc3af7f45b8a

The branch, master has been updated
       via  8891bd1b166b7210c241a0c1a730fc3af7f45b8a (commit)
       via  9dfcd9e2d6fa4fdaae86ce529382d30b27a2cec6 (commit)
       via  bf7c2e964e4b02670b3a8636dca080734183a534 (commit)
      from  03f6e5ed4c897c3c8baa855ce3e00afef5e03785 (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 8891bd1b166b7210c241a0c1a730fc3af7f45b8a
Author: Noah Lavine <address@hidden>
Date:   Mon Jan 3 02:22:35 2011 -0500

    Fix ECMAScript object creation.
    
    * module/language/ecmascript/compile-tree-il.scm (compile-tree-il):
      generate correct tree-il for construction of new objects.
    * test-suite/tests/ecmascript.test (ecompile): Add pattern with EXPECTED
      omitted.
      ("compiler"): test whether we generate new objects correctly.
    
    Signed-off-by: Ludovic Courtès <address@hidden>

commit 9dfcd9e2d6fa4fdaae86ce529382d30b27a2cec6
Author: Ludovic Courtès <address@hidden>
Date:   Tue Jan 4 18:29:55 2011 +0100

    Document `scm_misc_error' (bug #31969).
    
    * doc/ref/api-control.texi (Handling Errors): Add `scm_misc_error'.
      Suggested by Bake Timmons <address@hidden> (bug #31969).

commit bf7c2e964e4b02670b3a8636dca080734183a534
Author: Ludovic Courtès <address@hidden>
Date:   Tue Jan 4 18:08:58 2011 +0100

    Improve doc of `string-index', `string-index-right', and `string-rindex'.
    
    Suggested by Noah Lavine <address@hidden>.
    
    * doc/ref/api-data.texi (String Searching): Mention the return value of
      `string-index', `string-index-right', and `string-rindex' when no
      match is found.
    
    * libguile/srfi-13.c (scm_string_index, scm_string_index_right,
      scm_string_rindex): Adjust docstring accordingly.

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

Summary of changes:
 doc/ref/api-control.texi                       |    9 +++++++--
 doc/ref/api-data.texi                          |    8 +++++++-
 libguile/srfi-13.c                             |   11 +++++++----
 module/language/ecmascript/compile-tree-il.scm |   20 ++++++++++----------
 test-suite/tests/ecmascript.test               |    9 ++++++++-
 5 files changed, 39 insertions(+), 18 deletions(-)

diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi
index c8c93ba..2375a64 100644
--- a/doc/ref/api-control.texi
+++ b/doc/ref/api-control.texi
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 
2010
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 
2010, 2011
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
@@ -1493,13 +1493,18 @@ and the call to these routines doesn't change 
@code{errno}.
 @deftypefnx {C Function} void scm_wrong_type_arg_msg (char address@hidden, int 
@var{argnum}, SCM @var{bad_value}, const char address@hidden)
 @deftypefnx {C Function} void scm_memory_error (char address@hidden)
 Throw an error with the various keys described above.
address@hidden {C Function} void scm_misc_error (const char address@hidden, 
const char address@hidden, SCM @var{args})
 
-For @code{scm_wrong_num_args}, @var{proc} should be a Scheme symbol
+In @code{scm_wrong_num_args}, @var{proc} should be a Scheme symbol
 which is the name of the procedure incorrectly invoked.  The other
 routines take the name of the invoked procedure as a C string.
 
 In @code{scm_wrong_type_arg_msg}, @var{expected} is a C string
 describing the type of argument that was expected.
+
+In @code{scm_misc_error}, @var{message} is the error message string,
+possibly containing @code{simple-format} escapes (@pxref{Writing}), and
+the corresponding arguments in the @var{args} list.
 @end deftypefn
 
 
diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi
index 14b81f5..2c990f9 100755
--- a/doc/ref/api-data.texi
+++ b/doc/ref/api-data.texi
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 
2007, 2008, 2009, 2010
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 
2007, 2008, 2009, 2010, 2011
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
@@ -3398,6 +3398,8 @@ satisfies the predicate @var{char_pred}, if it is a 
procedure,
 @item
 is in the set @var{char_pred}, if it is a character set.
 @end itemize
+
+Return @code{#f} if no match is found.
 @end deffn
 
 @deffn {Scheme Procedure} string-rindex s char_pred [start [end]]
@@ -3415,6 +3417,8 @@ satisfies the predicate @var{char_pred}, if it is a 
procedure,
 @item
 is in the set if @var{char_pred} is a character set.
 @end itemize
+
+Return @code{#f} if no match is found.
 @end deffn
 
 @deffn {Scheme Procedure} string-prefix-length s1 s2 [start1 [end1 [start2 
[end2]]]]
@@ -3476,6 +3480,8 @@ satisfies the predicate @var{char_pred}, if it is a 
procedure,
 @item
 is in the set if @var{char_pred} is a character set.
 @end itemize
+
+Return @code{#f} if no match is found.
 @end deffn
 
 @deffn {Scheme Procedure} string-skip s char_pred [start [end]]
diff --git a/libguile/srfi-13.c b/libguile/srfi-13.c
index afeb804..dfe948b 100644
--- a/libguile/srfi-13.c
+++ b/libguile/srfi-13.c
@@ -1,6 +1,6 @@
 /* srfi-13.c --- SRFI-13 procedures for Guile
  *
- * Copyright (C) 2001, 2004, 2005, 2006, 2008, 2009, 2010 Free Software 
Foundation, Inc.
+ * Copyright (C) 2001, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Free Software 
Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -1651,7 +1651,8 @@ SCM_DEFINE (scm_string_index, "string-index", 2, 2, 0,
            "\n"
            "@item\n"
            "is in the set @var{char_pred}, if it is a character set.\n"
-           "@end itemize")
+           "@end itemize\n\n"
+           "Return @code{#f} if no match is found.")
 #define FUNC_NAME s_scm_string_index
 {
   size_t cstart, cend;
@@ -1715,7 +1716,8 @@ SCM_DEFINE (scm_string_index_right, "string-index-right", 
2, 2, 0,
            "\n"
            "@item\n"
            "is in the set if @var{char_pred} is a character set.\n"
-           "@end itemize")
+           "@end itemize\n\n"
+           "Return @code{#f} if no match is found.")
 #define FUNC_NAME s_scm_string_index_right
 {
   size_t cstart, cend;
@@ -1779,7 +1781,8 @@ SCM_DEFINE (scm_string_rindex, "string-rindex", 2, 2, 0,
            "\n"
            "@item\n"
            "is in the set if @var{char_pred} is a character set.\n"
-           "@end itemize")
+           "@end itemize\n\n"
+           "Return @code{#f} if no match is found.")
 #define FUNC_NAME s_scm_string_rindex
 {
   return scm_string_index_right (s, char_pred, start, end);
diff --git a/module/language/ecmascript/compile-tree-il.scm 
b/module/language/ecmascript/compile-tree-il.scm
index a97e555..a5276ab 100644
--- a/module/language/ecmascript/compile-tree-il.scm
+++ b/module/language/ecmascript/compile-tree-il.scm
@@ -366,16 +366,16 @@
        `(apply ,(@implv new-array)
                ,@(map (lambda (x) (comp x e)) args)))
       ((object . ,args)
-       (@impl new-object
-              (map (lambda (x)
-                     (pmatch x
-                       ((,prop ,val)
-                        (-> (apply (-> (primitive 'cons))
-                                   (-> (const prop))
-                                   (comp val e))))
-                       (else
-                        (error "bad prop-val pair" x))))
-                   args)))
+       `(apply (@ (language ecmascript impl) new-object)
+               ,@(map (lambda (x)
+                         (pmatch x
+                                 ((,prop ,val)
+                                  (-> (apply (-> (primitive 'cons))
+                                             (-> (const prop))
+                                             (comp val e))))
+                                 (else
+                                  (error "bad prop-val pair" x))))
+                       args)))
       ((pref ,obj ,prop)
        (@impl pget
               (comp obj e)
diff --git a/test-suite/tests/ecmascript.test b/test-suite/tests/ecmascript.test
index 955296d..b0861bb 100644
--- a/test-suite/tests/ecmascript.test
+++ b/test-suite/tests/ecmascript.test
@@ -1,6 +1,6 @@
 ;;;; ecmascript.test --- ECMAScript.      -*- mode: scheme; coding: utf-8; -*-
 ;;;;
-;;;;   Copyright (C) 2010 Free Software Foundation, Inc.
+;;;;   Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -53,6 +53,12 @@
 
 (define-syntax ecompile
   (syntax-rules ()
+    ((_ expression)
+     (pass-if expression
+       (not (not
+             (compile (call-with-input-string expression read-ecmascript)
+                      #:from 'ecmascript
+                      #:to 'value)))))
     ((_ expression expected)
      (pass-if expression
        (equal? expected
@@ -65,6 +71,7 @@
   (ecompile "true;" #t)
   (ecompile "2 + 2;" 4)
   (ecompile "\"hello\";" "hello")
+  (ecompile "var test = { bar: 1 };")
 
   ;; FIXME: Broken!
   ;; (ecompile "[1,2,3,4].map(function(x) { return x * x; });"


hooks/post-receive
-- 
GNU Guile



reply via email to

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