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-5-211-g27


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-5-211-g271a32d
Date: Fri, 11 Dec 2009 23:09:40 +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=271a32dbc25825ffa3cd880b4260272c0ddc7cf1

The branch, master has been updated
       via  271a32dbc25825ffa3cd880b4260272c0ddc7cf1 (commit)
       via  492e7efe6d453d7ef45f333ff22fa4d3838425fa (commit)
       via  5bb408ccaf61884078f787f748dab6146ab3bc96 (commit)
      from  9035e9d6db84d3e37dc2ba93dbeea7e0fc6b4bb7 (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 271a32dbc25825ffa3cd880b4260272c0ddc7cf1
Author: Andy Wingo <address@hidden>
Date:   Sat Dec 12 00:10:14 2009 +0100

    commit draft of NEWS

commit 492e7efe6d453d7ef45f333ff22fa4d3838425fa
Author: Andy Wingo <address@hidden>
Date:   Fri Dec 11 21:51:02 2009 +0100

    lame tweak to the inliner
    
    * module/language/tree-il/inline.scm: Tweak to avoid a (if #t #t #f).
      Yes, it's lame.

commit 5bb408ccaf61884078f787f748dab6146ab3bc96
Author: Andy Wingo <address@hidden>
Date:   Fri Dec 11 18:17:01 2009 +0100

    prepare NEWS for 1.9.6
    
    * NEWS: Prepare NEWS for 1.9.6.

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

Summary of changes:
 NEWS                               |  277 +++++++++++++++++++++++-------------
 module/language/tree-il/inline.scm |   31 +++--
 2 files changed, 193 insertions(+), 115 deletions(-)

diff --git a/NEWS b/NEWS
index 08dc112..96f044b 100644
--- a/NEWS
+++ b/NEWS
@@ -8,150 +8,204 @@ Please send Guile bug reports to address@hidden
 (During the 1.9 series, we will keep an incremental NEWS for the latest
 prerelease, and a full NEWS corresponding to 1.8 -> 2.0.)
 
-Changes in 1.9.5 (since the 1.9.4 prerelease):
+Changes in 1.9.6 (since the 1.9.5 prerelease):
 
-** Compiled procedures may now have more than one arity.
+** New implementation of `primitive-eval'
 
-This can be the case, for example, in case-lambda procedures. The
-arities of compiled procedures may be accessed via procedures from the
-`(system vm program)' module; see "Compiled Procedures", "Optional
-Arguments", and "Case-lambda" in the manual. 
+Guile's `primitive-eval' is now implemented in Scheme. Actually there is
+still a C evaluator, used when building a fresh Guile to interpret the
+compiler, so we can compile eval.scm. Thereafter all calls to
+primitive-eval are implemented by VM-compiled code.
 
-** `case-lambda' is now available in the default environment.
+This allows all of Guile's procedures, be they interpreted or compiled,
+to execute on the same stack, unifying multiple-value return semantics,
+providing for proper tail recursion between interpreted and compiled
+code, and simplifying debugging.
 
-The binding in the default environment is equivalent to the one from the
-`(srfi srfi-16)' module. Use the srfi-16 module explicitly if you wish
-to maintain compatibility with Guile 1.8 and earlier.
+goes along with a new c evaluator -- memoization completely before
+evaluation -- threadsafe, not debug-happy
 
-** VM calling convention change: callee-parsed arguments
+loadsa c interface changes, see changelog
 
-As an internal implementation detail, compiled procedures are now
-responsible for parsing their own arguments, which they receive on the
-stack.
+remove local-eval
 
-** VM support for multiple-arity dispatch
+** GOOPS dispatch in scheme
 
-Calls to procedures with multiple arities, for example those made be
-`case-lambda', now dispatch via special opcodes, without the need to
-cons a rest list.
+not much user-level change, but neat to note; possibility for method
+combinations &c
 
-** Intermediate language support for multiple-arity procedures.
+** Elisp compiler
 
-In the intermediate language, tree-il, all procedures may have one or
-more arities. This allows all Guile languages to have multiple arities.
-It is, however, an incompatible change, and anyone maintaining a
-compiler out-of-tree would be advised to get it into Guile soon :)
+The derelict Guile maintainers finally got around to merging Daniel
+Kraft's excellent Emacs Lisp compiler. You can now switch to Elisp at
+the repl: `,language elisp'. All kudos to Daniel, and all bugs to
address@hidden
 
-** `lambda*' and `define*' are now available in the default environment
+** Faster SRFI-9 record access
 
-As with `case-lambda', `(ice-9 optargs)' continues to be supported, for
-compatibility purposes. No semantic change has been made (we hope).
-Optional and keyword arguments now dispatch via special VM operations,
-without the need to cons rest arguments, making them very fast.
+SRFI-9 records are now implemented directly on top of Guile's structs,
+and their accessors are defined in such a way that normal callsites
+inline to special VM opcodes, while still allowing for the general case
+(e.g. passing a record accessor to `apply').
 
-** Better support for Lisp `nil'.
+** Some VM metadata removed
 
-The bit representation of `nil' has been tweaked so that it is now very
-efficient to check e.g. if a value is equal to Scheme's end-of-list or
-Lisp's nil. Additionally there are a heap of new, specific predicates
-like scm_is_null_or_nil. Probably in the future we will #define
-scm_is_null to scm_is_null_or_nil.
+It used to be that the standard virtual machine counted the number of
+instructions it executed. This capability has been removed, as it was
+not very useful, and had some overhead. Also it used to try to record
+the time spent in the VM, but these calculations were borked, so we
+removed them too.
 
-** No future.
+** Inline memq/memv of a key in a constant list
 
-Actually the future is still in the state that it was, is, and ever
-shall be, Amen, except that `futures.c' and `futures.h' are no longer a
-part of it. These files were experimental, never compiled, and would be
-better implemented in Scheme anyway. In the future, that is.
+The impoverished Guile inliner is slightly less lame now that it does
+`(memv k '(foo))' => `(eq? k 'foo)'. 
 
-** Support for static allocation of strings, symbols, and subrs.
+** Rename "else" fields of <conditional> and <lambda-case>
 
-Calls to snarfing CPP macros like SCM_DEFINE macro will now allocate
-much of their associated data as static variables, reducing Guile's
-memory footprint.
+Having a field named "else" just didn't sit right with "cond", and
+everything else. So now Tree-IL's <conditional> has "consequent" and
+"alternate", and <lambda-case> has "alternate".
 
-** Inline vector allocation
+** Allow interrupts in tail loops
 
-Instead of having vectors point out into the heap for their data, their
-data is now allocated inline to the vector object itself. The same is
-true for bytevectors, by default, though there is an indirection
-available which should allow for making a bytevector from an existing
-memory region.
+Tail-recursive loops that compile to tight, procedure-less jumps
+previously were uninterruptible. Now the VM handle interrupts whenever
+it jumps backwards.
 
-** New syntax: include-from-path.
+** Tail patterns in syntax-case
 
-`include-from-path' is like `include', except it looks for its file in
-the load path. It can be used to compile other files into a file.
+Guile has pulled in some more recent changes from the psyntax portable
+syntax expander, to implement support for "tail patterns". Such patterns
+are supported by syntax-rules and syntax-case. This allows a syntax-case
+match clause to have ellipses, then a pattern at the end. For example:
 
-** New syntax: quasisyntax.
+  (define-syntax case
+    (syntax-rules (else)
+      ((_ val match-clause ... (else e e* ...))
+       [...])))
 
-`quasisyntax' is to `syntax' as `quasiquote' is to `quote'. See the R6RS
-documentation for more information. Thanks to Andre van Tonder for the
-implementation.
+Note how there is MATCH-CLAUSE, which is ellipsized, then there is a
+tail pattern for the else clause. Thanks to Andreas Rottmann for the
+patch, and Kent Dybvig for the code.
 
-** Cleanups to Guile's primitive object system.
+** New struct constructors that don't involve making lists
 
-There were a number of pieces in `objects.[ch]' that tried to be a
-minimal object system, but were never documented, and were quickly
-obseleted by GOOPS' merge into Guile proper. So `scm_make_class_object',
-`scm_make_subclass_object', `scm_metaclass_standard', and like symbols
-from objects.h are no more. In the very unlikely case in which these
-were useful to you, we urge you to contact guile-devel.
+`scm_c_make_struct' and `scm_c_make_structv' are new varargs and array
+constructors, respectively, for structs. You might find them useful.
 
-** GOOPS cleanups.
+** Procedures-with-setters are now implemented using applicable structs
 
-GOOPS had a number of concepts that were relevant to the days of Tcl,
-but not any more: operators and entities, mainly. These objects were
-never documented, and it is unlikely that they were ever used. Operators
-were a kind of generic specific to the Tcl support. Entities were
-applicable structures, but were unusable; entities will come back in the
-next alpha release, but with a less stupid name.
+From a user's perspective this doesn't mean very much. But if, for some
+odd reason, you used the SCM_PROCEDURE_WITH_SETTER_P, SCM_PROCEDURE, or
+SCM_SETTER macros, know that they're deprecated now. Also, scm_tc7_pws
+is gone.
 
-** Faster bit operations.
+** Bit twiddlings
 
-The bit-twiddling operations `ash', `logand', `logior', and `logxor' now
-have dedicated bytecodes. Guile is not just for symbolic computation,
-it's for number crunching too.
+*** smob to tc7
 
-** `inet-ntop' and `inet-pton' are always available.
+Fluids, dynamic states, and hash tables used to be SMOB objects, but now
+they have statically allocated typecodes.
 
-Guile now use a portable implementation of `inet_pton'/`inet_ntop', so
-there is no more need to use `inet-aton'/`inet-ntoa'. The latter
-functions are deprecated.
+*** Remove old evaluator closures
 
-** R6RS block comment support
+There used to be ranges of typecodes allocated to interpreted data
+structures, but that it no longer the case, given that interpreted
+procedure are now just regular VM closures. As a result, there is a
+newly free tc3, and a number of removed macros. See the ChangeLog for
+details.
 
-Guile now supports R6RS nested block comments. The start of a comment is
-marked with `#|', and the end with `|#'.
+*** Simplify representation of primitive procedures
 
-** `guile-2' cond-expand feature
+Remove scm_tc7_cxr, scm_tc7_rpsubr, scm_tc7_asubr, scm_tc7_dsubr.
+Remove scm_tc7_subr_* and scm_tc7_lsubr_*
 
-To test if your code is running under Guile 2.0 (or its alpha releases),
-test for the `guile-2' cond-expand feature. Like this:
+| |     implement transcendental sin, cos etc in c; deprecate $sin, $cos, etc
+| |     
+| |     * libguile/deprecated.h:
+| |     * libguile/deprecated.c (scm_asinh, scm_acosh, scm_atanh): Deprecate
+| |       these stand-ins for the C99 asinh, acosh, and atanh functions. Guile
+| |       is not gnulib.
+| |       (scm_sys_atan2): Deprecate as well, in favor of scm_atan.
+| |     
+| |     * libguile/numbers.h:
+| |     * libguile/numbers.c (scm_sin, scm_cos, scm_tan)
+| |       (scm_sinh, scm_cosh, scm_tanh)
+| |       (scm_asin, scm_acos, scm_atan)
+| |       (scm_sys_asinh, scm_sys_acosh, scm_sys_atanh): New functions,
+| |       replacing the combination of dsubrs and boot-9 wrappers with C subrs
+| |       that handle complex values. The latter three have _sys_ in their 
names
+| |       due to the name conflict with the deprecated scm_asinh et al.
+...
+| |       Remove the $abs, $sin etc "dsubrs".
+| | 
+| |     expt implemented in C, handles complex numbers
+| |     
+| |     * libguile/numbers.h:
+| |     * libguile/numbers.c (scm_expt): Rename from scm_sys_expt, and handle
+| |       the complex cases as well.
+| |     
+| |     * libguile/deprecated.h:
+| |     * libguile/deprecated.c (scm_sys_expt): Add a deprecated shim.
+| |     
+| |     * module/ice-9/boot-9.scm (expt): Remove definition, scm_expt does all
+| |       we need.
+| | 
 
-     (cond-expand (guile-2 (eval-when (compile)
-                             ;; This must be evaluated at compile time.
-                             (fluid-set! current-reader my-reader)))
-                  (guile
-                           ;; Earlier versions of Guile do not have a
-                           ;; separate compilation phase.
-                           (fluid-set! current-reader my-reader)))
+*** Preparations for changing SMOB representation
+
+If things go right, we'll be changing the SMOB representation soon. To
+that end, we did a lot of cleanups to calls to e.g. SCM_CELL_WORD_2(x) when
+the code meant SCM_SMOB_DATA_2(x); user code will need similar changes
+in the future. Code accessing SMOBs using SCM_CELL macros was never
+correct, but until now things still worked. Users should be aware of
+such changes.
+
+** Stack refactor
+
+It used to be that Guile had debugging frames on the C stack and on the
+VM stack. Now Guile's procedures only run on the VM stack, simplifying
+much of the C API. See the ChangeLog for details. The Scheme API has not
+been changed significantly.
+
+** define!
+
+a procedure to do a toplevel define
+
+** applicable struct support
 
-** ABI harmonization
+** eqv not a generic
 
-`scm_search_path' now has the signature it did in 1.8, reverting an
-incompatible change made in 1.9.0.
+** deprecate trampolines
 
-** Compile-time warnings: -Warity-mismatch
+| |       (scm_the_root_module): Undeprecate, it's actually a useful function,
+| |       that other parts of the code use.
 
-Guile can warn when you pass the wrong number of arguments to a
-procedure. Pass the -Warity-mismatch on the `guile-tools compile'
-command line, or add `#:warnings '(arity-mismatch)' to your `compile'
-or `compile-file' invocation.
+** deval/ceval distinction removed
+
+** --disable-discouraged builds cleanly.
+
+** new metatables: scm_standard_vtable_vtable,
+scm_applicable_struct_vtable_vtable, 
scm_applicable_struct_with_setter_vtable_vtable
+
+| |       (scm_init_struct): Define <applicable-struct-vtable>, a magical 
vtable
+| |       like CL's funcallable-standard-class. Also define
+| |       <applicable-struct-with-setter-vtable>.
+
+** hidden slots
+
+** better (?) intptr support
+
+| |     * libguile/__scm.h (SCM_T_UINTPTR_MAX, SCM_T_INTPTR_MIN,
+| |       SCM_T_INTPTR_MAX): New macros.
+| |     * libguile/_scm.h (SIZEOF_SCM_T_BITS): New macro.
+| |     * libguile/gen-scmconfig.c (main): Produce typedefs for `scm_t_intptr'
+| |       and `scm_t_uintptr'.
+| |     * libguile/gen-scmconfig.h.in (SCM_I_GSC_T_INTPTR, SCM_I_GSC_T_UINPTR):
+| |       New macros.
 
-** Guile is now built without `-Werror' by default
 
-Use the `--enable-error-on-warning' configure option to enable it.
 
 ** And of course, the usual collection of bugfixes
  
@@ -637,6 +691,13 @@ The binding in the default environment is equivalent to 
the one from the
 `(srfi srfi-16)' module. Use the srfi-16 module explicitly if you wish
 to maintain compatibility with Guile 1.8 and earlier.
 
+** Compiled procedures may now have more than one arity.
+
+This can be the case, for example, in case-lambda procedures. The
+arities of compiled procedures may be accessed via procedures from the
+`(system vm program)' module; see "Compiled Procedures", "Optional
+Arguments", and "Case-lambda" in the manual. 
+
 ** `lambda*' and `define*' are now available in the default environment
 
 As with `case-lambda', `(ice-9 optargs)' continues to be supported, for
@@ -772,6 +833,12 @@ Guile now use a portable implementation of 
`inet_pton'/`inet_ntop', so
 there is no more need to use `inet-aton'/`inet-ntoa'. The latter
 functions are deprecated.
 
+** Fast bit operations.
+
+The bit-twiddling operations `ash', `logand', `logior', and `logxor' now
+have dedicated bytecodes. Guile is not just for symbolic computation,
+it's for number crunching too.
+
 ** R6RS block comment support
 
 Guile now supports R6RS nested block comments. The start of a comment is
@@ -886,6 +953,14 @@ shall be, Amen, except that `futures.c' and `futures.h' 
are no longer a
 part of it. These files were experimental, never compiled, and would be
 better implemented in Scheme anyway. In the future, that is.
 
+** Better support for Lisp `nil'.
+
+The bit representation of `nil' has been tweaked so that it is now very
+efficient to check e.g. if a value is equal to Scheme's end-of-list or
+Lisp's nil. Additionally there are a heap of new, specific predicates
+like scm_is_null_or_nil. Probably in the future we will #define
+scm_is_null to scm_is_null_or_nil.
+
 ** Support for static allocation of strings, symbols, and subrs.
 
 Calls to snarfing CPP macros like SCM_DEFINE macro will now allocate
diff --git a/module/language/tree-il/inline.scm 
b/module/language/tree-il/inline.scm
index 517ff1b..fa1c1d5 100644
--- a/module/language/tree-il/inline.scm
+++ b/module/language/tree-il/inline.scm
@@ -77,20 +77,23 @@
             ((memq memv)
              (pmatch args
                ((,k ,l) (guard (const? l) (list? (const-exp l)))
-                (let lp ((elts (const-exp l)))
-                  (if (null? elts)
-                      (make-const #f #f)
-                      (make-conditional
-                       src
-                       (make-application
-                        #f
-                        (make-primitive-ref #f (case name
-                                                 ((memq) 'eq?)
-                                                 ((memv) 'eqv?)
-                                                 (else (error "what"))))
-                        (list k (make-const #f (car elts))))
-                       (make-const #f #t)
-                       (lp (cdr elts))))))
+                (if (null? (const-exp l))
+                    (make-const #f #f)
+                    (let lp ((elts (const-exp l)))
+                      (let ((test (make-application
+                                   #f
+                                   (make-primitive-ref #f (case name
+                                                            ((memq) 'eq?)
+                                                            ((memv) 'eqv?)
+                                                            (else (error 
"what"))))
+                                   (list k (make-const #f (car elts))))))
+                        (if (null? (cdr elts))
+                            test
+                            (make-conditional
+                             src
+                             test
+                             (make-const #f #t)
+                             (lp (cdr elts))))))))
 
                (else #f)))
 


hooks/post-receive
-- 
GNU Guile




reply via email to

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