mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
*** empty log message ***
This commit is contained in:
parent
29ff38c406
commit
2a52b4295e
4 changed files with 138 additions and 2 deletions
40
NEWS
40
NEWS
|
@ -60,6 +60,46 @@ in backtraces.
|
|||
|
||||
* Changes to Scheme functions and syntax
|
||||
|
||||
** Guile now correctly handles internal defines by rewriting them into
|
||||
their equivalent letrec. Previously, internal defines would
|
||||
incrementally add to the innermost environment, without checking
|
||||
whether the restrictions specified in RnRS were met. This lead to the
|
||||
correct behaviour when these restriction actually were met, but didn't
|
||||
catch all illegal uses. Such an illegal use could lead to crashes of
|
||||
the Guile interpreter or or other unwanted results. An example of
|
||||
incorrect internal defines that made Guile behave erratically:
|
||||
|
||||
(let ()
|
||||
(define a 1)
|
||||
(define (b) a)
|
||||
(define c (1+ (b)))
|
||||
(define d 3)
|
||||
|
||||
(b))
|
||||
|
||||
=> 2
|
||||
|
||||
The problem with this example is that the definition of `c' uses the
|
||||
value of `b' directly. This confuses the meoization machine of Guile
|
||||
so that the second call of `b' (this time in a larger environment that
|
||||
also contains bindings for `c' and `d') refers to the binding of `c'
|
||||
instead of `a'. You could also make Guile crash with a variation on
|
||||
this theme:
|
||||
|
||||
(define (foo flag)
|
||||
(define a 1)
|
||||
(define (b flag) (if flag a 1))
|
||||
(define c (1+ (b flag)))
|
||||
(define d 3)
|
||||
|
||||
(b #t))
|
||||
|
||||
(foo #f)
|
||||
(foo #t)
|
||||
|
||||
From now on, Guile will issue an `Unbound variable: b' error message
|
||||
for both examples.
|
||||
|
||||
** Hooks
|
||||
|
||||
A hook contains a list of functions which should be called on
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
1998-07-29 Marius Vollmer <mvo@zagadka.ping.de>
|
||||
|
||||
* guile-config.in (build-link): Correct non-RnRS usage of internal
|
||||
defines.
|
||||
|
||||
1999-04-17 Jim Blandy <jimb@savonarola.red-bean.com>
|
||||
|
||||
* Makefile.in: Regenerated.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
1999-07-29 Marius Vollmer <mvo@zagadka.ping.de>
|
||||
|
||||
* boot-9.scm (error-catching-loop): Correct non-RnRS usage of internal
|
||||
defines.
|
||||
|
||||
1999-07-19 Jim Blandy <jimb@savonarola.red-bean.com>
|
||||
|
||||
* streams.scm: New module, contributed by Michael Livshin.
|
||||
|
|
|
@ -1,13 +1,99 @@
|
|||
1999-07-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
|
||||
|
||||
* eval.c, tags.h, print.c (SCM_IM_SLOT_REF, SCM_IM_SLOT_SET_X):
|
||||
New isym operations.
|
||||
|
||||
* eval.h: Added prototypes for multi language support functions.
|
||||
|
||||
* eval.c (SCM_IM_DISPATCH, SCM_IM_HASH_DISPATCH): Don't use
|
||||
improper lists in the low-level representation, since that will
|
||||
cause a begin to be prepended at macro expansion.
|
||||
|
||||
* eval.c, tags.h, print.c (SCM_IM_SLOT_REF, SCM_IM_SLOT_SET_X):
|
||||
New isym operations.
|
||||
* eval.c (scm_cons_source): Version of cons which copies source
|
||||
properties from an existing cell.
|
||||
(scm_m_quote, scm_m_begin, scm_m_if, scm_m_set_x, scm_m_and,
|
||||
scm_m_or, scm_m_case, scm_m_cond, scm_m_lambda, scm_m_letstar,
|
||||
scm_m_do, scm_m_letrec, scm_m_let, scm_copy_tree): Use
|
||||
scm_cons_source.
|
||||
|
||||
* debug.c (scm_procedure_source): Cons SCM_IM_LAMBDA onto
|
||||
procedure source before calling scm_unmemocopy instead of faking
|
||||
an environment.
|
||||
|
||||
1998-10-25 Marius Vollmer <mvo@zagadka.ping.de>
|
||||
|
||||
Ported `internal defines' fix from SCM. Original ChangeLog entry:
|
||||
|
||||
1998-07-09 Radey Shouman <radey@colorage.com>
|
||||
|
||||
* eval.c (ceval_1): Modifications to allow rewriting of interal
|
||||
DEFINE to LETREC: If an ISYM is evaluated in non-tail position the
|
||||
body of which it is the CAR is macro expanded by m_expand_body,
|
||||
which rewrites internal DEFINE.
|
||||
|
||||
(m_expand_body): Added.
|
||||
|
||||
(m_macroexp1): Added argument to control error checking:
|
||||
m_expand_body may speculatively expand forms in the wrong
|
||||
environments. Made argument number checks conditional on
|
||||
RECKLESS.
|
||||
|
||||
(m_body): Added, error checks bodies and inserts the ISYM tokens.
|
||||
|
||||
(m_lambda): (m_letstar): (m_letrec1): (m_letrec): (m_let): Now
|
||||
call m_body.
|
||||
|
||||
(m_cond): (m_case): (m_quote): Modified to avoid destructively
|
||||
changing their argument forms. Since m_expand_body
|
||||
speculatively macro expands forms the process must be
|
||||
reversible.
|
||||
|
||||
(m_ident_eqp): Fixed to use proper environment.
|
||||
|
||||
(renamed_ident): Added DEFER_INTS_EGC.
|
||||
|
||||
Added prototypes for static functions.
|
||||
|
||||
* eval.c
|
||||
|
||||
(undef_cell): New.
|
||||
|
||||
(scm_lookupcar1, scm_lookupcar): Added CHECK argument. When CHECK
|
||||
is false, do not produce an error for unbound variables, return a
|
||||
pointer to cell_undef instead.
|
||||
|
||||
(EVALCELLCAR, XEVALCAR): Call scm_lookupcar with check=1.
|
||||
|
||||
(scm_m_body): New.
|
||||
|
||||
(scm_m_cond, scm_m_case, scm_m_quote): Modified to avoid
|
||||
destructively changing their argument forms. Since m_expand_body
|
||||
speculatively macro expands forms the process must be reversible.
|
||||
|
||||
(scm_m_lambda): Use scm_m_body instead of bodycheck. Account for
|
||||
SCM_IM_LET introduced by named lets.
|
||||
|
||||
(scm_m_letstar): Use scm_m_body instead of bodycheck.
|
||||
|
||||
(scm_m_letrec1, scm_letrec): Split scm_letrec into scm_letrec1 and
|
||||
scm_letrec. scm_letrec1 does not check for a null binding and
|
||||
takes an additional argument to specify the ISYM of the body. Use
|
||||
scm_m_body instead of bodycheck.
|
||||
|
||||
(scm_m_let): Use scm_m_body instead of bodycheck.
|
||||
|
||||
(scm_m_expand_body, scm_macroexp): New.
|
||||
|
||||
(unmemocopy): Account for ISYMs introduced by scm_m_body.
|
||||
|
||||
(ceval, deval): Call scm_m_expand_body. Call scm_lookupcar with
|
||||
check=1. Throw error for internal defined that have not been
|
||||
rewritten by scm_m_expand_body.
|
||||
|
||||
* eval.h: Added prototypes for scm_m_expand_body and scm_macroexp.
|
||||
Removed prototype for SCM_APPLY.
|
||||
|
||||
* tags.h: Added extern declaration of scm_isymnames.
|
||||
|
||||
1999-07-27 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue