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

135 commits

Author SHA1 Message Date
Neil Jerram
53befeb700 Change Guile license to LGPLv3+
(Not quite finished, the following will be done tomorrow.
   module/srfi/*.scm
   module/rnrs/*.scm
   module/scripts/*.scm
   testsuite/*.scm
   guile-readline/*
)
2009-06-17 00:22:09 +01:00
Andy Wingo
69dd78d7c8 no positions when reading psyntax-pp, validation in @/@@, cleanups
* module/ice-9/syncase.scm (old-debug): Re-disable position recording
  when reading psyntax-pp.

* libguile/eval.c (scm_m_at, scm_m_atat): More input validation.

* libguile/debug.c (scm_procedure_module): Use scm_env_module. Remove
  extraneous docstring.
2009-04-17 15:20:19 +02:00
Andy Wingo
4e237f1460 thread the module through syntax-case's expansion
* libguile/debug.h:
* libguile/debug.c (scm_procedure_module): New procedure, returns the
  module that was current when the given procedure was defined. Used by
  syncase to scope free identifiers.

* module/ice-9/psyntax-pp.scm: Recompiled.

* module/ice-9/psyntax.scm: Thread the module through the syntax
  expansion. This is harder than it would appear because in many places
  the different components of syntax objects are destructured.

* module/ice-9/syncase.scm (guile-macro): Adapt to new signature for
  syntax transformer functions.
2009-04-17 15:20:16 +02:00
Andy Wingo
6f36dbbe48 no hard-coded stack limitations if the user has getrlimit
* libguile/debug.c (init_stack_limit): Instead of "1 MB or 80% of rlimit,
  whichever is lower", just use 80% of the rlimit, if set.
2009-04-03 10:38:30 -07:00
Andy Wingo
ec900eacb7 getrlimit-based stack limits
* libguile/debug.c (init_stack_limit): Initialize the stack limit based
  on operating system limits (via getrlimit(2)), or 1 MB -- whichever is
  smaller.
2009-03-27 15:44:17 -07:00
Andy Wingo
3b91e017e3 Merge commit 'e20d7001c3' into vm-check
Conflicts:

	libguile/stacks.c
2009-03-17 16:40:52 +01:00
Ludovic Courtès
e20d7001c3 Remove "compiled closures" ("cclos") in favor of a simpler mechanism.
The idea is to introduce `gsubrs' whose arity is encoded in their type
(more precisely in the sizeof (void *) - 8 MSBs).  This removes the
indirection introduced by cclos and simplifies the code.

* libguile/__scm.h (CCLO): Remove.

* libguile/debug.c (scm_procedure_source, scm_procedure_environment):
  Remove references to `scm_tc7_cclo'.

* libguile/eval.c (scm_trampoline_0, scm_trampoline_1,
  scm_trampoline_2): Replace `scm_tc7_cclo' with `scm_tc7_gsubr'.

* libguile/eval.i.c (CEVAL): Likewise.  No longer make PROC the first
  argument.  Directly invoke `scm_gsubr_apply ()' instead of jump to the
  `evap(N+1)' label or call to `SCM_APPLY ()'.

* libguile/evalext.c (scm_self_evaluating_p): Remove reference to
  `scm_tc7_cclo'.

* libguile/gc-card.c (scm_i_sweep_card, scm_i_tag_name): Likewise.

* libguile/gc-mark.c (scm_gc_mark_dependencies): Likewise.

* libguile/goops.c (scm_class_of): Likewise.

* libguile/print.c (iprin1): Likewise.

* libguile/gsubr.c (create_gsubr): Use `unsigned int's for REQ, OPT and
  RST.  Use `scm_tc7_gsubr' instead of `scm_makcclo ()' in the default
  case.
  (scm_gsubr_apply): Remove calls to `SCM_GSUBR_PROC ()'.
  (scm_f_gsubr_apply): Remove.

* libguile/gsubr.h (SCM_GSUBR_TYPE): New definition.
  (SCM_GSUBR_MAX): Changed to 33.
  (SCM_SET_GSUBR_TYPE, SCM_GSUBR_PROC, SCM_SET_GSUBR_PROC,
  scm_f_gsubr_apply): Remove.

* libguile/procprop.c (scm_i_procedure_arity): Remove reference to
  `scm_tc7_cclo'; add proper handling of `scm_tc7_gsubr'.

* libguile/procs.c (scm_makcclo, scm_make_cclo): Remove.
  (scm_procedure_p): Remove reference to `scm_tc7_cclo'.
  (scm_thunk_p): Likewise, plus add proper `scm_tc7_gsubr' handling.

* libguile/procs.h (SCM_CCLO_LENGTH, SCM_MAKE_CCLO_TAG,
  SCM_SET_CCLO_LENGTH, SCM_CCLO_BASE, SCM_SET_CCLO_BASE, SCM_CCLO_REF,
  SCM_CCLO_SET, SCM_CCLO_SUBR, SCM_SET_CCLO_SUBR, scm_makcclo,
  scm_make_cclo): Remove.

* libguile/stacks.c (read_frames): Remove reference to `scm_f_gsubr_apply'.

* libguile/tags.h (scm_tc7_cclo): Remove.
  (scm_tc7_gsubr): New.
  (scm_tcs_subrs): Add `scm_tc7_gsubr'.
2009-03-02 00:20:43 +01:00
Andy Wingo
e311f5fa04 tick in calls, procedure-name works on compiled procedures
* module/system/vm/program.scm:
* libguile/programs.h:
* libguile/programs.c (scm_program_bindings, scm_program_bindings)
  (scm_program_properties, scm_program_name): Unfortunately, implement
  more procs in C, so that C can use them more easily.

* libguile/debug.c (scm_procedure_name): Dispatch to scm_program_name as
  appropriate.

* libguile/vm-i-system.c (call): Tick in a call.
2009-02-02 23:00:36 +01:00
Andy Wingo
999f1b26e7 Merge commit 'origin/master' into vm
Conflicts:

	doc/Makefile.am
	ice-9/Makefile.am
	libguile/gc.c
2008-09-30 21:12:16 +02:00
Andy Wingo
107139eaad actually compile start-stack to something useful
* ice-9/boot-9.scm (start-stack): Define as a defmacro instead of an acro
  in C. We have a way to delay evaluation of the exp, after all: putting
  it in a thunk is sufficient.

* libguile/debug.h:
* libguile/debug.c (scm_sys_start_stack): Renamed from scm_start_stack,
  and exposed to the user. Takes a thunk instead of an expression +
  environment.
  (scm_m_start_stack): Remove this acro.

* module/language/scheme/translate.scm (custom-transformer-table): Remove
  the start-stack special case.
2008-09-26 12:03:36 +02:00
Ludovic Courtès
dbb605f575 Include <config.h> in all C files; use #ifdef HAVE_CONFIG_H' rather than #if'. 2008-09-13 15:35:27 +02:00
Andy Wingo
c09346521e Fix compilation #ifndef STACK_CHECKING.
* libguile/debug.c (scm_debug_options): Fix compilation #ifndef
  STACK_CHECKING.
2008-09-02 10:30:39 -07:00
Han-Wen Nienhuys
22fc179acd * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
read.h, stacks.c, symbols.c, throw.c: use private-options.h

* private-options.h: new file: contain hardcoded option
definitions.
2007-01-22 15:14:40 +00:00
Han-Wen Nienhuys
6256065013 * readline.c: terminate option list with NULL.
* read.c: idem.

* print.c: idem.

* eval.c: terminate option lists with 0.

* options.c: remove n (for length) from scm_option_X
functions. Detect option list length by looking for NULL name.
2007-01-19 19:26:36 +00:00
Kevin Ryde
2b829bbb3d merge from 1.8 branch 2006-04-17 00:05:42 +00:00
Marius Vollmer
661ae7ab6b Renamed the "frames" that are related to dynamic-wind to "dynamic
contexts.  Renamed all functions from scm_frame_ to scm_dynwind_.
Updated documentation.
2006-01-29 00:23:28 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Neil Jerram
d193b04b7b (scm_make_memoized): Restore use of SCM_UNPACK. 2005-03-24 07:30:19 +00:00
Neil Jerram
c29748cdfe (scm_make_memoized): Remove unnecessary critical
section, and simplify by using SCM_RETURN_NEWSMOB.
2005-03-23 20:22:26 +00:00
Marius Vollmer
5e3545d00e (scm_debug_options): Replace SCM_CRITICAL_SECTION_START/END with a
frame and scm_frame_critical_section.
2005-03-07 21:33:18 +00:00
Marius Vollmer
9de87eea47 See ChangeLog from 2005-03-02. 2005-03-02 20:42:01 +00:00
Marius Vollmer
d2e53ed6f8 *** empty log message *** 2004-09-22 17:41:37 +00:00
Marius Vollmer
bc36d0502b * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
deprecated.h.  Replaced all uses with scm_is_eq.
2004-07-27 15:41:49 +00:00
Marius Vollmer
7888309be8 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h".
Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and
scm_is_bool, respectively.
2004-07-06 10:59:25 +00:00
Dirk Herrmann
9fcf3cbb81 * backtrace.c (display_expression, display_frame): Call
scm_i_unmemoize_expr for unmemoizing a memoized object holding a
	single memoized expression.

	* debug.c (memoized_print): Don't try to unmemoize the memoized
	object, since we can't know whether it holds a single expression
	or a body.

	(scm_mem_to_proc): Removed check for lambda expression, since it
	was moot anyway.  Whoever uses these functions for debugging
	purposes should know what they do: Creating invalid memoized code
	will cause crashes, independent of whether this check is present
	or not.

	(scm_proc_to_mem): Take the closure's code as it is and don't
	append a SCM_IM_LAMBDA isym.  To allow easier debugging, the
	memoized code should not be modified.

	* debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
	scm_unmemoize from public use, but made scm_i_unmemoize_expr
	available as a guile internal function instead.  However,
	scm_i_unmemoize_expr will only work on memoized objects that hold
	a single memoized expression.  It won't work with bodies.

	* debug.c (scm_procedure_source), macros.c (macro_print), print.c
	(scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
	i. e. a list of expressions.

	* eval.c (unmemoize_exprs): Drop internal body markers from the
	output during unmemoization.

	* eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
	scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
	but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
	as guile internal functions instead.  scm_i_unmemoize_expr will
	only work on a single memoized expression, while
	scm_i_unmemocopy_body will only work on bodies.
2004-06-27 12:34:54 +00:00
Dirk Herrmann
212e58ede8 * list.[ch] (scm_i_finite_list_copy): New internal function to
copy lists that are known to be finite (though not necessarily
	proper).

	* debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
	a closure's argument list like an expression of a body.

	* eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
	unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
	unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
	unmemoize_letrec, unmemoize_letstar, unmemoize_or,
	unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
	unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
	unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
	unmemoize_builtin_macro): New static functions and symbols.

	(scm_unmemocopy): Rewritten in terms of the above.  scm_unmemocopy
	now has a slightly different meaning: The memoized form that is
	receives as its argument is now interpreted as a sequence of
	expressions from a body.

	(unmemocar, scm_unmemocar): Since the whole functionality of
	unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
	has its old content back and is deprecated, while unmemocar has
	been removed.

	(SCM_BIT7): Removed.

	(CEVAL): For unmemoizing a single expression, call
	unmemoize_expression instead of scm_unmemocopy, which now expects
	a sequence of body expressions.  Eliminated unnecessary empty
	environment frame when executing let* forms.  Eliminated
	unmemoization step from evaluator.
2004-06-06 07:46:18 +00:00
Han-Wen Nienhuys
702551e6cc * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
* goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.

* backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
(display_frame): idem.
(display_backtrace_file_and_line): idem.

* tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
arguments.
2004-03-28 13:55:03 +00:00
Dirk Herrmann
d0624e391b * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
	SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
	generalized it to apply not only to C level functions but also to
	scheme level functions.

	* debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
	scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
	scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
	eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
	only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
	respectively.

	* deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
	SCM_IDSTMSK): Deprecated.  The macro definitions are moved from
	eval.h into eval.c and a copy is placed into deprecated.h.

	* eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
	into eval.c. This definition was not part of the API in any
	officially released version of guile and thus does not need to go
	through a phase of deprecation.
2003-06-04 05:28:34 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Mikael Djurfeldt
b3d7f6dfea * debug.c (scm_procedure_source): Handle all objects for which
procedure? is #t.  (Thanks to Bill Schottstaedt.)
2003-02-05 19:04:40 +00:00
Mikael Djurfeldt
4ba5f279f0 * debug.c (scm_make_iloc): Added missing "return". 2002-11-17 22:18:51 +00:00
Dirk Herrmann
a8a19efc2b * eval.h (SCM_MAKE_ILOC): New macro.
* debug.c (scm_make_iloc):  Use SCM_MAKE_ILOC instead of computing
the iloc bitpattern here.
2002-11-16 16:20:14 +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
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
Neil Jerram
3939e9df35 Change 3 instances of @var to @code in docstrings. 2002-03-15 09:40:57 +00:00
Thien-Thi Nguyen
a6b844c224 Retire inclusion guard macro SCM_MAGIC_SNARFER. 2002-03-14 03:47:43 +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
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
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
Mikael Djurfeldt
aa5e5d63eb * debug.c (scm_mem_to_proc): Fixed typo in previous change. 2001-10-12 09:02:03 +00:00
Dirk Herrmann
37c56aecf8 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
(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.
2001-10-11 22:26:25 +00:00
Marius Vollmer
904a077df1 * tags.h: Update tag system docs.
(scm_tc3_cons_gloc): Renamed to scm_tc3_struct.  Changed all uses.
(scm_tcs_cons_gloc): Renamed to scm_tcs_struct.  Changed all uses.
(SCM_ECONSP, SCM_NECONSP): Removed.  Changed all uses to SCM_CONSP
or SCM_NCONSP, respectively.

* struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
of scm_tc3_cond_gloc and scm_tcs_cons_gloc.  See above.

* print.c (scm_iprin1): Remove printing of glocs.  Do not try to
tell glocs from structs.

* gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.

* eval.c (scm_m_atbind): Make a list of variables, not glocs.
(scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
instead of with glocs.
(EVALCAR): Do not test for glocs.
(scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
condition.
(scm_unmemocar): Do not handle glocs.
(scm_m_atfop): Memoize as a variable, not as a gloc.
(scm_eval_args, scm_deval_args): Do not handle glocs.
(scm_ceval, scm_deval): Likewise.

* eval.h (SCM_XEVALCAR): Do not test for glocs.
(SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
Removed.

* debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.

* dynwind.c (scm_swap_bindings): Likewise.
(scm_dowinds): Updated to recognize lists of variables instead of
lists of glocs.

* __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
2001-07-26 21:40:18 +00:00
Thien-Thi Nguyen
a06e3a75b2 Remove "face-lift" comment. 2001-07-09 07:36:48 +00:00
Keisuke Nishida
fdc2839563 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
2001-06-26 15:46:40 +00:00
Marius Vollmer
92c2555f69 replace "scm_*_t" with "scm_t_*". 2001-06-14 19:50:43 +00:00
Dirk Herrmann
e81d98ec2d * Introduce SCM_UNUSED and mark unused function parameters.
* Introduce SCM_DEBUG_PAIR_ACCESSES.
* Extend the possibilities of SCM_DEBUG_CELL_ACCESSES.
2001-06-07 21:12:19 +00:00
Michael Livshin
dd85ce4758 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
* socket.c (s_scm_inet_pton): fix docstring quoting.
(s_scm_inet_ntop): ditto.

* num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.

* hashtab.c (scm_internal_hash_fold): fix argument position in
SCM_ASSERT.

* environments.c (s_scm_import_environment_set_imports_x): fix
argument position in SCM_ASSERT.

* debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
(s_scm_make_iloc): ditto.
2001-05-28 12:36:41 +00:00
Michael Livshin
1be6b49ccb * validate.h
(SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
new macros.

* unif.h: type renaming:
scm_array -> scm_array_t
scm_array_dim -> scm_array_dim_t
the old names are deprecated, all in-Guile uses changed.

* tags.h (scm_ubits_t): new typedef, representing unsigned
scm_bits_t.

* stacks.h: type renaming:
scm_info_frame -> scm_info_frame_t
scm_stack -> scm_stack_t
the old names are deprecated, all in-Guile uses changed.

* srcprop.h: type renaming:
scm_srcprops -> scm_srcprops_t
scm_srcprops_chunk -> scm_srcprops_chunk_t
the old names are deprecated, all in-Guile uses changed.

* gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
vectors.c, vports.c, weaks.c:
various int/size_t -> size_t/scm_bits_t changes.

* random.h: type renaming:
scm_rstate -> scm_rstate_t
scm_rng -> scm_rng_t
scm_i_rstate -> scm_i_rstate_t
the old names are deprecated, all in-Guile uses changed.

* procs.h: type renaming:
scm_subr_entry -> scm_subr_entry_t
the old name is deprecated, all in-Guile uses changed.

* options.h (scm_option_t.val): unsigned long -> scm_bits_t.
type renaming:
scm_option -> scm_option_t
the old name is deprecated, all in-Guile uses changed.

* objects.c: various long -> scm_bits_t changes.
(scm_i_make_class_object): flags: unsigned long -> scm_ubits_t

* numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
SCM_I_FIXNUM_BIT.

* num2integral.i.c: new file, multiply included by numbers.c, used
to "templatize" the various integral <-> num conversion routines.

* numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
deprecated.
(scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
scm_num2size): new functions.

* modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.x

* load.c: change int -> size_t in various places (where the
variable is used to store a string length).
(search-path): call scm_done_free, not scm_done_malloc.

* list.c (scm_ilength): return a scm_bits_t, not long.
some other {int,long} -> scm_bits_t changes.

* hashtab.c: various [u]int -> scm_bits_t changes.
scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
(scm_ihashx): n: uint -> scm_bits_t
use scm_bits2num instead of scm_ulong2num.

* gsubr.c: various int -> scm_bits_t changes.

* gh_data.c (gh_scm2double): no loss of precision any more.

* gh.h (gh_str2scm): len: int -> size_t
(gh_{get,set}_substr): start: int -> scm_bits_t,
len: int -> size_t
(gh_<num>2scm): n: int -> scm_bits_t
(gh_*vector_length): return scm_[u]size_t, not unsigned long.
(gh_length): return scm_bits_t, not unsigned long.

* fports.h: type renaming:
scm_fport -> scm_fport_t
the old name is deprecated, all in-Guile uses changed.

* fports.c (fport_fill_input): count: int -> scm_bits_t
(fport_flush): init_size, remaining, count: int -> scm_bits_t

* debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
those prototypes, as the functions they prototype don't exist.

* fports.c (default_buffer_size): int -> size_t
(scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
default_size: int -> size_t
(scm_setvbuf): csize: int -> scm_bits_t

* fluids.c (n_fluids): int -> scm_bits_t
(grow_fluids): old_length, i: int -> scm_bits_t
(next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
scm_bits_t
(scm_c_with_fluids): flen, vlen: int -> scm_bits_t

* filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
the new and shiny SCM_NUM2INT.

* extensions.c: extension -> extension_t (and made a typedef).

* eval.h (SCM_IFRAME): cast to scm_bits_t, not int.  just so
there are no nasty surprises if/when the various deeply magic tag
bits move somewhere else.

* eval.c: changed the locals used to store results of SCM_IFRAME,
scm_ilength and such to be of type scm_bits_t (and not int/long).
(iqq): depth, edepth: int -> scm_bits_t
(scm_eval_stack): int -> scm_bits_t
(SCM_CEVAL): various vars are not scm_bits_t instead of int.
(check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
i: int -> scm_bits_t

* environments.c: changed the many calls to scm_ulong2num to
scm_ubits2num.
(import_environment_fold): proc_as_ul: ulong -> scm_ubits_t

* dynwind.c (scm_dowinds): delta: long -> scm_bits_t

* debug.h: type renaming:
scm_debug_info -> scm_debug_info_t
scm_debug_frame -> scm_debug_frame_t
the old names are deprecated, all in-Guile uses changed.
(scm_debug_eframe_size): int -> scm_bits_t

* debug.c (scm_init_debug): use scm_c_define instead of the
deprecated scm_define.

* continuations.h: type renaming:
scm_contregs -> scm_contregs_t
the old name is deprecated, all in-Guile uses changed.
(scm_contregs_t.num_stack_items): size_t -> scm_bits_t
(scm_contregs_t.num_stack_items): ulong -> scm_ubits_t

* continuations.c (scm_make_continuation): change the type of
stack_size form long to scm_bits_t.

* ports.h: type renaming:
scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
scm_port -> scm_port_t
scm_ptob_descriptor -> scm_ptob_descriptor_t
the old names are deprecated, all in-Guile uses changed.
(scm_port_t.entry): int -> scm_bits_t.
(scm_port_t.line_number): int -> long.
(scm_port_t.putback_buf_size): int -> size_t.

* __scm.h (long_long, ulong_long): deprecated (they pollute the
global namespace and have little value besides that).
(SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
SCM handle).
(ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
exist (for size_t & ptrdiff_t)
(scm_sizet): deprecated.

* Makefile.am (noinst_HEADERS): add num2integral.i.c
2001-05-24 00:50:51 +00:00
Marius Vollmer
86d31dfe7d Merge from mvo-vcell-cleanup-1-branch. 2001-05-15 14:57:22 +00:00
Dirk Herrmann
4daecfeecc * Some simplification, basically a postscriptum to the previous patch. 2001-04-19 15:20:27 +00:00