mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 21:10:27 +02:00
* print.c (scm_iprin1): Don't print arguments of macro
transformers. (They are always: exp env.); Bugfix: Unmemoize transformer source with correct environment.
This commit is contained in:
parent
20cb8b8c4f
commit
ba031394ec
2 changed files with 28 additions and 13 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Thu Oct 2 19:33:38 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
|
||||||
|
|
||||||
|
* print.c (scm_iprin1): Don't print arguments of macro
|
||||||
|
transformers. (They are always: exp env.); Bugfix: Unmemoize
|
||||||
|
transformer source with correct environment.
|
||||||
|
|
||||||
1997-10-02 Marius Vollmer <mvo@zagadka.ping.de>
|
1997-10-02 Marius Vollmer <mvo@zagadka.ping.de>
|
||||||
|
|
||||||
Streamlining of call-with-dynamic-root:
|
Streamlining of call-with-dynamic-root:
|
||||||
|
|
|
@ -348,7 +348,7 @@ taloop:
|
||||||
|| SCM_FALSEP (scm_printer_apply (SCM_PRINT_CLOSURE,
|
|| SCM_FALSEP (scm_printer_apply (SCM_PRINT_CLOSURE,
|
||||||
exp, port, pstate)));
|
exp, port, pstate)));
|
||||||
{
|
{
|
||||||
SCM name, code;
|
SCM name, code, env;
|
||||||
if (SCM_TYP16 (exp) == scm_tc16_macro)
|
if (SCM_TYP16 (exp) == scm_tc16_macro)
|
||||||
{
|
{
|
||||||
/* Printing a macro. */
|
/* Printing a macro. */
|
||||||
|
@ -363,6 +363,7 @@ taloop:
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
code = SCM_CODE (SCM_CDR (exp));
|
code = SCM_CODE (SCM_CDR (exp));
|
||||||
|
env = SCM_ENV (SCM_CDR (exp));
|
||||||
scm_gen_puts (scm_regular_string, "#<", port);
|
scm_gen_puts (scm_regular_string, "#<", port);
|
||||||
}
|
}
|
||||||
if (SCM_CAR (exp) & (3L << 16))
|
if (SCM_CAR (exp) & (3L << 16))
|
||||||
|
@ -377,6 +378,7 @@ taloop:
|
||||||
/* Printing a closure. */
|
/* Printing a closure. */
|
||||||
name = scm_procedure_name (exp);
|
name = scm_procedure_name (exp);
|
||||||
code = SCM_CODE (exp);
|
code = SCM_CODE (exp);
|
||||||
|
env = SCM_ENV (exp);
|
||||||
scm_gen_puts (scm_regular_string, "#<procedure",
|
scm_gen_puts (scm_regular_string, "#<procedure",
|
||||||
port);
|
port);
|
||||||
}
|
}
|
||||||
|
@ -387,18 +389,25 @@ taloop:
|
||||||
}
|
}
|
||||||
if (code)
|
if (code)
|
||||||
{
|
{
|
||||||
scm_gen_putc (' ', port);
|
if (SCM_PRINT_SOURCE_P)
|
||||||
scm_iprin1 (SCM_CAR (code), port, pstate);
|
{
|
||||||
}
|
code = scm_unmemocopy (code,
|
||||||
if (code && SCM_PRINT_SOURCE_P)
|
SCM_EXTEND_ENV (SCM_CAR (code),
|
||||||
{
|
SCM_EOL,
|
||||||
code = scm_unmemocopy (SCM_CDR (code),
|
env));
|
||||||
SCM_EXTEND_ENV (SCM_CAR (code),
|
ENTER_NESTED_DATA (pstate, exp, circref);
|
||||||
SCM_EOL,
|
scm_iprlist (" ", code, '>', port, pstate);
|
||||||
SCM_ENV (exp)));
|
EXIT_NESTED_DATA (pstate);
|
||||||
ENTER_NESTED_DATA (pstate, exp, circref);
|
}
|
||||||
scm_iprlist (" ", code, '>', port, pstate);
|
else
|
||||||
EXIT_NESTED_DATA (pstate);
|
{
|
||||||
|
if (SCM_TYP16 (exp) != scm_tc16_macro)
|
||||||
|
{
|
||||||
|
scm_gen_putc (' ', port);
|
||||||
|
scm_iprin1 (SCM_CAR (code), port, pstate);
|
||||||
|
}
|
||||||
|
scm_gen_putc ('>', port);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
scm_gen_putc ('>', port);
|
scm_gen_putc ('>', port);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue