guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-57-g13ff68


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-57-g13ff681
Date: Sat, 26 Jan 2013 20:54:23 +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=13ff681c33a0ff6ff6004d44126697f6dea3ec73

The branch, stable-2.0 has been updated
       via  13ff681c33a0ff6ff6004d44126697f6dea3ec73 (commit)
       via  ed7c4a5d777bcff78512f1f1f9f2847ade90af11 (commit)
       via  4ff2133aa16a29347149ff04225fb4649256e9c9 (commit)
      from  e70b663c24420093f98ce6147178be5ef92655ba (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 13ff681c33a0ff6ff6004d44126697f6dea3ec73
Author: Ludovic Courtès <address@hidden>
Date:   Sat Jan 26 21:49:17 2013 +0100

    Add tests for `--language'.
    
    * test-suite/standalone/Makefile.am (top_srcdir): Add `top_srcdir'.
      (check_SCRIPTS, TESTS): Add `test-language'.
      (EXTRA_DIST): Add `test-language.el' and `test-language.js'.
    * test-suite/standalone/test-language,
      test-suite/standalone/test-language.el,
      test-suite/standalone/test-language.js: New files.

commit ed7c4a5d777bcff78512f1f1f9f2847ade90af11
Author: Ludovic Courtès <address@hidden>
Date:   Sat Jan 26 19:18:31 2013 +0100

    ecmascript: Fix conversion to boolean for non-numbers.
    
    * module/language/ecmascript/base.scm (->boolean): Call `zero?' and
      `nan?' only when X is a number.
    * test-suite/tests/ecmascript.test ("compiler"): Add test case.

commit 4ff2133aa16a29347149ff04225fb4649256e9c9
Author: Ludovic Courtès <address@hidden>
Date:   Sat Jan 26 15:41:05 2013 +0100

    Clarify the copyright status of GOOPS.
    
    * module/oop/goops.scm, module/oop/goops/active-slot.scm,
      module/oop/goops/composite-slot.scm, module/oop/goops/describe.scm:
      Add a copyright line for Érick Gallesio.  Mention the STk version
      GOOPS was derived from.  Remove mentions of the ‘COPYRIGHTS’ file.
      Thanks to Karl Berry <address@hidden> for pointing it out, and
      to Michael Djurfeldt <address@hidden>.

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

Summary of changes:
 module/language/ecmascript/base.scm    |    5 +++--
 module/oop/goops.scm                   |   15 +++++++--------
 module/oop/goops/active-slot.scm       |   19 +++++++++----------
 module/oop/goops/composite-slot.scm    |   17 ++++++++---------
 module/oop/goops/describe.scm          |   17 ++++++++---------
 test-suite/standalone/Makefile.am      |    7 ++++++-
 test-suite/standalone/test-language    |   25 +++++++++++++++++++++++++
 test-suite/standalone/test-language.el |   11 +++++++++++
 test-suite/standalone/test-language.js |   12 ++++++++++++
 test-suite/tests/ecmascript.test       |    3 ++-
 10 files changed, 91 insertions(+), 40 deletions(-)
 create mode 100755 test-suite/standalone/test-language
 create mode 100644 test-suite/standalone/test-language.el
 create mode 100644 test-suite/standalone/test-language.js

diff --git a/module/language/ecmascript/base.scm 
b/module/language/ecmascript/base.scm
index 6f5c65b..ac8493d 100644
--- a/module/language/ecmascript/base.scm
+++ b/module/language/ecmascript/base.scm
@@ -1,6 +1,6 @@
 ;;; ECMAScript for Guile
 
-;; Copyright (C) 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2013 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
@@ -168,7 +168,8 @@
       x))
 
 (define (->boolean x)
-  (not (or (not x) (null? x) (eq? x *undefined*) (zero? x) (nan? x)
+  (not (or (not x) (null? x) (eq? x *undefined*)
+           (and (number? x) (or (zero? x) (nan? x)))
            (and (string? x) (= (string-length x) 0)))))
 
 (define (->number x)
diff --git a/module/oop/goops.scm b/module/oop/goops.scm
index e4424f3..8e548d8 100644
--- a/module/oop/goops.scm
+++ b/module/oop/goops.scm
@@ -1,28 +1,27 @@
 ;;; installed-scm-file
 
 ;;;; Copyright (C) 1998,1999,2000,2001,2002, 2003, 2006, 2009, 2010, 2011 Free 
Software Foundation, Inc.
-;;;; 
+;;;; Copyright (C) 1993-1998 Erick Gallesio - I3S-CNRS/ESSI <address@hidden>
+;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
 ;;;; License as published by the Free Software Foundation; either
 ;;;; version 3 of the License, or (at your option) any later version.
-;;;; 
+;;;;
 ;;;; This library is distributed in the hope that it will be useful,
 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 ;;;; Lesser General Public License for more details.
-;;;; 
+;;;;
 ;;;; You should have received a copy of the GNU Lesser General Public
 ;;;; License along with this library; if not, write to the Free Software
 ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
-;;;; 
+;;;;
 
 
-;;;; This software is a derivative work of other copyrighted softwares; the
-;;;; copyright notices of these softwares are placed in the file COPYRIGHTS
 ;;;;
-;;;; This file is based upon stklos.stk from the STk distribution by
-;;;; Erick Gallesio <address@hidden>.
+;;;; This file was based upon stklos.stk from the STk distribution
+;;;; version 4.0.1 by Erick Gallesio <address@hidden>.
 ;;;;
 
 (define-module (oop goops)
diff --git a/module/oop/goops/active-slot.scm b/module/oop/goops/active-slot.scm
index 79aa1b3..4d3bbf7 100644
--- a/module/oop/goops/active-slot.scm
+++ b/module/oop/goops/active-slot.scm
@@ -1,28 +1,27 @@
 ;;; installed-scm-file
 
-;;;;   Copyright (C) 1999, 2001, 2006, 2009 Free Software Foundation, Inc.
-;;;; 
+;;;; Copyright (C) 1999, 2001, 2006, 2009 Free Software Foundation, Inc.
+;;;; Copyright (C) 1993-1998 Erick Gallesio - I3S-CNRS/ESSI <address@hidden>
+;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
 ;;;; License as published by the Free Software Foundation; either
 ;;;; version 3 of the License, or (at your option) any later version.
-;;;; 
+;;;;
 ;;;; This library is distributed in the hope that it will be useful,
 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 ;;;; Lesser General Public License for more details.
-;;;; 
+;;;;
 ;;;; You should have received a copy of the GNU Lesser General Public
 ;;;; License along with this library; if not, write to the Free Software
 ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
-;;;; 
-
+;;;;
 
-;;;; This software is a derivative work of other copyrighted softwares; the
-;;;; copyright notices of these softwares are placed in the file COPYRIGHTS
+
 ;;;;
-;;;; This file is based upon active-slot.stklos from the STk
-;;;; distribution by Erick Gallesio <address@hidden>.
+;;;; This file was based upon active-slot.stklos from the STk distribution
+;;;; version 4.0.1 by Erick Gallesio <address@hidden>.
 ;;;;
 
 (define-module (oop goops active-slot)
diff --git a/module/oop/goops/composite-slot.scm 
b/module/oop/goops/composite-slot.scm
index b3f8cc0..bd3eb94 100644
--- a/module/oop/goops/composite-slot.scm
+++ b/module/oop/goops/composite-slot.scm
@@ -1,28 +1,27 @@
 ;;; installed-scm-file
 
-;;;;   Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
-;;;; 
+;;;; Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
+;;;; Copyright (C) 1993-1998 Erick Gallesio - I3S-CNRS/ESSI <address@hidden>
+;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
 ;;;; License as published by the Free Software Foundation; either
 ;;;; version 3 of the License, or (at your option) any later version.
-;;;; 
+;;;;
 ;;;; This library is distributed in the hope that it will be useful,
 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 ;;;; Lesser General Public License for more details.
-;;;; 
+;;;;
 ;;;; You should have received a copy of the GNU Lesser General Public
 ;;;; License along with this library; if not, write to the Free Software
 ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
-;;;; 
+;;;;
 
 
-;;;; This software is a derivative work of other copyrighted softwares; the
-;;;; copyright notices of these softwares are placed in the file COPYRIGHTS
 ;;;;
-;;;; This file is based upon composite-slot.stklos from the STk
-;;;; distribution by Erick Gallesio <address@hidden>.
+;;;; This file was based upon composite-slot.stklos from the STk distribution
+;;;; version 4.0.1 by Erick Gallesio <address@hidden>.
 ;;;;
 
 (define-module (oop goops composite-slot)
diff --git a/module/oop/goops/describe.scm b/module/oop/goops/describe.scm
index 86b2d2c..52eb299 100644
--- a/module/oop/goops/describe.scm
+++ b/module/oop/goops/describe.scm
@@ -1,28 +1,27 @@
 ;;; installed-scm-file
 
-;;;;   Copyright (C) 1998, 1999, 2001, 2006, 2008, 2009 Free Software 
Foundation, Inc.
-;;;; 
+;;;; Copyright (C) 1998, 1999, 2001, 2006, 2008, 2009 Free Software 
Foundation, Inc.
+;;;; Copyright (C) 1993-1998 Erick Gallesio - I3S-CNRS/ESSI <address@hidden>
+;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
 ;;;; License as published by the Free Software Foundation; either
 ;;;; version 3 of the License, or (at your option) any later version.
-;;;; 
+;;;;
 ;;;; This library is distributed in the hope that it will be useful,
 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 ;;;; Lesser General Public License for more details.
-;;;; 
+;;;;
 ;;;; You should have received a copy of the GNU Lesser General Public
 ;;;; License along with this library; if not, write to the Free Software
 ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
-;;;; 
+;;;;
 
 
-;;;; This software is a derivative work of other copyrighted softwares; the
-;;;; copyright notices of these softwares are placed in the file COPYRIGHTS
 ;;;;
-;;;; This file is based upon describe.stklos from the STk distribution by
-;;;; Erick Gallesio <address@hidden>.
+;;;; This file was based upon describe.stklos from the STk distribution
+;;;; version 4.0.1 by Erick Gallesio <address@hidden>.
 ;;;;
 
 (define-module (oop goops describe)
diff --git a/test-suite/standalone/Makefile.am 
b/test-suite/standalone/Makefile.am
index daa3d07..be5d913 100644
--- a/test-suite/standalone/Makefile.am
+++ b/test-suite/standalone/Makefile.am
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in.
 ##
 ## Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-##   2011, 2012 Free Software Foundation, Inc.
+##   2011, 2012, 2013 Free Software Foundation, Inc.
 ##
 ## This file is part of GUILE.
 ##
@@ -31,6 +31,7 @@ BUILT_SOURCES =
 EXTRA_DIST =
 
 TESTS_ENVIRONMENT =                                            \
+  top_srcdir="$(top_srcdir)"                                   \
   srcdir="$(srcdir)"                                           \
   builddir="$(builddir)"                                       \
   @LOCALCHARSET_TESTS_ENVIRONMENT@                             \
@@ -88,6 +89,10 @@ TESTS += test-command-line-encoding
 check_SCRIPTS += test-command-line-encoding2
 TESTS += test-command-line-encoding2
 
+check_SCRIPTS += test-language
+TESTS += test-language
+EXTRA_DIST += test-language.el test-language.js
+
 # test-num2integral
 test_num2integral_SOURCES = test-num2integral.c
 test_num2integral_CFLAGS = ${test_cflags}
diff --git a/test-suite/standalone/test-language 
b/test-suite/standalone/test-language
new file mode 100755
index 0000000..59ed82b
--- /dev/null
+++ b/test-suite/standalone/test-language
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+# Make sure that code passed as `-c' or `-l' is evaluted using the
+# right language.
+
+# The default language in effect until `--language' is encountered is
+# Scheme.
+guile -c "(exit (= 3 (apply + '(1 2))))" --language=elisp
+! guile -c "(= (funcall (symbol-function '+) 1 2) 3)" 2> /dev/null
+
+guile --language=elisp -c "(= (funcall (symbol-function '+) 1 2) 3)"
+guile --language=ecmascript -c '(function (x) { return x * x; })(2);'
+
+# Same with `-l'.
+guile --no-auto-compile -l "$top_srcdir/module/ice-9/q.scm" -c 1
+guile --no-auto-compile                                \
+      -l "$top_srcdir/module/ice-9/q.scm"      \
+      --language=elisp                         \
+      -l "$srcdir/test-language.el"            \
+      --language=ecmascript                    \
+      -l "$srcdir/test-language.js"            \
+      --language=scheme                                \
+      -c 1
diff --git a/test-suite/standalone/test-language.el 
b/test-suite/standalone/test-language.el
new file mode 100644
index 0000000..c1f09cc
--- /dev/null
+++ b/test-suite/standalone/test-language.el
@@ -0,0 +1,11 @@
+;; Sample Elisp code for `test-language'.
+
+(defun fib (n)
+  "Anything but a fib."
+  (if (<= n 1)
+      n
+    (+ (fib (- n 1))
+       (fib (- n 2)))))
+
+(or (= 13 (fib 7))
+    (error "Something's wrong!"))
diff --git a/test-suite/standalone/test-language.js 
b/test-suite/standalone/test-language.js
new file mode 100644
index 0000000..c8de366
--- /dev/null
+++ b/test-suite/standalone/test-language.js
@@ -0,0 +1,12 @@
+/* Sample ECMAscript code for `test-language'.  */
+
+function fib (n)
+{
+    if (n <= 1)
+       return n;
+    else
+       return fib (n - 1) + fib (n - 2);
+}
+
+if (fib (7) != 13)
+    error ("Something's wrong!");
diff --git a/test-suite/tests/ecmascript.test b/test-suite/tests/ecmascript.test
index 8b5dd82..96b1d66 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, 2011 Free Software Foundation, Inc.
+;;;;   Copyright (C) 2010, 2011, 2013 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
@@ -78,6 +78,7 @@
 (with-test-prefix "compiler"
 
   (ecompile "true;" #t)
+  (ecompile "if (3 > 2) true; else false;" #t)
   (ecompile "2 + 2;" 4)
   (ecompile "\"hello\";" "hello")
   (ecompile "var test = { bar: 1 };")


hooks/post-receive
-- 
GNU Guile



reply via email to

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