summaryrefslogtreecommitdiff
path: root/libguile/init.c
AgeCommit message (Collapse)AuthorFilesLines
2010-01-07boot bytevectors earlierAndy Wingo1-7/+7
* libguile/init.c (scm_i_init_guile): It turns out generalized-vectors and generalized-arrays don't actually block anyone in the dependency graph, so punt those back to the end. Bootstrap bytevectors earlier, though, which don't actually depend on smobs.
2010-01-04add foreign value wrapperAndy Wingo1-1/+2
* libguile/foreign.h: * libguile/foreign.c: New files, implementing simple wrappers around foreign values, such as those that one might link in dynamically from a library. * libguile/tags.h (scm_tc7_foreign): Take a tc7 for foreign values. * libguile.h: * libguile/init.c: Add foreign.h to headers and init. * libguile/print.c (iprin1): Add printer for foreign values. * libguile/gc.c (scm_i_tag_name): Case for foreign values. * libguile/goops.c (scm_class_of, create_standard_classes): Add a class for foreign values. * libguile/evalext.c (scm_self_evaluating_p): Add case for foreign values. * libguile/Makefile.am: Add foreign.[ch] to the build.
2009-12-08initialize smobs after structsAndy Wingo1-1/+1
* libguile/init.c (scm_i_init_guile): Move SMOB prehistory after structs init. No effect for now.
2009-12-05structs are alive early in guile's bootAndy Wingo1-10/+10
* libguile/init.c (scm_i_init_guile): Reorder deps so structs are initialized early in the boot process.
2009-12-05more annotations to scm_i_init_guileAndy Wingo1-29/+28
* libguile/init.c (scm_i_init_guile): Annotate things that need smobs.
2009-12-05further boot cleanupsAndy Wingo1-2/+2
* libguile/srfi-14.c (define_charset): * libguile/deprecated.c (scm_create_hook): Don't bother making the returned objects (hooks or charsets) into permanent objects; they are already defined, and then the caller probably stores them away too. * libguile/init.c (scm_i_init_guile): Add a couple annotations.
2009-12-05more boot cleanupAndy Wingo1-14/+13
* libguile/bytevectors.c (scm_bootstrap_bytevectors): Remove a call to scm_gc_protect_object. * libguile/gc.h: * libguile/gc.c (scm_init_gc_protect_object): Rename from scm_init_storage, and just return void. Make the GC boot procs have internal linkage. * libguile/init.c: Adapt to the name change.
2009-12-05some scm_i_init_guile cleanupsAndy Wingo1-6/+3
* libguile/init.c (scm_i_init_guile): Since hash tables are tc7 objects, things that depend on hash tables no longer depend on smobs, so move smob_prehistory up a bit. No more struct_prehistory. * libguile/struct.h: * libguile/struct.c (scm_struct_prehistory): Remove empty function.
2009-12-05remove scm_ports_prehistoryAndy Wingo1-1/+0
* libguile/ports.h: * libguile/ports.c (scm_ports_prehistory): Remove this function. Just initialize global vars to NULL/0 instead of needing a prehistory function.
2009-12-05fluids are tc7 objectsAndy Wingo1-1/+0
If you're wondering what I'm doing, I'm trying to eventually reimplement smobs in terms of structs, so that applicable smobs can just follow the applicable struct dispatch path. But to do that I have to get structs initialized before things that use smobs, which means transforming a bunch of smobby things to tc7 things. But this transformation is good for performance anyway, and we currently have a glut of unused tc7s, so here we go... * libguile/tags.h (scm_tc7_fluid, scm_tc7_dynamic_state): Fluids (and dynamic states) now have tc7s. * libguile/fluids.h: Remove scm_fluids_prehistory, and add internal scm_i_fluid_print. Update a comment. * libguile/fluids.c: Update for tc7 representation. Also remove the next pointers while we're at it, as they aren't used in the new BDW GC. * libguile/eq.c (scm_equal_p): Remove the hashtable case. Hashtables could never be equal? before, I don't see why to add stubs doing the same thing now. * libguile/print.c (iprin1): * libguile/gc.c (scm_i_tag_name): * libguile/evalext.c (scm_self_evaluating_p): Add fluid and dynamic_state cases. * libguile/goops.h: Remove scm_class_hashtable; it will be static. * libguile/goops.c: Make <hashtable> static, and add <fluid> and <dynamic-state> classes. * libguile/hashtab.h: * libguile/hashtab.c: Remove scm_i_hashtable_equal_p. * libguile/init.c (scm_i_init_guile): Remove call to fluids_prehistory.
2009-12-05hash tables have a tc7Andy Wingo1-11/+0
* libguile/tags.h (scm_tc7_hashtable): Allocate a tc7 for hashtables. * libguile/hashtab.h: Adjust macros accordingly. (scm_i_hashtable_print, scm_i_hashtable_equal_p): New internal functions. (scm_hashtab_prehistory): Remove, no more need for this. * libguile/hashtab.c (scm_hash_fn_remove_x): Fix a longstanding bug. (make_hash_table): Adapt to the new hash table representation. * libguile/eq.c (scm_equal_p) * libguile/evalext.c (scm_self_evaluating_p) * libguile/print.c (iprin1) * libguile/gc.c (scm_i_tag_name): Add some tc7_hashtab cases. * libguile/init.c: Remove unused environments init functions. Remove call to hashtab_prehistory. * libguile/goops.h (scm_class_hashtable) * libguile/goops.c (scm_class_of, create_standard_classes): Have to make a class for hash tables manually, because they aren't smobs any more.
2009-12-03replace frame implementation with VM framesAndy Wingo1-2/+4
* libguile/stacks.h: Rework so that a stack doesn't copy information out of VM frames, it just holds onto a VM frame, along with the stack id and length. VM frames are now the only representation of frames in Guile. (scm_t_info_frame, SCM_FRAME_N_SLOTS, SCM_FRAME_REF, SCM_FRAME_NUMBER) (SCM_FRAME_FLAGS, SCM_FRAME_SOURCE, SCM_FRAME_PROC, SCM_FRAME_ARGS) (SCM_FRAME_PREV, SCM_FRAME_NEXT) (SCM_FRAMEF_VOID, SCM_FRAMEF_REAL, SCM_FRAMEF_PROC) (SCM_FRAMEF_EVAL_ARGS, SCM_FRAMEF_OVERFLOW) (SCM_FRAME_VOID_P, SCM_FRAME_REAL_P, SCM_FRAME_PROC_P) (SCM_FRAME_EVAL_ARGS_P, SCM_FRAME_OVERFLOW_P): Remove these macros corresponding to the old frame implementation. (scm_frame_p scm_frame_source, scm_frame_procedure) (scm_frame_arguments): These definitions are now in frames.h. (scm_last_stack_frame): Remove declaration of previously-removed constructor. Probably should re-instate it though. (scm_frame_number, scm_frame_previous, scm_frame_next) (scm_frame_real_p, scm_frame_procedure_p, scm_frame_evaluating_args_p) (scm_frame_overflow_p) : Remove these procedures corresponding to the old stack implementation. * libguile/stacks.c: Update for new frames implementation. * libguile/frames.h: * libguile/frames.c: Rename functions operating on VM frames to have a scm_frame prefix, not scm_vm_frame -- because they really are the only frames we have. Rename corresponding Scheme functions too, from vm-frame-foo to frame-foo. * libguile/deprecated.h: Remove scm_stack and scm_info_frame data types. * libguile/vm.c (vm_dispatch_hook): Adapt to scm_c_make_frame name change. * module/system/vm/frame.scm: No need to export functions provided frames.c now, as we load those procedures into the default environment now. Rename functions, and remove a couple of outdated, unused functions. The bottom half of this file is still bitrotten, though. * libguile/backtrace.c: Rework to operate on the new frame representation. Also fix a bug displaying file names for compiled procedures. * libguile/init.c: Load the VM much earlier, just because we can. Also it allows us to have frames.[ch] loaded in time for stacks to be initialized, so that scm_frame_arguments can do the right thing.
2009-12-03really boot primitive-eval from scheme.Andy Wingo1-2/+3
* libguile/eval.c (scm_primitive_eval, scm_c_primitive_eval): (scm_init_eval): Rework so that scm_primitive_eval always calls out to the primitive-eval variable. The previous definition is the default value, which is probably overridden by scm_init_eval_in_scheme. * libguile/init.c (scm_i_init_guile): Move ports and load-path up, so we can debug when initing eval. Call scm_init_eval_in_scheme. Awesome. * libguile/load.h: * libguile/load.c (scm_init_eval_in_scheme): New procedure, loads up ice-9/eval.scm to replace the primitive-eval definition, if everything is there and up-to-date. * libguile/modules.c (scm_module_transformer): Export to Scheme, so it's there for eval.go. * module/ice-9/boot-9.scm: No need to define module-transformer. * module/ice-9/eval.scm (capture-env): Only reference the-root-module if modules are booted. (primitive-eval): Inline a definition for identity. Throw a more standard error for "wrong number of arguments". * module/ice-9/psyntax.scm (chi-install-global): The macro binding for a syncase macro is now a pair: the transformer, and the module that was current when the transformer was installed. The latter is used for hygiene purposes, replacing the use of procedure-module, which didn't work with the interpreter's shared-code closures. (chi-macro): Adapt for the binding being a pair, and get the hygiene from the cdr. (eval-local-transformer): Adapt to new form of macro bindings. * module/ice-9/psyntax-pp.scm: Regenerated. * .gitignore: Ignore eval.go.stamp. * module/Makefile.am: Reorder for fastest serial compilation, now that there are no ordering constraints. I did a number of experiments here and this seems to be the best; but the bulk of the time is compiling psyntax-pp.scm with eval.scm. Not so great. * libguile/vm-engine.c (vm-engine): Throw a more standard error for "wrong type to apply". * test-suite/tests/gc.test ("gc"): Remove a hack that shouldn't affect the new evaluator, and throw in another (gc) for good measure. * test-suite/tests/goops.test ("defining classes"): * test-suite/tests/hooks.test (proc1): We can't currently check what the arity is of a closure made by eval.scm -- or more accurately all closures have 0 required args and no rest args. So punt for now. * test-suite/tests/syntax.test ("letrec"): The scheme evaluator can't check that a variable is unbound, currently; perhaps the full "fixing letrec" expansion could fix this. But barring that, punt.
2009-12-01apply goes to the vm, not the interpreterAndy Wingo1-2/+1
* libguile/eval.c (eval): Call scm_vm_apply instead of apply. (apply): Deleted, no longer referenced. Heh. (scm_apply): Call scm_vm_apply. * libguile/init.c (scm_i_init_guile): Bootstrap the VM before the evaluator. * libguile/vm.c (scm_vm_apply): Actually it's not necessary that the procedure is a program; so that's cool, relax the check.
2009-12-01promises are in their own file nowAndy Wingo1-0/+2
* libguile.h: * libguile/Makefile.am: * libguile/eval.c: * libguile/eval.h: * libguile/init.c: * libguile/promises.c: * libguile/promises.h: Split promises out into their own file.
2009-12-01new evaluator, y'allAndy Wingo1-0/+2
* libguile/eval.c: So, ladies & gents, a new evaluator. It's similar to the old one, in that we memoize and then evaluate, but in this incarnation, memoization of an expression happens before evaluation, not lazily as the expression is evaluated. This makes the evaluation itself much cleaner, in addition to being threadsafe. In addition, since this C evaluator will in the future just serve to bootstrap the Scheme evaluator, we don't have to pay much concern for debugging conveniences. So the environment is just a list of values, and the memoizer pre-computes where it's going to find each individual value in the environment. Interface changes are commented below, with eval.h. (scm_evaluator_traps): No need to reset the debug mode after rnning te traps thing. But really, the whole traps system needs some love. * libguile/memoize.h: * libguile/memoize.c: New memoizer, which runs before evaluation, checking all syntax before evaluation begins. Significantly, no debugging information is left for lexical variables, which is not so great for interactive debugging; perhaps we should change this to have a var list in the future as per the classic interpreters. But it's quite fast, and the resulting code is quite good. Also note that it doesn't produce ilocs, memoized code is a smob whose type is in the first word of the smob itself. * libguile/eval.h (scm_sym_and, scm_sym_begin, scm_sym_case) (scm_sym_cond, scm_sym_define, scm_sym_do, scm_sym_if, scm_sym_lambda) (scm_sym_let, scm_sym_letstar, scm_sym_letrec, scm_sym_quote) (scm_sym_quasiquote, scm_sym_unquote, scm_sym_uq_splicing, scm_sym_at) (scm_sym_atat, scm_sym_atapply, scm_sym_atcall_cc) (scm_sym_at_call_with_values, scm_sym_delay, scm_sym_eval_when) (scm_sym_arrow, scm_sym_else, scm_sym_apply, scm_sym_set_x) (scm_sym_args): Remove public declaration of these symbols. (scm_ilookup, scm_lookupcar, scm_eval_car, scm_eval_body) (scm_eval_args, scm_i_eval_x, scm_i_eval): Remove public declaration of these functions. (scm_ceval, scm_deval, scm_ceval_ptr): Remove declarations of these deprecated functions. (scm_i_print_iloc, scm_i_print_isym, scm_i_unmemocopy_expr) (scm_i_unmemocopy_body): Remove declarations of these internal functions. (scm_primitive_eval_x, scm_eval_x): Redefine as macros for their less destructive siblings. * libguile/Makefile.am: Add memoize.[ch] to the build. * libguile/debug.h (scm_debug_mode_p, scm_check_entry_p) (scm_check_apply_p, scm_check_exit_p, scm_check_memoize_p) (scm_debug_eframe_size): Remove these vars that were tied to the old evaluator's execution model. (SCM_RESET_DEBUG_MODE): Remove, no more need for this. (SCM_MEMOIZEDP, SCM_MEMOIZED_EXP, SCM_MEMOIZED_ENV): Remove macros referring to old memoized code representation. (scm_local_eval, scm_procedure_environment, scm_memoized_environment) (scm_make_memoized, scm_memoized_p): Remove functions operating on old memoized code representation. (scm_memcons, scm_mem_to_proc, scm_proc_to_mem): Remove debug-only code for old evaluator. * libguile/debug.c: Remove code to correspond with debug.h removals. (scm_debug_options): No need to set the debug mode or frame limit here, as we don't have C stack limits any more. Perhaps this is a bug, but as long as we can compile eval.scm, we should be fine. * libguile/init.c (scm_i_init_guile): Init memoize.c. * libguile/modules.c (scm_top_level_env, scm_env_top_level) (scm_env_module, scm_system_module_env_p): Remove these functions. * libguile/print.c (iprin1): No more need to handle isyms. Adapt to new form of interpreted procedures. * libguile/procprop.c (scm_i_procedure_arity): Adapt to new form of interpreted procedures. * libguile/procs.c (scm_thunk_p): Adapt to new form of interpreted procedures. * libguile/procs.h (SCM_CLOSURE_FORMALS): Removed, this exists no more. (SCM_CLOSURE_NUM_REQUIRED_ARGS, SCM_CLOSURE_HAS_REST_ARGS): New accessors. * libguile/srcprop.c (scm_source_properties, scm_source_property) (scm_set_source_property_x): Remove special cases for memoized code. * libguile/stacks.c (read_frame): Remove a source-property case for interpreted code. (NEXT_FRAME): Remove a case that I don't fully understand, that seems to be designed to skip over apply frames. Will be obsolete in the futures. (read_frames): Default source value for interpreted frames to #f. (narrow_stack): Don't pay attention to the system_module thing. * libguile/tags.h: Remove isyms and ilocs. Whee! * libguile/validate.h (SCM_VALIDATE_MEMOIZED): Fix to use the new MEMOIZED_P formulation. * module/ice-9/psyntax-pp.scm (do, quasiquote, case): Adapt for these no longer being primitive macros. * module/ice-9/boot-9.scm: Whitespace change, but just a poke to force a rebuild due to and/or/cond/... not being primitives any more. * module/ice-9/deprecated.scm (unmemoize-expr): Deprecate, it's unmemoize-expression now. * test-suite/tests/eval.test ("define set procedure-name"): XFAIL a couple of tests here; I don't know what to do about them. I reckon the expander should ensure that defined values are named. * test-suite/tests/chars.test ("basic char handling"): Fix expected exception when trying to apply a char.
2009-12-01factor copy-tree and cons-source out of eval.[ch]Andy Wingo1-0/+2
* libguile.h: * libguile/Makefile.am * libguile/init.c (scm_i_init_guile): Add trees.[ch] to the build. * libguile/eval.c: * libguile/eval.h: Remove scm_copy_tree and scm_cons_source... * libguile/trees.h: * libguile/trees.c: * libguile/srcprop.h: * libguile/srcprop.c: ... factoring them out here and here, respectively. * test-suite/tests/eval.test ("memoization"): Change expected exception for circular data structures, given new copy-tree location.
2009-11-15fold objects.[ch] into goops.[ch]Andy Wingo1-2/+0
Remove objects.h #includes as appropriate.
2009-10-30Since support for "futures" in C has been completely disabled for someKen Raeburn1-6/+0
time, and should be easily implementable in Scheme with the current thread support, delete the C code. * libguile/futures.c, libguile/futures.h: Delete. * libguile/Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Delete references to futures.* files. * libguile.h: Don't include futures.h. * libguile/eval.c: Don't include futures.h. (isymnames): Delete "#@future" entry. (scm_m_future, s_future, scm_sym_future, unmemoize_future, unmemoize_builtin_macro): Delete disabled futures code. * libguile/eval.i.c (CEVAL): Delete disabled futures code. * libguile/init.c: Don't include futures.h. (scm_i_init_guile): Delete disabled futures initialization call. * libguile/tags.h (SCM_IM_FUTURE): Delete. (SCM_IM_CALL_WITH_VALUES, SCM_IM_ELSE, SCM_IM_ARROW, SCM_IM_NIL_COND, SCM_IM_BIND): Renumber. * doc/ref/api-scheduling.texi: Delete commented-out node on Futures. * doc/maint/guile.texi: Delete make-future and future-ref mentions.
2009-09-14Merge `libguile-i18n' into `libguile'.Ludovic Courtès1-0/+2
* GUILE-VERSION (LIBGUILE_I18N_MAJOR, LIBGUILE_I18N_INTERFACE_CURRENT, LIBGUILE_I18N_INTERFACE_REVISION, LIBGUILE_I18N_INTERFACE_AGE, LIBGUILE_I18N_INTERFACE): Remove. * doc/ref/api-i18n.texi (i18n Introduction): Don't mention `libguile-i18n'. * libguile.h: Include "libguile/i18n.h". * libguile/Makefile.am (lib_LTLIBRARIES): Remove `libguile-i18n-v*'. (libguile_la_SOURCES): Add `i18n.c'. (libguile_i18n_v_*_SOURCES, libguile_i18n_v_*_CFLAGS, libguile_i18n_v_*_LIBADD, libguile_i18n_v_*_LDFLAGS): Remove. * libguile/i18n.c (scm_bootstrap_i18n): New function. * libguile/i18n.h (scm_nl_langinfo, scm_init_i18n): Made internal. (scm_bootstrap_i18n): New declaration. * libguile/init.c (scm_i_init_guile): Invoke `scm_bootstrap_i18n ()'. * module/ice-9/i18n.scm: Load from `libguile' instead of `libguile-i18n-v-0'.
2009-08-28Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès1-8/+19
Conflicts: libguile/Makefile.am libguile/bytevectors.c libguile/gc-card.c libguile/gc-mark.c libguile/programs.c libguile/srcprop.c libguile/srfi-14.c libguile/symbols.c libguile/threads.c libguile/unif.c libguile/vm.c
2009-08-18Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès1-7/+10
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-07-19add registry of vector constructors, make-generalized-vectorAndy Wingo1-11/+13
* libguile/generalized-vectors.h: * libguile/generalized-vectors.c: Add a registry of vector constructors. (scm_make_generalized_vector): New public function, constructs a vector of a given type. * libguile/bitvectors.c: * libguile/bytevectors.c: * libguile/srfi-4.c: * libguile/strings.c: * libguile/vectors.c: Register vector constructors. * libguile/extensions.c (scm_init_extensions): No need to NULL the list of registered extensions here, the static init does it for us. Allows scm_c_register_extension to be called before scm_init_extensions. * libguile/init.c (scm_i_init_guile): Move array initialization earlier, so e.g. scm_init_strings has access to a valid list of array element types when registering its vector constructor.
2009-07-19uniform vector functions to their own fileAndy Wingo1-0/+2
* libguile/uniform.c: * libguile/uniform.h: * libguile/srfi-4.c: * libguile/srfi-4.h: * libguile/Makefile.am: Move uniform vector funcs out of srfi-4 to their own file. * libguile.h: * libguile/arrays.c: * libguile/bytevectors.c: Update includers.
2009-07-19generic vector ops to own fileAndy Wingo1-0/+2
* libguile/Makefile.am: * libguile/vectors.c: * libguile/vectors.h: * libguile/generalized-vectors.c: * libguile/generalized-vectors.h: Move generic vector ops off into their own file too. The implementation is now based on the generic array-handle infrastructure. * libguile.h: * libguile/array-map.c: * libguile/bitvectors.c: * libguile/random.c: * libguile/srfi-4.c: Update includers.
2009-07-19move generic array foo out to its own fileAndy Wingo1-0/+2
* libguile/arrays.h: * libguile/arrays.c: * libguile/generalized-arrays.h: * libguile/generalized-arrays.c: Move some generic functionality out of arrays.c to a new file. * libguile/array-map.c: * libguile/deprecated.c: * libguile/init.c: Update includers.
2009-07-19rename unif.[ch] to arrays.[ch]Andy Wingo1-2/+2
* libguile/Makefile.am: * libguile/unif.c: * libguile/unif.h: * libguile/arrays.c: * libguile/arrays.h: Rename unif.[ch] to arrays.[ch]. * libguile.h: * libguile/array-handle.c: * libguile/array-map.c: * libguile/bitvectors.c: * libguile/bytevectors.c: * libguile/eq.c: * libguile/gc-card.c: * libguile/gc-malloc.c: * libguile/gc-mark.c: * libguile/gc.c: * libguile/init.c: * libguile/inline.h: * libguile/print.c: * libguile/random.c: * libguile/read.c: * libguile/socket.c: * libguile/sort.c: * libguile/srfi-4.c: * libguile/srfi-4.h: * libguile/strports.c: * libguile/vectors.c: * libguile/vectors.h: Update includers.
2009-07-19bitvector exodus from unif.[ch]Andy Wingo1-0/+2
* libguile/Makefile.am: * libguile/unif.c: * libguile/unif.h: * libguile/bitvectors.c: * libguile/bitvectors.h: Move bitvector functionality out of unif.[ch]. * libguile/array-handle.c: * libguile/array-map.c: * libguile/init.c: * libguile/read.c: * libguile/srfi-4.c: * libguile/vectors.c: Oh, what a tangled web we weave...
2009-07-19parts of unif.[ch] to array-handle.[ch]Andy Wingo1-0/+1
* libguile/array-handle.c: * libguile/array-handle.h: Move some parts of unif.c and unif.h to these new files. * libguile/unif.c: * libguile/unif.h: Update includers. Since unif.h depends on the array handle type, we include array-handle.h, which also means that there will be no difference for our callers. * libguile/init.c: Call scm_init_array_handle, though it does nothing as of yet. * libguile/Makefile.am: Adapt for new files.
2009-07-19rename ramap.[ch] to array-map.[ch]Andy Wingo1-2/+2
* libguile/array-map.c: * libguile/array-map.h: Rename from ramap.c and ramap.h. * libguile.h: * libguile/Makefile.am: * libguile/eq.c: * libguile/init.c: * libguile/sort.c: * libguile/unif.c: * libguile/vectors.c: All referrers changed.
2009-06-22Always create the bytevector SMOB type.Ludovic Courtès1-0/+2
* libguile/bytevectors.c (scm_tc16_bytevector, print_bytevector, bytevector_equal_p, free_bytevector): Don't use the snarfing macros. (scm_bootstrap_bytevectors): New. (scm_init_bytevectors): No longer initialize SCM_NULL_BYTEVECTOR, which is done by `scm_bootstrap_bytevectors ()'. * libguile/bytevectors.h (scm_bootstrap_bytevectors): New declaration. (scm_init_bytevectors): Made internal. This can be done because we explicitly register it with `scm_c_register_extension ()' in `scm_bootstrap_bytevectors ()'. * libguile/init.c (scm_i_init_guile): Call `scm_bootstrap_bytevectors ()'. This is so that expressions like "(generalized-vector-length #vu8())" work even when `(rnrs bytevector)' hasn't been loaded.
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/* )
2009-06-03add exception_on_error optional arg to primitive-load-pathAndy Wingo1-1/+1
* libguile/init.c (scm_load_startup_files): Use scm_c_primitive_load_path. * libguile/load.c (scm_primitive_load_path): Add an optional arg, exception_on_error, which if #f will cause primitive-load-path to just return #f if no file is found. This is to help out the semantics of try-module-autoload. We can't just catch misc-error, because loading the file could raise any exception. (scm_c_primitive_load_path): Add the extra arg to scm_primitive_load_path. * libguile/load.h: Adapt scm_primitive_load_path prototype. * module/ice-9/boot-9.scm (try-module-autoload): Refactor slightly to be clearer.
2009-03-22Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès1-1/+4
Conflicts: libguile/continuations.c libguile/gc-freelist.c libguile/gc-mark.c libguile/symbols.c libguile/threads.c module/ice-9/boot-9.scm
2009-03-17Merge commit 'e092357058850a6f998bf462bdc5504c6379c96f' into vm-checkAndy Wingo1-2/+1
2009-02-14Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès1-2/+1
Conflicts: libguile/gc-mark.c libguile/procs.c libguile/procs.h libguile/threads.c libguile/threads.h
2009-02-12Use double-cells to store subrs.Ludovic Courtès1-2/+1
* libguile/procs.c (scm_subr_table, scm_subr_table_size, scm_subr_table_room, subr_table_gc_hint, scm_init_subr_table, scm_mark_subr_table): Remove. (scm_c_make_subr): Simply return a double-cell, with the procedure name and properties stored in a two-element array. (scm_free_subr_entry): Free the meta-info slot. * libguile/init.c (scm_i_init_guile): Remove call to `scm_init_subr_table ()'. * libguile/procs.h (SCM_SUBR_META_INFO): New macro. (SCM_SNAME, SCM_SUBR_PROPS): Use it. (SCM_SUBR_GENERIC, SCM_SET_SUBR_GENERIC, SCM_SET_SUBR_GENERIC_LOC): Update. (scm_t_subr_entry, SCM_SUBR_ENTRY, SCM_SUBRNUM, scm_subr_table, scm_mark_subr_table, scm_init_subr_table): Remove.
2008-09-30Merge commit 'origin/master' into vmAndy Wingo1-1/+1
Conflicts: doc/Makefile.am ice-9/Makefile.am libguile/gc.c
2008-09-13Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès1-1/+1
Conflicts: lib/Makefile.am libguile/gc-card.c libguile/gc-freelist.c libguile/gc-mark.c libguile/gc-segment.c libguile/gc.c libguile/gc.h libguile/gc_os_dep.c libguile/private-gc.h m4/.cvsignore m4/gnulib-cache.m4 m4/gnulib-comp.m4
2008-09-13Include <config.h> in all C files; use `#ifdef HAVE_CONFIG_H' rather than `#if'.Ludovic Courtès1-1/+1
2008-09-10Merge commit '29776e85da637ec4d44b2b2822d6934a50c0084b' into ↵Ludovic Courtès1-1/+9
boehm-demers-weiser-gc Conflicts: libguile/gc-card.c libguile/gc.c libguile/gc.h libguile/ports.c
2008-09-10Merge commit '032913739218c756f673bfb9c8f66ef9f8f02330' into ↵Ludovic Courtès1-0/+1
boehm-demers-weiser-gc Conflicts: libguile/gc.c libguile/srcprop.c libguile/srcprop.h
2008-09-10Merge commit 'f30e1bdf97ae8b2b2918da585f887a4d3a23a347' into ↵Ludovic Courtès1-2/+8
boehm-demers-weiser-gc Conflicts: libguile/Makefile.am libguile/coop-pthreads.c libguile/gc-freelist.c libguile/gc-segment.c libguile/gc.c libguile/private-gc.h test-suite/tests/environments.nottest
2008-09-10Moved weak pair code into `weaks.[ch]'.Ludovic Courtes1-1/+3
* libguile/hashtab.c: Don't include <gc/gc_typed.h> and <gc/gc.h>. Updated users of weak (wcar_cell_descr): Removed. (wcdr_cell_descr): Removed. (scm_weak_car_cell): Removed. (scm_weak_cdr_cell): Removed. (scm_doubly_weak_cell): Removed. (SCM_WEAK_CELL_*_DELETED_P): Removed. (SCM_WEAK_CELL_WORD): Removed. (SCM_WEAK_CELL_C[AD]R): Removed. (scm_hashtab_prehistory): Don't initialize weak pairs. * libguile/init.c (scm_i_init_guile): Invoke `scm_weaks_prehistory ()' before `scm_hashtab_prehistory ()' in order to initialize weak pairs. * libguile/weaks.c: Include <gc/gc.h> and <gc/gc_typed.h>. (wc[ad]r_cell_descr): New. (scm_weak_c[ad]r_pair): New. (scm_doubly_weak_pair): New. (scm_weaks_prehistory): New. * libguile/weaks.h (scm_weak_c[ad]r_pair): New declaration. (scm_doubly_weak_pair): New declaration. (SCM_WEAK_PAIR_WORD_DELETED_P): New. (SCM_WEAK_PAIR_CAR_DELETED_P): New. (SCM_WEAK_PAIR_CDR_DELETED_P): New. (SCM_WEAK_PAIR_DELETED_P): New. (SCM_WEAK_PAIR_WORD): New. (SCM_WEAK_PAIR_CAR): New. (SCM_WEAK_PAIR_CDR): New. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-39
2008-09-07allow boot-9.go load if availableAndy Wingo1-1/+1
* libguile/init.c (scm_load_startup_files): Don't specify the .scm suffix, so as to allow loading a boot-9.go if appropriate.
2008-09-05First stab at the guardian implementation. Works fine at first glance!Ludovic Courtes1-1/+1
* libguile/guardians.c: Overhauled. Removed the `tconc' structure. Much, much, simpler. (finalize_guarded): New function. * libguile/init.c (scm_i_init_guile): Call `scm_init_guardians ()'. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-11
2008-09-05Merge from lcourtes@laas.fr--2005-mobileLudovic Courtes1-1/+1
Patches applied: * lcourtes@laas.fr--2005-mobile/guile-core--boehm-gc--1.9 (base, patch 1) - tag of lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--base-0 - Initial hack for Boehm's GC support: nothing works. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-1
2008-08-21merge guile-vm into libguile itselfAndy Wingo1-0/+3
* ice-9/boot-9.scm: Only define load-compiled as #f if it's not already defined, which won't normally be the case. * libguile/guile-vm.c: Removed, there's no more guile-vm binary. * libguile/frames.c: (with change frame? -> heap-frame?) * libguile/frames.h: * libguile/instructions.c: * libguile/instructions.h: * libguile/objcodes.c: * libguile/objcodes.h: * libguile/programs.c: * libguile/programs.h: * libguile/vm-bootstrap.h: (was bootstrap.h) * libguile/vm-engine.c: (was vm_engine.c) * libguile/vm-engine.h: (was vm_engine.h) * libguile/vm-expand.h: (was vm_expand.h) * libguile/vm-i-loader.c: (was vm_loader.c) * libguile/vm-i-scheme.c: (was vm_scheme.c) * libguile/vm-i-system.c: (was vm_system.c) * libguile/vm.c: * libguile/vm.h: These files moved here from src/, as guile-vm is now a part of libguile. * libguile/init.c: Bootstrap the VM. Yay! * libguile/Makefile.am: The necessary chicanery here. * module/system/vm/Makefile.am: * module/system/vm/bootstrap.scm: * module/system/vm/frame.scm: * module/system/vm/instruction.scm: * module/system/vm/objcode.scm: * module/system/vm/program.scm: * module/system/vm/vm.scm: * pre-inst-guile-env.in: Add builddirs to the load path; add module/ to the path in the empty-$GUILE_LOAD_PATH case as well. * src/Makefile.am: Moved out everything except guilec and guile-disasm, which probably should be moved to the scripts directory? * testsuite/Makefile.am: Update to find guile-vm in the right place. * module/system/vm/Makefile.am: * module/system/vm/bootstrap.scm: Removed bootstrap.scm, scm_init_guile handles the bootstrapping for us. * module/system/vm/frame.scm: * module/system/vm/instruction.scm: * module/system/vm/objcode.scm: * module/system/vm/program.scm: * module/system/vm/vm.scm: Call the init functions in libguile; should fix at some point to avoid the dlopen?
2007-08-26(cleanup_for_exit): abort cleanup if init_mutex is stillHan-Wen Nienhuys1-1/+9
held.
2007-01-22* backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.cHan-Wen Nienhuys1-0/+1
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.