1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

588 commits

Author SHA1 Message Date
Rob Browning
2272114093 * eval.c: fix various preprocessor usages of new public
symbols to expect 0 or 1 values rather than 1 or undefined.
i.e. change #ifdef to #if, etc.
2003-03-27 20:06:59 +00:00
Rob Browning
3d05f2e0fb * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
"libguile/__scm.h" rather than scmconfig.h.  Rename usage of
HAVE_ARRAYS to SCM_HAVE_ARRAYS.  Replace usage of HAVE_LONG_LONGS
with "SCM_SIZEOF_LONG_LONG != 0".
2003-03-25 23:54:28 +00:00
Mikael Djurfeldt
4b612c5be7 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
Fixed formals tests for closures.  (Thanks to Kevin Ryde.)
2003-02-10 12:39:11 +00:00
Mikael Djurfeldt
756414cf2c * threads.h, threads.c: Moved futures to their own file.
* Makefile.am (libguile_la_SOURCES): Added futures.c.
(DOT_X_FILES): Added futures.x.
(DOT_DOC_FILES): Added futures.doc.
(modinclude_HEADERS): Added futures.h.

* threads.c, threads.h (scm_i_create_thread): Renamed from
create_thread and made global.

* eval.c: #include "libguile/futures.h".

* init.c: #include "futures.h"
(scm_init_guile_1): Call scm_init_futures.

* stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.

* stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.

* eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
functions.

* eval.c (scm_trampoline_1): Fixed arguments test for closures.
2003-01-23 16:04:37 +00:00
Mikael Djurfeldt
ebf9b47c8b * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future. 2002-12-29 09:54:26 +00:00
Mikael Djurfeldt
9ed246339f * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
(scm_trampoline_1, scm_trampoline_2): Use them.
2002-12-19 07:49:15 +00:00
Mikael Djurfeldt
28d52ebb19 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
Simply lock a thread C API recursive mutex.
(SCM_NONREC_CRITICAL_SECTION_START,
SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
SCM_REC_CRITICAL_SECTION_END): Removed.

* eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
direct calls to scm_rec_mutex_lock / unlock around the three calls
to scm_m_expand_body.

* eval.c, eval.h (promise_free): New function.
(scm_force): Rewritten;  Now thread-safe; Removed
SCM_DEFER/ALLOW_INTS.

* pthread-threads.h: Added partially implemented plugin interface
for recursive mutexes.  These are, for now, only intended to be
used internally within the Guile implementation.

* pthread-threads.c: New file.

* threads.c: Conditionally #include "pthread-threads.c".

* eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
thread-safe;

* snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
SCM_GLOBAL_REC_MUTEX): New macros.

* eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
macros---use mutexes instead.

* tags.h (SCM_IM_FUTURE): New tag.

* eval.c (scm_m_future): New primitive macro.
(SCM_CEVAL): Support futures.
(unmemocopy): Support unmemoization of futures.

* print.c (scm_isymnames): Name of future isym.
2002-12-15 14:24:34 +00:00
Mikael Djurfeldt
9bc4701cd3 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
(SCM_NONREC_CRITICAL_SECTION_START,
SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
SCM_REC_CRITICAL_SECTION_END): New macros.
(SCM_CRITICAL_SECTION_START/END): Defined here.

* eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
the three calls to scm_m_expand_body.

* gc.h: #include "libguile/pthread-threads.h";
(SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.

* gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
scm_t_key;

* gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
access.

* gc-freelist.c (scm_gc_init_freelist): Create freelist keys.

* gc-freelist.c, threads.c (really_launch): Use
SCM_FREELIST_CREATE.

* gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):

* gc.c (scm_i_expensive_validation_check, scm_gc,
scm_gc_for_newcell): Put threads to sleep before doing GC-related
heap administration so that those pieces of code are executed
single-threaded.  We might consider rewriting these code sections
in terms of a "call_gc_code_singly_threaded" construct instead of
calling the pair of scm_i_thread_put_to_sleep () and
scm_i_thread_wake_up ().  Also, we would want to have as many of
these sections eleminated.

* init.c (scm_init_guile_1): Call scm_threads_prehistory.

* inline.h: #include "libguile/threads.h"

* pthread-threads.h: Macros now conform more closely to the
pthreads interface.  Some of them now take a second argument.

* threads.c, threads.h: Many changes.

* configure.in: Temporarily replaced "copt" threads option with new
option "pthreads".
(USE_PTHREAD_THREADS): Define if pthreads configured.
2002-12-09 13:42:58 +00:00
Mikael Djurfeldt
504d99c5f8 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
* eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.

* eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
(map, for-each): Handle also application on two args as a special
case; Use trampolines.

* sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
(subr2oless): Removed.
(scm_restricted_vector_sort_x): Use scm_return_first to keep the
vector GC protected.

* eval.c (check_map_args): Use scm_out_of_range_pos instead of
scm_out_of_range.
2002-12-01 13:09:26 +00:00
Marius Vollmer
3d7f708f21 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
SCM_DEBUG_DEPRECATED.  Removed their use thru-out Guile.
2002-11-03 22:09:20 +00:00
Han-Wen Nienhuys
34d19ef643 2002-07-20 Han-Wen <hanwen@cs.uu.nl>
* *.c: add space after commas everywhere.

* *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
Document cases where SCM_WRITABLE_VELTS() is used.

* vectors.h (SCM_VELTS): prepare for write barrier, and let
SCM_VELTS() return a const pointer
(SCM_VECTOR_SET): add macro.

* autogen.sh (mscripts): find and check version number of
autoconf. Complain if 2.53 is not found.
2002-07-20 14:08:34 +00:00
Dirk Herrmann
3063e30a6d * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
Deprecated the special kind of built-in dynamic syntax transformer
that was inaccurately named "macro".  Note:  The built-in syntax
transformers that are named "mmacro" or "memoizing-macro" still
exist, and it is these which come much closer to what one would
call a macro.
2002-07-15 20:39:53 +00:00
Neil Jerram
4c5f8e8fe0 Fix for 1001-local-eval-error-backtrace-segfaults. 2002-07-14 15:43:24 +00:00
Dirk Herrmann
bd987b8eda * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
SCM_CEVAL):  Removed compile time option SCM_CAUTIOUS to clean up
the code.  Full number of arguments checking of closures is
mandatory now.  However, the option to disable the checking has
most probably not been used anyway.
2002-06-30 22:40:01 +00:00
Dirk Herrmann
8505e285ec * backtrace.c (SCM_ASSERT), debug.c (scm_debug_options), eval.c
(scm_lookupcar, scm_lookupcar1, scm_badargsp, SCM_CEVAL,
SCM_APPLY, scm_map, scm_for_each), feature.c (scm_init_feature),
gsubr.c (scm_gsubr_apply), numbers.c (scm_logand, scm_logior,
scm_logxor, scm_i_dbl2big), srcprop.c (scm_source_properties,
scm_set_source_properties_x, scm_source_property):  Removed
compile time option SCM_RECKLESS to clean up the code.  Full
number of arguments checking of closures is mandatory now.
However, the option to disable the checking has most probably not
been used anyway.

* srcprop.c (scm_source_properties, scm_set_source_properties_x,
scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
2002-06-30 22:03:43 +00:00
Dirk Herrmann
c136c9205e * __scm.h, eval.c, eval.h: Removed compile time option
MEMOIZE_LOCALS to clean up the code.  Now, caching of local
variable positions during memoization is mandatory.  However, the
option to disable the caching has most probably not been used
anyway.
2002-06-28 22:40:08 +00:00
Dirk Herrmann
bc76d62865 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
function, replaces macro SRCBRKP.

(SRCBRKP):  Deprecated.

* eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
scm_c_source_property_breakpoint_p.  Removed some use of arg1 as
temporary variable.
2002-03-26 00:19:04 +00:00
Dirk Herrmann
5132eef0cf * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
CHECK_EXIT and removed all references to them.
2002-03-25 23:45:02 +00:00
Dirk Herrmann
680516ba5f * debug.h (scm_ready_p, debug_print): Removed declarations.
* eval.c (EVALCELLCAR): Removed.

(SCM_CEVAL): Eliminated label loopnoap.  Removed side-effecting
operation from condition.
2002-03-24 22:19:46 +00:00
Dirk Herrmann
ab1f10940c * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
and the corresponding goto statements.  Removed redundant code.
2002-03-23 00:39:25 +00:00
Dirk Herrmann
42030fb275 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
Eliminated redundant SCM_IMP check.  Exlined call to EVALCAR.
Re-enabled handing of rpsubrs and asubrs.
2002-03-21 00:36:03 +00:00
Dirk Herrmann
e050d4f824 * eval.c (SIDEVAL): Removed.
(SCM_CEVAL): Minimized scope of variable orig_sym.  Eliminated
goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap.  Changed
argument checking order for set! to locals, variables and symbols.
Improvements to control structure.  Removed some uses of arg1 and
arg2 as temporary variables.
2002-03-20 23:53:13 +00:00
Neil Jerram
3939e9df35 Change 3 instances of @var to @code in docstrings. 2002-03-15 09:40:57 +00:00
Dirk Herrmann
dff9830622 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
* eval.c (SCM_CEVAL): Exlined call to EVALCAR.
2002-03-14 06:45:56 +00:00
Thien-Thi Nguyen
a6b844c224 Retire inclusion guard macro SCM_MAGIC_SNARFER. 2002-03-14 03:47:43 +00:00
Dirk Herrmann
b7798e1067 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
The next step will be to remove the union 't' and simplify the
code of SCM_CEVAL that way.
2002-03-13 21:53:46 +00:00
Dirk Herrmann
1d15ecd303 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
'slot-set!' and 'nil-cond'.  Removed some uses of t.arg1, arg2 and
proc as temporary variables.  Introduced temporary variables with
hopefully descriptive names for clarification.  Replaced SCM_N?IMP
by a more explicit predicate in some places.
2002-03-10 07:53:27 +00:00
Dirk Herrmann
f12745b633 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
Added lots of comments regarding the implementation of #@dispatch.
Changed intra-procedure communication to use t.arg1 instead of
arg2.  Removed some uses of t.arg1, t.lloc and proc as temporary
variables.  Introduced temporary variables with hopefully
descriptive names for clarification.  Replaced SCM_N?IMP by a more
explicit predicate in some places.  Use SCM_INSTANCE_HASH instead
of computing the expression explicitly.  Eliminate now unused
label nontoplevel_cdrxbegin.

* goops.h (SCM_INSTANCE_HASH): New macro.

* objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
2002-03-09 20:15:16 +00:00
Neil Jerram
020c890ccc * Fix bug caused by frame size overflowing its field. 2002-03-08 13:07:50 +00:00
Dirk Herrmann
3f04400dd2 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
side-effecting operations from conditions and macro calls.
Replaced SCM_N?IMP by a more explicit predicate in some places.
Minimized the scope of some variables.
2002-03-05 21:10:15 +00:00
Dirk Herrmann
38ace99eb3 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
as temporary variables.  Removed side-effecting operations from
conditions and macro calls.  Introduced temporary variables with
hopefully descriptive names for clarification.  Replaced SCM_N?IMP
by a more explicit predicate in some places.  Removed code that
was conditionally compiled if SICP was defined - which it never
is.
2002-03-02 12:47:45 +00:00
Dirk Herrmann
e5cb71a0a9 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
Removed some uses of t.arg1 and proc as temporary variables.
Removed side-effecting operations from conditions and macro calls.
Introduced temporary variables with hopefully descriptive names
for clarification.  Replaced SCM_N?IMP by a more explicit
predicate in some places.
2002-03-02 11:50:01 +00:00
Dirk Herrmann
6a0f6ff30c * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
explicit predicate in some places.

(CHECK_EQVISH): Removed.

(SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
variables.  Removed side-effecting operations from conditions and
macro calls.  Introduced temporary variables for clarification.
Sorted if-else-if check for the type of the last form in a list by
frequency.  Avoided some unnecessary tail-recursion calls.
2002-03-02 09:53:51 +00:00
Dirk Herrmann
228a24ef30 Changes in doc/ref:
* api.txt, data-rep.texi: Renamed the struct scm_cell to
scm_t_cell.

* data-rep.texi: Renamed scm_alloc_cell to scm_cell and
scm_alloc_double_cell to scm_double_cell.

Changes in libguile:

* gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP):  Renamed the struct
scm_cell and all its uses to scm_t_cell in accordance to Guile's
naming scheme for types.

* alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
(scm_make_environment), eval.c (scm_closure), fports.c
(scm_fdes_to_port), gc.c (scm_deprecated_newcell,
scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
(scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
unif.c (scm_make_uve), variable.c (make_variable), vectors.c
(scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
scm_alloc_cell to scm_cell.

* environments.c (core_environments_observe), gc.c
(scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
(FLOAT2NUM), numbers.c (scm_make_real), procs.c
(scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
(allocate_weak_vector): Renamed scm_alloc_double_cell to
scm_double_cell.
2002-03-01 00:19:20 +00:00
Neil Jerram
c96d76b88d * First batch of libguile changes for Elisp support.
* Fixed a few typos.
* Minor rationalization of macros relating to source breakpoints.
2002-01-22 23:31:39 +00:00
Dirk Herrmann
a392ee1556 * eval.c: Removed outdated references to "everr". Improved some
comments.

(scm_deval_args, deval_args):  Renamed scm_deval_args to
deval_args, since it is not part of the interface.

(SCM_CEVAL):  Added (maybe somewhat verbose) comment.  Avoid to
use references to debug.vect[0] before it exists.  Add parentheses
to switch statement.

* goops.h:  Added local emacs variables.
2002-01-10 21:57:03 +00:00
Dirk Herrmann
2493378052 * eval.[ch] (scm_deval_args): Made static.
* srcprop.c (scm_source_property):  Remove redundant SCM_IMP
test.

* strings.c (scm_c_string2str):  Clarified comment.  Replaced
THINKME by FIXME for uniformness.  Removed question about whether
arguments need to be protected from garbage collection:  Arguments
must be protected as any other variable.
2002-01-10 21:11:22 +00:00
Dirk Herrmann
f9450cdb14 * procs.h (SCM_CLOSURE_BODY): New Macro.
* debug.c (scm_procedure_name, scm_procedure_source), eval.c
(SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
get_slot_value, set_slot_value), procs.c
(scm_procedure_documentation), sort.c (closureless), stacks.c
(get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
SCM_CLOSURE_BODY.

* sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
2002-01-10 20:52:45 +00:00
Neil Jerram
de513fa003 * Fix comment typo. 2001-12-07 17:03:15 +00:00
Marius Vollmer
16d4699b6b Replaced SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
scm_alloc_double_cell, respectively.
2001-11-25 15:21:07 +00:00
Dirk Herrmann
3096b33f0d * Oops, this belongs to the previous ChangeLog entry... 2001-11-17 12:16:05 +00:00
Dirk Herrmann
302c12b4b7 * eval.c: Removed bogus comment about acros.
(scm_unmemocar):  Use !SCM_CONSP instead of SCM_IMP.
Minimize scope of local variable.  Eliminate dependency on
macro DEBUG_EXTENSIONS.

(s_splicing):  New error message string.

(scm_m_body):  Issue 'bad body' message rather than 'missing
expression' message.

(scm_m_quote):  Eliminate unnecessary copying.

(scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let):  Leave the
checking of the body to scm_m_body.

(scm_m_do):  Move comment to function header.  Rename arg1 to
binding.  Made the code a bit easier to read.

(evalcar):  Removed.

(iqq):  Added a comment.  Changed the depth parameter to
unsigned.  Use size_t for vector lengths.  Make sure vector object
is gc protected as long as its contents are read.  Add some syntax
checks.  Get rid of unnecessary SCM_IMP test.  Clean up the
control structure a bit.

(scm_m_delay):  Added comment about the implementation of
scm_m_delay.

(scm_m_define):  Add comment about guile's currying define
syntax.  Renamed 'proc' to 'name'.  Eliminate dependency on macro
DEBUG_EXTENSIONS.  Simplified code a bit.  Eliminate SICP code.

(scm_m_letrec1):  Removed.  Part of the functionality is taken
over by the new function 'transform_bindings'.

(transform_bindings):  New function.  Takes over some of the
functionality of removed function 'scm_m_letrec1', namely to split
a list of bindings into a reversed list of variables and a list of
initializers.

(scm_m_letrec):  Call 'transform_bindings'.

(scm_m_let):  Minimized scope of local variables.  Renamed 'proc'
to 'temp' and 'arg1' to 'binding'.  Eliminated redundant SCM_NIMP
test.  Use 'transform_bindings'.  Fixed scoping error with named
let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
Jerram for suggesting the fix).  Cleaned up the control structure
a bit.

(scm_m_expand_body):  Use 'transform_bindings'.  Eliminated
unnecessary consing.  Eliminated unnecessary
SCM_DEFER/ALLOW_INTS.

(SCM_CEVAL):  Un-obfuscated some loops.
2001-11-17 11:43:28 +00:00
Neil Jerram
8f85c0c6c3 * Adding C function declarations from the SCM interface to the
reference manual documentation.
2001-11-16 15:04:17 +00:00
Dirk Herrmann
ddea3325eb * eval.c (RETURN): Wrap in do{}while(0) in order to make it
safely usable as a single statement followed by a ';', for example
in an if statement.

(SCM_CEVAL, SCM_APPLY):  Clean up code using 'RETURN'.
2001-11-15 17:19:53 +00:00
Marius Vollmer
b8113bc8dc (scm_m_begin): Allow (begin), with no subforms.
(SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
2001-11-03 18:45:33 +00:00
Dirk Herrmann
8ea4624953 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
SCM_CEVAL, scm_map, scm_init_eval):  When building lists, prefer
scm_list_<n> over scm_cons[2]?.

(scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY):  Use
SCM_C[AD][AD]R instead of explicit form.

(scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do):  Reordered
comparison parameters.

(scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL):  Use
!SCM_NULLP instead of SCM_NIMP.

(scm_m_case):  Don't copy the form.  Renamed proc to clause and
minimized its scope.  Renamed x to clauses.  Removed side
effecting operation from macro call.

(scm_m_cond):  Don't copy the form.  Renamed arg1 to clause and
minimized its scope.  Renamed x to clauses.  Minimized the scope
of variable 'len'.  Make sure the else clause is treated specially
even in case of '=>' occurences.  Don't change the else to #t in
order to be able to distinguish this case in the evaluator.  Leave
type checking of the recipient to the evaluator.

(scm_c_improper_memq):  Made the comment somewhat clearer.

(scm_m_lambda):  Renamed proc to formals.  Removed unnecessary
test for SCM_IM_LET at the place of the formal parameters.
Simplified the formal parameter checking.

(scm_m_letstar):  Added Comment.  Renamed proc to bindings.
Renamed arg1 to binding and minimized its scope.  Eliminated
unnecessary consing.

(scm_m_do):  Renamed proc to bindings.  Minimized the scope of
variable 'len'.

(build_binding_list):  New static function.

(unmemocopy):  Don't use SCM_TYP7 on pairs (it's unclean).
Further, split up the 'letrec' unmemoizing code to the
corresponding parts for 'do', 'let' and 'letrec', adding comments
to each form.  Cleanup the handling of the do form (This removes
some *real* code :-).

(SCM_CEVAL):  Removed side effecting operation from macro call.
Handle the 'else clause of the 'cond form specially - the symbol
'else is not replaced with #t any more.
2001-10-18 21:38:04 +00:00
Marius Vollmer
311f67823d (scm_m_atbind): First try to find the variable without defining it
locally; when it has not been found, define it locally.
2001-10-13 15:41:12 +00:00
Dirk Herrmann
8c494e9973 * Removed lots of deprecated stuff. 2001-08-31 14:42:31 +00:00
Marius Vollmer
2e1711782d * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
dynamic scope.
* dynwind.h (scm_swap_bindings): Declare.
* dynwind.c (scm_swap_bindings): Make non-static.
2001-08-25 16:08:13 +00:00
Dirk Herrmann
01f11e027e * Minor changes. 2001-07-30 18:55:50 +00:00