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.
SCM_UNSPECIFIED: Fall back to standard handling instead of raising
an exception. (This prevents parsing of uniform vectors from
interfering with parsing of numbers.)
* arrays.scm (read:uniform-vector): Return *unspecified* instead
of raising an exception if hash extend character isn't followed by
the array list. (This prevents parsing of uniform vectors from
interfering with parsing of numbers.)
across a hexdigit after having read a # or if not reading a hex
value. This will enable the calling code to correctly handle
forms like 1e2. (The background is, that the exponent markers d,
e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
providing this patch.
(mem2complex): Fix erroneous double-negation. Now, numbers like
1-i will be read correctly.
Initialize. These variables are now registered as gc roots.
(scm_current_pstate): Update documentation.
(scm_current_pstate, scm_make_print_state, scm_free_print_state,
scm_prin1, scm_init_print): print_state_pool is registered as a
gc root and thus does not need to be protected by a surrounding
pair any more.
(make_print_state): The car of print_state_pool no longer holds
the scm_print_state_vtable.
(scm_current_pstate, scm_make_print_state, print_circref,
scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
SCM_N<foo>.
(scm_prin1): When building lists, prefer scm_list_<n> over
scm_cons[2]?.
(scm_iprlist): Removed a redundant SCM_IMP test.
(scm_simple_format): Use SCM_EQ_P to compare SCM values.
(scm_memcons, scm_mem_to_proc): When building lists, prefer
scm_list_<n> over scm_cons[2]?.
(scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
(scm_procedure_name): Use SCM_CADR instead of explicit form.
(debugobj_print): Coerce scm_intprint arg 1 to long, not int.
Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
for some reason his patch didn't make it into the cvs.
is known to be #f if no entry is found. Thus, use !SCM_FALSEP
instead of SCM_NIMP to test for that case.
* strings.h (SCM_SET_STRING_LENGTH): Cast the length to
scm_t_bits instead of long.
whether the integral type fits in a fixnum, not the compiler.
This removes a spurious compiler warning. Also, honor the
NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
needed for `long long's.
SCM_T_SIGNED_BITS_MIN): New.
* numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
Use them to make these macros computable by the preprocessor.
(coop_create): Set mother_awake_p before creating or signalling
mother; wait until mother is going to sleep before returning.
(mother): Reset mother_awake_p before going to sleep.
protected_objects is now protected from garbage collection using
scm_gc_register_root instead of scm_permanent_object.
(get_option_setting): New static function that computes an option
setting as it was formerly done in the function scm_options.
(get_documented_option_setting): New static function that
returns option documentation as it was formerly done in the
function scm_options. Note that documentation C strings are no
longer precomputed into SCM objects. Instead, they are converted
into SCM strings every time get_documented_option_setting is
called.
(change_option_setting): New static functions that modifies the
option setting as it was formerly done in the function
scm_options. The function is now exception safe, i. e. won't
cause a memory leak when interrupted. Further, only non-immediate
option values are added to the protection list.
(scm_options): This function now has only the purpose to dispatch
to to get_option_setting, get_documented_option_setting or
change_option_setting, depending on the arguments given to
scm_options.
(scm_init_opts): Don't convert documentation C strings into SCM
strings. Further, don't protect any object values: They _must_
be immediate values, otherwise there is no guarantee that they
have not been collected before anyway.
* options.[ch] (scm_t_option): Made type unsigned, name into a
constant char* and val into a scm_t_bits type.
(scm_options, scm_init_opts): The number of options is guaranteed
to be larger or equal to zero. Thus, the type is changed to
unsigned.
non-pair cells.
(SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
the return value is signed. Thanks to Brian Crowder for the bug
report.
(SCM_SRS): Avoid unnecessary casting and don't unpack input
values. With this patch, SCM_SRS can be safely used for other
types than scm_t_signed_bits. However, it should still better be
an internal macro and thus be renamed to SCM_I_SRS.
(SCM_MAKINUM, SCM_INUM): Use proper casting.
* num2float.i.c: New file, multiply included by numbers.c, used
to "templatize" the float <-> num conversion routines.
* numbers.c: New functions: scm_num2float, scm_float2num,
scm_num2double, scm_double2num.
(scm_major_version): support integer *_VERSION macros.
(scm_minor_version): support integer *_VERSION macros.
(scm_micro_version): support integer *_VERSION macros.
(scm_version): support integer *_VERSION macros.