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-13-185-g9


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-13-185-g998191f
Date: Sun, 12 Dec 2010 22:37:02 +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=998191fd4f4b82d7ee8f40ecdb4db4187864c33e

The branch, master has been updated
       via  998191fd4f4b82d7ee8f40ecdb4db4187864c33e (commit)
       via  a6b1b27aad9072945cfa1cde908325f506c015b9 (commit)
       via  ef6b0e8d483d862fdbd119ff235d2a52843cad1f (commit)
      from  ec3c7570d86bedfa52e4c3c0628dfe11b63f8d51 (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 998191fd4f4b82d7ee8f40ecdb4db4187864c33e
Author: Andy Wingo <address@hidden>
Date:   Sun Dec 12 23:33:33 2010 +0100

    fix testing code in web/server
    
    * module/web/server.scm (call-with-encoded-output-string): Fix some code
      I accidentally left in while testing. Re-tested the difference in
      speed; pleasantly surprised.
    
    * module/web/uri.scm: Make the same change here.

commit a6b1b27aad9072945cfa1cde908325f506c015b9
Author: Andy Wingo <address@hidden>
Date:   Sun Dec 12 23:13:08 2010 +0100

    foreign: c-struct parsing simplification
    
    * module/system/foreign.scm: Revert much of fb636a1cce. Short et al are
      not distinct types -- they are all aliases to e.g. int16. The only
      case that was not covered before was the pointer case.
      (bytevector-pointer-ref, bytevector-pointer-set!): Implement these,
      and use them for pointers.

commit ef6b0e8d483d862fdbd119ff235d2a52843cad1f
Author: Andy Wingo <address@hidden>
Date:   Sun Dec 12 22:45:47 2010 +0100

    1.9.13 news to main body
    
    * NEWS: Fold 1.9.13 text into the main text.

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

Summary of changes:
 NEWS                      |  211 ++++++++++++++++-----------------------------
 module/system/foreign.scm |  118 ++++---------------------
 module/web/server.scm     |    4 +-
 module/web/uri.scm        |    4 +-
 4 files changed, 94 insertions(+), 243 deletions(-)

diff --git a/NEWS b/NEWS
index c8c3091..df15396 100644
--- a/NEWS
+++ b/NEWS
@@ -16,142 +16,6 @@ The guile binary now supports a new switch "-x", which can 
be used to
 extend the list of filename extensions tried when loading files
 (%load-extensions).
 
-Changes in 1.9.13 (since the 1.9.12 prerelease):
-
-** SRFI support
-
-The following SRFIs have been added:
-
-- SRFI-27 "Sources of Random Bits"
-- SRFI-42 "Eager Comprehensions"
-- SRFI-45 "Primitives for Expressing Iterative Lazy Algorithms"
-- SRFI-67 "Compare Procedures"
-
-Thanks to Andreas Rottmann.
-
-** (system foreign) API changes
-
-The `make-foreign-function' procedure was renamed to
-`pointer->procedure'.
-    
-** (system xref) source database
-
-The `(system xref)' module can now map from source locations to
-procedures. See the `source-procedures' and `source-closures' functions.
-
-** New procedures: `scm_to_latin1_stringn', `scm_from_latin1_stringn'
-
-Use these procedures when you know you have latin1-encoded or
-ASCII-encoded strings.
-
-** New procedures: `scm_to_stringn', `scm_from_stringn'
-
-Use these procedures if you want to encode or decode from a particular
-locale.
-
-** Removed support shlibs for SRFIs 1, 4, 13, 14, and 60
-
-Though these SRFI support libraries did expose API, they encoded a
-strange version string into their library names.  That version was never
-programmatically exported, so there was no way people could use the
-libs.
-
-This was a fortunate oversight, as it allows us to remove the need for
-extra, needless shared libraries --- the C support code for SRFIs 4, 13,
-and 14 was already in core --- and allow us to incrementally return the
-SRFI implementation to Scheme.
-
-** Simplifications to the set of low-level hooks exported by the VM
-
-See "VM Hooks" in the manual, for more information.
-
-** New traps system
-
-See "Traps" in the manual, for more information.
-
-** Breakpoints, tracepoints and source stepping now available at the REPL
-    
-See "Interactive Debugging" in the manual, for more information.
-
-The new REPL commands are: break, break-at-source, tracepoint, traps,
-delete, disable, enable, step, step-instruction, next, next-instruction,
-finish, and registers.
-
-** Remove obsolete debug-options
-
-Removed `breakpoints', `trace', `procnames', `indent', `frames',
-`maxdepth', and `debug' debug-options.
-
-** Remove obsolete print-options
-    
-The `source' and `closure-hook' print options are obsolete, and have
-been removed.
-
-** Remove obsolete read-options
-
-The "elisp-strings" and "elisp-vectors" read options were unused and
-obsolete, so they have been removed.
-
-** Remove eval-options and trap-options
-
-Eval-options and trap-options are obsolete with the new VM and
-evaluator.
-
-** Remove (ice-9 debugger) and (ice-9 debugging)
-
-See "Traps" and "Interactive Debugging" in the manual, for information
-on their replacements.
-
-** Remove the GDS Emacs integration
-
-See "Using Guile in Emacs" in the manual, for info on how we think you
-should use Guile with Emacs.
-
-** Remove vm-version, vm options
-    
-These procedures introduced during the 1.9 series had no effect.
-
-** Add `call-with-vm' and ability to set VM engine
-
-`call-with-vm' applies a procedure to arguments in a context in which a
-given VM is current.
-
-`set-vm-engine!' can be used to specify the engine for a VM, which will
-become current at the next `call-with-vm' invocation.
-
-** Default to "regular" VM engine for noninteractive use
-    
-The "debug" engine is used when the user specifies --debug, or when
-running interactively. A debug VM allows hooks to run; see "VM Hooks" in
-the manual.
-
-** `backtrace' debug option on by default
-
-Given that Guile 2.0 can always give you a backtrace, backtraces are now
-on by default.
-
-** `turn-on-debugging' deprecated
-
-** New compilation warning: `-Wformat'
-    
-The `-Wformat' warning can indicate a number of common format string
-errors.  See "Compilation" in the manual, for more information.
-
-** Add `(system repl server)' module and `--listen' command-line argument
-    
-The `(system repl server)' module exposes procedures to listen on
-sockets for connections, and serve REPLs to those clients.  The --listen
-command-line argument allows any Guile program to thus be remotely
-debuggable.
-
-See "Invoking Guile" for more information on `--listen'.
-
-** Big manual updates
-
-The GOOPS documentation got a lot of attention this cycle, as well as
-the sections on interactive use and debugging.  We don't know of any
-sections of the manual that are out-of-date at this point.
-
 ** And of course, the usual collection of bugfixes
  
 Interested users should see the ChangeLog for more information.
@@ -163,6 +27,10 @@ Changes in 1.9.x (since the 1.8.x series):
 * New modules (see the manual for details)
 
 ** `(srfi srfi-18)', more sophisticated multithreading support
+** `(srfi srfi-27)', sources of random bits
+** `(srfi srfi-42)', eager comprehensions
+** `(srfi srfi-45)', primitives for expressing iterative lazy algorithms
+** `(srfi srfi-67)', compare procedures
 ** `(ice-9 i18n)', internationalization support
 ** `(rnrs bytevectors)', the R6RS bytevector API
 ** `(rnrs io ports)', a subset of the R6RS I/O port API
@@ -228,6 +96,15 @@ help when running Guile inside Emacs. This option has been 
removed, and
 the helper functions `named-module-use!' and `load-emacs-interface' have
 been deprecated.
     
+** Add `(system repl server)' module and `--listen' command-line argument
+    
+The `(system repl server)' module exposes procedures to listen on
+sockets for connections, and serve REPLs to those clients.  The --listen
+command-line argument allows any Guile program to thus be remotely
+debuggable.
+
+See "Invoking Guile" for more information on `--listen'.
+
 ** New reader options: `square-brackets' and `r6rs-hex-escapes'
 
 The reader supports a new option (changeable via `read-options'),
@@ -1152,7 +1029,8 @@ procedure, with -Warity-mismatch, or `arity-mismatch' in 
the
 `#:warnings' as above.
 
 Other warnings include `-Wunused-variable' and `-Wunused-toplevel', to
-warn about unused local or global (top-level) variables.
+warn about unused local or global (top-level) variables, and `-Wformat',
+to check for various errors related to the `format' procedure.
 
 ** A new `memoize-symbol' evaluator trap has been added.
 
@@ -1380,6 +1258,43 @@ This module had some debugging helpers that are no 
longer applicable to
 the current debugging model. Importing this module will produce a
 deprecation warning. Users should contact bug-guile for support.
 
+** Remove obsolete debug-options
+
+Removed `breakpoints', `trace', `procnames', `indent', `frames',
+`maxdepth', and `debug' debug-options.
+
+** `backtrace' debug option on by default
+
+Given that Guile 2.0 can always give you a backtrace, backtraces are now
+on by default.
+
+** `turn-on-debugging' deprecated
+
+** Remove obsolete print-options
+    
+The `source' and `closure-hook' print options are obsolete, and have
+been removed.
+
+** Remove obsolete read-options
+
+The "elisp-strings" and "elisp-vectors" read options were unused and
+obsolete, so they have been removed.
+
+** Remove eval-options and trap-options
+
+Eval-options and trap-options are obsolete with the new VM and
+evaluator.
+
+** Remove (ice-9 debugger) and (ice-9 debugging)
+
+See "Traps" and "Interactive Debugging" in the manual, for information
+on their replacements.
+
+** Remove the GDS Emacs integration
+
+See "Using Guile in Emacs" in the manual, for info on how we think you
+should use Guile with Emacs.
+
 ** Deprecated: `lazy-catch'
 
 `lazy-catch' was a form that captured the stack at the point of a
@@ -1411,6 +1326,16 @@ backward-compatible way.  A new allocation routine,
 Libgc is a conservative GC, which we hope will make interaction with C
 code easier and less error-prone.
 
+** New procedures: `scm_to_latin1_stringn', `scm_from_latin1_stringn'
+
+Use these procedures when you know you have latin1-encoded or
+ASCII-encoded strings.
+
+** New procedures: `scm_to_stringn', `scm_from_stringn'
+
+Use these procedures if you want to encode or decode from a particular
+locale.
+
 ** New type definitions for `scm_t_intptr' and friends.
 
 `SCM_T_UINTPTR_MAX', `SCM_T_INTPTR_MIN', `SCM_T_INTPTR_MAX',
@@ -1526,6 +1451,18 @@ The upshot is that the mechanics used to apply a SMOB 
are different from
 `apply_3' functions, and the macros SCM_SMOB_APPLY_0 and friends are now
 deprecated. Just use the scm_call_0 family of procedures.
 
+** Removed support shlibs for SRFIs 1, 4, 13, 14, and 60
+
+Though these SRFI support libraries did expose API, they encoded a
+strange version string into their library names.  That version was never
+programmatically exported, so there was no way people could use the
+libs.
+
+This was a fortunate oversight, as it allows us to remove the need for
+extra, needless shared libraries --- the C support code for SRFIs 4, 13,
+and 14 was already in core --- and allow us to incrementally return the
+SRFI implementation to Scheme.
+
 ** New C function: scm_module_public_interface
 
 This procedure corresponds to Scheme's `module-public-interface'.
diff --git a/module/system/foreign.scm b/module/system/foreign.scm
index 7f60317..b15577b 100644
--- a/module/system/foreign.scm
+++ b/module/system/foreign.scm
@@ -69,85 +69,21 @@
 ;;; Structures.
 ;;;
 
-(define-syntax compile-time-value
-  (syntax-rules ()
-    "Evaluate the given expression at compile time.  The expression must
-evaluate to a simple datum."
-    ((_ exp)
-     (let-syntax ((v (lambda (s)
-                       (let ((val exp))
-                         (syntax-case s ()
-                           (_ (datum->syntax s val)))))))
-       v))))
-
-(eval-when (eval compile load)
-  ;; The procedures below are used at compile time by the macros below.
-
-  (define (integer-ref type signed?)
-    (case (sizeof type)
-      ((8) (if signed?
-               'bytevector-s64-native-ref
-               'bytevector-u64-native-ref))
-      ((4) (if signed?
-               'bytevector-s32-native-ref
-               'bytevector-u32-native-ref))
-      ((2) (if signed?
-               'bytevector-s16-native-ref
-               'bytevector-u16-native-ref))
-      (else
-       (error "what machine is this?" type (sizeof type)))))
-
-  (define (integer-set type signed?)
-    (case (sizeof type)
-      ((8) (if signed?
-               'bytevector-s64-native-set!
-               'bytevector-u64-native-set!))
-      ((4) (if signed?
-               'bytevector-s32-native-set!
-               'bytevector-u32-native-set!))
-      ((2) (if signed?
-               'bytevector-s16-native-set!
-               'bytevector-u16-native-set!))
-      (else
-       (error "what machine is this?" type (sizeof type))))))
-
-(define-syntax define-integer-reader
-  (syntax-rules ()
-    ((_ name type signed?)
-     (letrec-syntax ((ref (identifier-syntax
-                           (compile-time-value
-                            (integer-ref type signed?)))))
-       (define name ref)))))
-
-(define-syntax define-integer-writer
-  (syntax-rules ()
-    ((_ name type signed?)
-     (letrec-syntax ((set (identifier-syntax
-                           (compile-time-value
-                            (integer-set type signed?)))))
-       (define name set)))))
-
-
-(define-integer-reader %read-short short #t)
-(define-integer-reader %read-int int #t)
-(define-integer-reader %read-long long #t)
-(define-integer-writer %write-short! short #t)
-(define-integer-writer %write-int! int #t)
-(define-integer-writer %write-long! long #t)
-
-(define-integer-reader %read-unsigned-short unsigned-short #f)
-(define-integer-reader %read-unsigned-int unsigned-int #f)
-(define-integer-reader %read-unsigned-long unsigned-long #f)
-(define-integer-writer %write-unsigned-short! unsigned-short #f)
-(define-integer-writer %write-unsigned-int! unsigned-int #f)
-(define-integer-writer %write-unsigned-long! unsigned-long #f)
-
-(define-integer-reader %read-size_t size_t #f)
-(define-integer-writer %write-size_t! size_t #f)
-
-(define-integer-reader %read-pointer '* #f)
-(define-integer-writer %write-pointer! '* #f)
-
+(define bytevector-pointer-ref
+  (case (sizeof '*)
+    ((8) (lambda (bv offset)
+           (make-pointer (bytevector-u64-native-ref bv offset))))
+    ((4) (lambda (bv offset)
+           (make-pointer (bytevector-u32-native-ref bv offset))))
+    (else (error "what machine is this?"))))
+
+(define bytevector-pointer-set!
+  (case (sizeof '*)
+    ((8) (lambda (bv offset ptr)
+           (bytevector-u64-native-set! bv offset (pointer-address ptr))))
+    ((4) (lambda (bv offset ptr)
+           (bytevector-u32-native-set! bv offset (pointer-address ptr))))
+    (else (error "what machine is this?"))))
 
 (define *writers*
   `((,float . ,bytevector-ieee-single-native-set!)
@@ -160,18 +96,7 @@ evaluate to a simple datum."
     (,uint32 . ,bytevector-u32-native-set!)
     (,int64 . ,bytevector-s64-native-set!)
     (,uint64 . ,bytevector-u64-native-set!)
-
-    (,short         . ,%write-short!)
-    (,unsigned-short . ,%write-unsigned-short!)
-    (,int           . ,%write-int!)
-    (,unsigned-int  . ,%write-unsigned-int!)
-    (,long          . ,%write-long!)
-    (,unsigned-long . ,%write-unsigned-long!)
-    (,size_t        . ,%write-size_t!)
-
-    (*              . ,(lambda (bv offset ptr)
-                         (%write-pointer! bv offset
-                                          (pointer-address ptr))))))
+    (* . ,bytevector-pointer-set!)))
 
 (define *readers*
   `((,float . ,bytevector-ieee-single-native-ref)
@@ -184,17 +109,8 @@ evaluate to a simple datum."
     (,uint32 . ,bytevector-u32-native-ref)
     (,int64 . ,bytevector-s64-native-ref)
     (,uint64 . ,bytevector-u64-native-ref)
+    (* . ,bytevector-pointer-ref)))
 
-    (,short         . ,%read-short)
-    (,unsigned-short . ,%read-unsigned-short)
-    (,int           . ,%read-int)
-    (,unsigned-int  . ,%read-unsigned-int)
-    (,long          . ,%read-long)
-    (,unsigned-long . ,%read-unsigned-long)
-    (,size_t        . ,%read-size_t)
-
-    (*              . ,(lambda (bv offset)
-                         (make-pointer (%read-pointer bv offset))))))
 
 (define (align off alignment)
   (1+ (logior (1- off) (1- alignment))))
diff --git a/module/web/server.scm b/module/web/server.scm
index 3d7c411..6d3d941 100644
--- a/module/web/server.scm
+++ b/module/web/server.scm
@@ -152,9 +152,9 @@
      (values #f #f #f))))
 
 (define (call-with-encoded-output-string charset proc)
-  (if (and (string-ci=? charset "utf-8") #f)
+  (if (string-ci=? charset "utf-8")
       ;; I don't know why, but this appears to be faster; at least for
-      ;; examples/debug-sxml.scm (650 reqs/s versus 510 reqs/s).
+      ;; examples/debug-sxml.scm (1464 reqs/s versus 850 reqs/s).
       (string->utf8 (call-with-output-string proc))
       (call-with-values
           (lambda ()
diff --git a/module/web/uri.scm b/module/web/uri.scm
index 86b93d5..7a82f0f 100644
--- a/module/web/uri.scm
+++ b/module/web/uri.scm
@@ -218,9 +218,7 @@
 
 
 (define (call-with-encoded-output-string charset proc)
-  (if (and (string-ci=? charset "utf-8") #f)
-      ;; I don't know why, but this appears to be faster; at least for
-      ;; examples/debug-sxml.scm (650 reqs/s versus 510 reqs/s).
+  (if (string-ci=? charset "utf-8")
       (string->utf8 (call-with-output-string proc))
       (call-with-values
           (lambda ()


hooks/post-receive
-- 
GNU Guile



reply via email to

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