summaryrefslogtreecommitdiff
path: root/libguile/root.h
AgeCommit message (Collapse)AuthorFilesLines
2009-12-05decruftify scm_sys_protectsAndy Wingo1-16/+0
* libguile/root.h * libguile/root.c (scm_sys_protects): It used to be that for some reason we'd define a special array of "protected" values. This was a little silly, always, but with the BDW GC it's completely unnecessary. Also many of these variables were unused, and none of them were good API. So remove this array, and either eliminate, make static, or make internal the various values. * libguile/snarf.h: No need to generate calls to scm_permanent_object. * guile-readline/readline.c (scm_init_readline): No need to call scm_permanent_object. * libguile/array-map.c (ramap, rafe): Remove the dubious nullvect optimizations. * libguile/async.c (scm_init_async): No need to init scm_asyncs, it is no more. * libguile/eval.c (scm_init_eval): No need to init scm_listofnull, it is no more. * libguile/gc.c: Make scm_protects a static var. (scm_storage_prehistory): Change the sanity check to use the address of protects. (scm_init_gc_protect_object): No need to clear the scm_sys_protects, as it is no more. * libguile/keywords.c: Make the keyword obarray a static var. * libguile/numbers.c: Make flo0 a static var. * libguile/objprop.c: Make object_whash a static var. * libguile/properties.c: Make properties_whash a static var. * libguile/srcprop.h: * libguile/srcprop.c: Make scm_source_whash a global with internal linkage. * libguile/strings.h: * libguile/strings.c: Make scm_nullstr a global with internal linkage. * libguile/vectors.c (scm_init_vectors): No need to init scm_nullvect, it's unused.
2009-10-23de-nargs struct scm_objcode; procedure-property refactorAndy Wingo1-8/+7
* libguile/objcodes.h (struct scm_objcode): Remove nargs, nrest, and nlocs, as they are no longer needed. Also obviates the need for a padding word. * libguile/procs.c (scm_thunk_p): Use scm_i_program_arity for programs. * libguile/procprop.c (scm_i_procedure_arity): Use scm_i_program_arity for programs. (scm_procedure_properties, scm_set_procedure_properties_x) (scm_procedure_property, scm_set_procedure_property_x): Rework so that non-closure properties are stored directly in a weak hash, instead of needing a weak hash of "stand-in" closures to hold the properties. Fix docstrings also. * libguile/root.h (scm_stand_in_procs): Remove from the scm_sys_protects set. Actually with libGC, we should be able to store the elements of scm_sys_protects directly as global variables. * libguile/gc.c (scm_init_storage): Remove scm_stand_in_procs initialization. * libguile/programs.c (scm_i_program_arity): New private accessor, tries to determine the "minimum arity" of a program. * libguile/vm.c (really_make_boot_program): Adapt to changes in struct scm_objcode. * module/language/assembly.scm (*program-header-len*, byte-length): * module/language/assembly/compile-bytecode.scm (write-bytecode): * module/language/assembly/decompile-bytecode.scm (decode-load-program): * module/language/assembly/disassemble.scm (disassemble-load-program): Adapt to changes in objcode. * module/system/xref.scm (program-callee-rev-vars): Adapt to changes in assembly. * module/language/glil.scm: Remove nargs, nrest, and nlocs from glil-program. * module/language/glil/compile-assembly.scm (make-meta, glil->assembly): * module/language/glil/decompile-assembly.scm (decompile-toplevel): (decompile-load-program): Adapt to changes in GLIL and assembly. * module/language/tree-il/compile-glil.scm (flatten-lambda): Adapt to changes in GLIL. * test-suite/tests/asm-to-bytecode.test: Adapt to assembly and bytecode changes. * test-suite/tests/tree-il.test: Adapt to GLIL changes.
2009-08-18Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès1-6/+7
Conflicts: lib/Makefile.am libguile/Makefile.am libguile/frames.c libguile/gc-card.c libguile/gc-freelist.c libguile/gc-mark.c libguile/gc-segment.c libguile/gc_os_dep.c libguile/load.c libguile/macros.c libguile/objcodes.c libguile/programs.c libguile/strings.c libguile/vm.c m4/gnulib-cache.m4 m4/gnulib-comp.m4 m4/inline.m4
2009-06-17Change Guile license to LGPLv3+Neil Jerram1-6/+7
(Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* )
2008-09-10Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès1-2/+2
Conflicts: libguile/Makefile.am libguile/coop-defs.h libguile/gc-card.c libguile/gc-freelist.c libguile/gc-malloc.c libguile/gc-mark.c libguile/gc-segment.c libguile/gc.c libguile/gc.h libguile/gc_os_dep.c libguile/hashtab.c libguile/hashtab.h libguile/inline.h libguile/private-gc.h libguile/struct.c libguile/struct.h libguile/threads.c libguile/threads.h libguile/vectors.h libguile/weaks.h test-suite/tests/gc.test
2008-09-10Removed `scm_gc_registered_roots' and `scm_permobjs'.Ludovic Courtes1-7/+5
* libguile/gc.c (scm_permanent_object): Use `scm_gc_protect_object ()'. (scm_gc_register_root): Do nothing. (scm_init_storage): Removed initialization of `scm_permobjs' and `scm_gc_register_roots'. * libguile/root.h (scm_permobjs): Removed. (scm_gc_registered_roots): Removed. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-50
2008-05-31Add `SCM_INTERNAL' macro, use it.Ludovic Courtès1-2/+2
2006-04-17merge from 1.8 branchKevin Ryde1-1/+1
2005-05-23The FSF has a new address.Marius Vollmer1-1/+1
2005-03-02See ChangeLog from 2005-03-02.Marius Vollmer1-60/+0
2005-01-24Reverted changed from 2005/01/24 19:14:54, which was a commit to theMarius Vollmer1-5/+4
wrong branch. Sorry.
2005-01-24Threading changes.Marius Vollmer1-4/+5
2004-05-06Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. UseMarius Vollmer1-2/+2
SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
2003-04-20 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,Dirk Herrmann1-13/+12
scm_init_eval): Made scm_undefineds static in eval.c, renamed it to undefineds and registered the object as a permanent object. * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply static in eval.c, renamed it to f_apply and registered the object as a permanent object.
2003-04-20 * Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING toDirk Herrmann1-6/+1
fix compile errors with --disable-deprecated.
2003-04-05Changed license terms to the plain LGPL thru-out.Marius Vollmer1-35/+11
2002-11-03* __scm.h (USE_THREADS, GUILE_ISELECT): Define whenMarius Vollmer1-9/+2
SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
2002-10-27* __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead ofMarius Vollmer1-0/+4
active_asyncs. * root.h (scm_root_state): Added pending_asyncs and signal_asyncs fields. * root.c (root_mark): Mark them. (make_root): Initialize them.
2002-10-09* root.h (scm_root_state): Added 'block_async' slot.Marius Vollmer1-1/+2
(scm_active_asyncs): Removed abbrev. * root.c (scm_make_root): Initialize 'block_asyncs' slot.
2002-10-03(scm_root_state): Added new "active_asyncs" slot.Marius Vollmer1-2/+6
2002-04-20*** empty log message ***Gary Houston1-3/+0
2002-04-20 * removal of unused fields in root state (thanks to ChristopherGary Houston1-3/+0
Cramer for pointing out the disuse.) * root.h (scm_root_state): removed def_inp, def_outp, def_errp. * root.c (root_mark): don't mark them. (scm_make_root): don't set them to #f. * init.c (scm_init_standard_ports): don't initialise with the default ports.
2001-11-02Prefixed each each exported symbol with SCM_API.Marius Vollmer1-13/+13
2001-09-15 * root.h (scm_root_state): removed the continuation_stack andGary Houston1-4/+0
continuation_stack_ptr members, which have no apparent purpose. (scm_continuation_stack, scm_continuation_stack_ptr): #defines removed. * root.c (root_mark), init.c (restart_stack, start_stack), gc (scm_igc): remove all references to contination_stack and continuation_stack_ptr, avoiding allocation of a vector and useless processing during gc.
2001-08-31* Removed deprecated stuff.Dirk Herrmann1-18/+7
* Some more renamings to SCM_<filename>_H.
2001-07-19 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,Martin Grabmüller1-1/+1
chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c, feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c, gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, gsubr.c, gsubr.h, guardians.h, guile-func-name-check.in, guile-snarf-docs-texi.in, guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in, hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h, objprop.c, objprop.h, options.c, options.h, random.h, regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c, strerror.c, strop.h, strports.h, threads.h, values.c, values.h, version.c, version.h: Updated copyright notice.
2001-07-09Remove "face-lift" comment.Thien-Thi Nguyen1-2/+0
2001-06-14replace "scm_*_t" with "scm_t_*".Marius Vollmer1-4/+4
2001-05-26* gc.c (scm_init_storage): init `scm_gc_registered_roots'.Michael Livshin1-3/+4
(scm_igc): mark from them, too (precisely, not conservatively!). * root.h (scm_gc_registered_roots): new object in scm_sys_protects. * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead `scm_protect_object'. shouldn't call it at all, though, it seems. * gc.c (scm_[un]protect_object): deprecated. (scm_gc_[un]protect_object): new names for scm_[un]protect_object. (scm_gc_[un]register_root[s]): new. * gc.h: add prototypes for scm_gc_[un]protect_object, scm_gc_[un]register_root[s].
2001-05-24* validate.hMichael Livshin1-1/+1
(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-15Merge from mvo-vcell-cleanup-1-branch.Marius Vollmer1-12/+10
2000-12-13* Renamed scm_symbols to symbols and made it static in symbols.c.Dirk Herrmann1-13/+12
2000-12-12* The creation of symbols and bindings are two separate issues now.Dirk Herrmann1-2/+2
2000-12-08Smob-related creanup.Keisuke Nishida1-2/+2
2000-10-25* Some more work to get rid of SCM_LENGTHDirk Herrmann1-3/+0
* Eliminated some cell type bit fiddling * Various minor changes
2000-09-03* root.h (scm_properties_whash): New `sys_protect', used inMarius Vollmer1-3/+4
properties.c.
2000-07-18* Deprecated function scm_call_catching_errors.Dirk Herrmann1-1/+9
* Updated root-smob initialization.
2000-06-29* Removed scm_first_type.Dirk Herrmann1-9/+8
2000-06-28* Removed commented code from gc.c.Dirk Herrmann1-10/+9
* Removed unused identifier scm_type_obj_list.
2000-06-21* root.h (scm_top_level_lookup_closure_var): Removed. (It's noMikael Djurfeldt1-5/+2
sense in having the *variable* be a "fluid".)
2000-06-12Updated copyrightsMikael Djurfeldt1-1/+1
2000-04-03Lots of fixes to make guile (at some time) compile with strict typing.Dirk Herrmann1-1/+1
2000-03-19 * *.[hc]: add Emacs magic at the end of file, to ensure GNUMichael Livshin1-0/+6
indentation style.
2000-03-02* list.c: Moved append docs to append! Thanks Dirk Hermann. Also,Greg J. Badros1-11/+11
added append docs from R4RS. * strings.c: Docstring typo fix, + eliminate unneeded IMP tests. Thanks Dirk Hermann! * chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR. Thanks Dirk Hermann! * *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout. Drop use of SCM_P for function prototypes... assume an ANSI C compiler. Thanks Dirk Hermann!
1999-12-16* *.h: Use SCM_NIMP(X) && in all the FOOP macros.Greg J. Badros1-1/+4
* *.[ch]: Use do { ... } while (0) idiom in macros that expanded to a bare block.
1999-03-14* Makefile.am, init.c, libguile.h, objects.c, root.h: ReplacedMikael Djurfeldt1-1/+1
"kw" --> "keywords" everywhere. (I doubt that this will cause big compatibility problems since the application interface is unaffected.)
1998-10-19* __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,Jim Blandy1-1/+1
continuations.c, debug.c, debug.h, dynl-dl.c, dynl.c, dynl.h, dynwind.c, dynwind.h, eq.c, error.c, error.h, eval.c, eval.h, feature.c, filesys.c, filesys.h, fports.c, fports.h, gc.c, gc.h, genio.c, genio.h, gh.h, gh_data.c, gsubr.c, gsubr.h, hash.c, hashtab.c, init.c, init.h, ioext.c, ioext.h, kw.c, libguile.h, list.c, list.h, load.c, load.h, mallocs.c, markers.c, mit-pthreads.c, net_db.c, numbers.c, numbers.h, options.c, ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c, procprop.h, procs.c, procs.h, ramap.c, ramap.h, regex-posix.c, regex-posix.h, root.c, root.h, scmsigs.c, scmsigs.h, script.c, script.h, simpos.c, simpos.h, smob.c, smob.h, snarf.h, socket.c, srcprop.c, stackchk.c, stackchk.h, stacks.c, stime.c, stime.h, strings.c, strings.h, strports.c, struct.c, struct.h, symbols.c, symbols.h, tags.h, threads.c, throw.h, unif.c, variable.c, vectors.c, vectors.h, version.h, vports.c, weaks.c: Update copyright years.
1998-09-30Warning fixes from Maciej Stachowiak:Jim Blandy1-0/+1
* backtrace.h (scm_display_application, scm_backtrace): Add prototypes. * debug.c (scm_m_start_stack): Make this function static. * fluids.h (scm_fluid_p): Add prototype. * procprop.c (scm_i_procedure_arity): Make this function static. * regex-posix.c (scm_regexp_error_msg): Make this function static. * regex-posix.h (scm_init_regex_posix): Use prototype, not K&R decl. * root.h (scm_dynamic_root): Add external prototype. * scmsigs.h (scm_usleep): Add external prototype. * script.h (scm_init_script): Use prototype, not K&R decl. * stacks.h (scm_stack_id): Add external prototype. * symbols.h (scm_sysintern0_no_module_lookup): Add external prototype.
1998-06-18* root.h (scm_root_state): Added scm_cur_loadp.Mikael Djurfeldt1-0/+2
* root.c (mark_root): Added comment about cur_loadp.
1997-11-29* init.c (scm_start_stack): Removed initialization ofMikael Djurfeldt1-3/+0
scm_the_last_stack_var. * backtrace.h: Declare scm_the_last_stack_var. * backtrace.c: Define scm_the_last_stack_var. * root.c (mark_root): Don't mark the_last_stack_var. * root.h (scm_root_state): Removed the_last_stack_var. * throw.c: Added #include "fluids.h" (ss_handler): `the-last-stack' is now a fluid. * (backtrace.h, backtrace.c, throw.c): Renamed the_last_stack_var --> the_last_stack_fluid. * backtrace.c: Added #include "fluids.h" (scm_init_backtrace): Initialize `the-last-stack' to a fluid. (scm_backtrace): `the-last-stack' is now a fluid. * init.c (scm_boot_guile_1): Moved call to scm_init_backtrace after scm_init_fluids.