Opened 6 years ago

Closed 6 years ago

#10103 closed enhancement (fixed)

guile-2.2.3

Reported by: bdubbs@… Owned by: bdubbs@…
Priority: normal Milestone: 8.2
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

New point version.

Change History (3)

comment:1 by bdubbs@…, 6 years ago

Owner: changed from blfs-book@… to bdubbs@…
Status: newassigned

comment:2 by bdubbs@…, 6 years ago

Changes in 2.2.3 (since 2.2.2):

  • New interfaces and functionality

(web uri) module has better support for RFC 3986

The URI standard, RFC 3986, defines additional "relative-ref" and "URI-reference" data types. Thanks to Daniel Hartwig, Guile's support for these URI subtypes has been improved. See "Universal Resource Identifiers" in the manual, for more.

struct-ref/unboxed and struct-set!/unboxed

These procedures should be used when accessing struct fields with type `u' (unboxed). See "Structure Basics" in the manual, for full details.

Improved support for arrays with non-zero lower bounds

Thanks to work by Daniel Llorens, Guile no longer exhibits buggy behavior in "sort" or "sort!" on arrays with non-zero lower dimension bounds. Arrays with non-zero lower dimension bounds are now allowed for array-slice-for-each, and truncated-print now supports bitvectors and arrays with non-zero lower bounds. General arrays are now supported as well for random:hollow-sphere!.

Add uintptr_t and intptr_t to FFI types.

See "Foreign Types" in the manual for full details.

  • Compiler improvements

Improve speed of compiler backend for functions without loops

This is a marginal speed improvement, especially for code compiled with optimization level "-O1" or below.

Disable slot pre-coloring for optimization level "-O1" or below

This improves the speed of the compiler backend.

Improve complexity of constant subexpression elimination pass

This is a large speed improvement when compiling large files with the default "-O2" pass.

CPS conversion avoids generating return arity adapters if possible

In Guile, the expression in (define a EXP) may return 1 or more values. This value elision in "value" context is implicit earlier in the Guile compiler, in Tree-IL, but is made explicit in the CPS middle-end language by the addition of the equivalent of explicit call-with-values continuations that ignore additional values. However in many cases we can avoid generating these extra continuations if we know that EXP is single-valued, as is the case for example for constants or variable references or the like.

Although these "arity-adapting continuations" would be removed by dead code elimination at optimization level "-O2" or above, they were still being needlessly generated in the first place. Guile now avoids generating them, speeding up not only the optimizer at -O2 but also the entire compiler pipeline at -O1 or below, as well as improving the residual code at -O1 or below.

Using uri? as a predicate on relative-refs deprecated

If you don't care whether the URI is a relative-ref or not, use uri-reference?. If you do, use uri-reference? and relative-ref?. In the future uri? will return a true value only for URIs that specify a scheme.

Struct tail arrays deprecated

Guile's structures used to have a facility whereby each instance of a vtable can contain a variable-length tail array of values. The length of the tail array was stored in the structure. This facility was originally intended to allow C code to expose raw C structures with word-sized tail arrays to Scheme.

However, the tail array facility was confusing and doesn't work very well. It was very rarely used, but it insinuates itself into all invocations of make-struct. For this reason the clumsily-named `make-struct/no-tail' procedure can actually be more elegant in actual use, because it doesn't have a random `0' argument stuck in the middle.

Tail arrays also inhibit optimization by allowing instances to affect their shapes. In the absence of tail arrays, all instances of a given vtable have the same number and kinds of fields. This uniformity can be exploited by the runtime and the optimizer. The presence of tail arrays make some of these optimizations more difficult.

Finally, the tail array facility is ad-hoc and does not compose with the rest of Guile. If a Guile user wants an array with user-specified length, it's best to use a vector. It is more clear in the code, and the standard optimization techniques will do a good job with it.

For all of these reasons, tail arrays are deprecated in Guile 2.2 and will be removed from Guile 3.0. Likewise, make-struct / scm_make_struct is deprecated in favor of make-struct/no-tail / scm_make_struct_no_tail. Perhaps one day we will be able to reclaim the make-struct name!

Struct "self" slots deprecated

It used to be that you could make a structure vtable that had "self" slots. Instances of that vtable would have those slots initialized to the instance itself. This can be useful in C code where you might have a pointer to the data array, and want to get the `SCM' handle for the structure. However this was a little used complication without any use in Scheme code. To replace it, just use "p" slots and initialize the slot values manually on initialization.

Struct fields with opaque ("o") protection deprecated

Struct fields are declared with a "protection", meaning read-only ('r'), read-write ('w'), or opaque ('o'). There is also "hidden" ('h') which is read-write but which isn't initialized by arguments passed to make-struct/no-tail, but that's a detail. Opaque struct fields were used to allocate storage in a struct that could only be accessed by C. This facility was very rarely used (unused in Guile itself) but now that we are implementing more and more in Scheme, it is completely useless.

To enforce permissions on struct fields, instead layer on an abstraction at a higher level, in the same way that immutable record fields are simply those which don't have an accessor.

Using struct-ref and struct-set! on unboxed fields is deprecated

Use the new struct-ref/unboxed and struct-set!/unboxed instead.

  • Bug fixes

guile.m4 now checks for Guile 2.2 by default

Before, it was still preferring Guile 2.0. It now also supports the Guile 3.0 prereleases.

Fix setting breakpoints from the REPL

Allow GDB support to be used with GDB linked against Guile 2.0.

Fix deadlock in `readdir' on error.

Fix crash on ia64 during thread switches.

Fix bug inferring range of `logand' computations with negative numbers

Fix bug when issuing HTTP requests through proxies.

Refactor weak hash table implementation to be more robust

Guile 2.2's weak hash table implementation had three big problems. The first was a bug causing these tables to leak memory when they would be resized. The second was that the implementation was designed so that tables should be visited by the mark phase of the garbage collector in one big piece. This could cause the garbage collector to see too many newly marked objects at once, causing inefficies in garbage collection. Finally, the way in which lost weak references were ultimately removed from weak tables caused a race between the finalizer threads and the mutator threads, leading to unbounded excess space retention in pathological cases. All of this problems have been fixed.

Allow garbage collection of revealed file ports

Guile can mark a file port as "revealed" if Scheme has been given access to the file descriptor. In that case, the file descriptor will not be closed when the port is garbage-collected. However we had a bug that for revealed ports prevented the port from ever being garbage-collected, leading to memory leaks of Guile's internal port buffers. This is now fixed.

Fix put-bytevector, unget-bytevector with start == bytevector length

Enable GNU Readline 7.0's support for "bracketed paste".

Before, when pasting an expression that contained TAB characters into Guile's REPL with GNU Readline support enabled, the pasted TAB characters would trigger autocompletion in Readline. This was never what you wanted. Guile now sets the new "bracketed-paste" option in GNU Readline 7.0 to on by default, making readline treat pastes into the terminal as atomic units without control characters. See "Readline Options" in the manual for full details.

Fix time-monotonic from SRFI-19; broken in 2.2.1.

comment:3 by bdubbs@…, 6 years ago

Resolution: fixed
Status: assignedclosed

Fixed at revision 19574.

Note: See TracTickets for help on using tickets.