summaryrefslogtreecommitdiff
path: root/libguile/deprecated.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-23Remove unused CPP defines naming <method> slotsAndy Wingo1-0/+1
* libguile/goops.h (scm_si_generic_function, scm_si_specializers) (scm_si_procedure, scm_si_formals, scm_si_body) (scm_si_make_procedure): Remove unused CPP defines.
2015-01-23Deprecate scm_no_applicable_method C exportAndy Wingo1-0/+9
* libguile/deprecated.c (scm_init_deprecated_goops) (scm_no_applicable_method): * libguile/goops.h: * libguile/goops.c (scm_no_applicable_method) (scm_sys_goops_early_init): Deprecate scm_no_applicable_method C export.
2015-01-23Deprecate scm_basic_make_classAndy Wingo1-1/+12
* libguile/deprecated.h: * libguile/deprecated.c (scm_basic_make_class): Deprecate. * libguile/goops.c: * libguile/goops.h (scm_make_standard_class): New internal helper. It's a better spelling, as it matches make-standard-class, and is internal so as not to cause confusion between boot GOOPS helpers and "real" GOOPS interfaces.
2015-01-23Deprecate C interfaces scm_compute_applicable_methods, scm_find_methodAndy Wingo1-0/+229
* libguile/deprecated.h: * libguile/deprecated.c (scm_compute_applicable_methods): Deprecate. This was the boot version of compute-applicable-methods, not the full version; the right thing to do is to call scheme. (scm_find_method): Deprecate. Again, the right thing is to do this on the Scheme level. * libguile/goops.c: * libguile/goops.h: Deprecated code moved to deprecated.[ch].
2014-03-22Out-of-memory situations raise exceptions instead of abortingAndy Wingo1-1/+16
* libguile/gc.c (scm_oom_fn, scm_init_gc): Install an out-of-memory handler that raises an unwind-only out-of-memory exception. (scm_gc_warn_proc, scm_init_gc): Install a warning proc that tries to print to the current warning port, if the current warning port is a file port. (scm_gc_after_nonlocal_exit): New interface. Should be called after a nonlocal return to potentially collect memory; otherwise allocations could try to expand again when they should collect. * libguile/continuations.c (scm_i_make_continuation): * libguile/eval.c (eval): * libguile/throw.c (catch): * libguile/vm.c (scm_call_n): Call scm_gc_after_nonlocal_exit after nonlocal returns. * libguile/throw.c (abort_to_prompt, throw_without_pre_unwind): Rework to avoid allocating memory. (scm_report_out_of_memory): New interface. (scm_init_throw): Pre-allocate the arguments for stack-overflow and out-of-memory errors. * module/ice-9/boot-9.scm: Add an out-of-memory exception printer. * module/system/repl/error-handling.scm (call-with-error-handling): Add out-of-memory to the report-keys set. * libguile/gc-malloc.c (scm_realloc): Call scm_report_out_of_memory if realloc fails. * libguile/error.h: * libguile/error.c: * libguile/deprecated.h: * libguile/deprecated.c (scm_memory_error): Deprecate. * test-suite/standalone/Makefile.am: * test-suite/standalone/test-out-of-memory: New test case.
2013-11-27Remove generalized vector interface; deprecated in 2.0 already.Andy Wingo1-83/+0
* libguile/deprecated.c: Remove the generalized-vector interface, deprecated since 2.0.8.
2013-02-18Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo1-1/+83
Conflicts: libguile/array-handle.c libguile/deprecated.h libguile/inline.c libguile/inline.h module/ice-9/deprecated.scm module/language/tree-il/peval.scm
2013-02-18deprecate generalized vectors in favor of arraysAndy Wingo1-1/+83
* libguile/generalized-arrays.h: * libguile/generalized-arrays.c (scm_c_array_length): (scm_array_length): New functions. * module/ice-9/deprecated.scm: * libguile/generalized-vectors.c: * libguile/generalized-vectors.h: * libguile/deprecated.h: * libguile/deprecated.c (scm_generalized_vector_p) (scm_generalized_vector_length, scm_generalized_vector_ref) (scm_generalized_vector_set_x, scm_generalized_vector_to_list): Deprecate. * libguile/uniform.c (scm_uniform_vector_to_list): Use scm_array_to_list. * module/ice-9/boot-9.scm (case): Arrays are generalized vectors. * module/srfi/srfi-4/gnu.scm (define-any->vector): Use the array functions instead of the generalized-vector functions. * test-suite/tests/arrays.test: Remove generalized-vector->list test; covered by array->list test. * test-suite/tests/bitvectors.test: * test-suite/tests/bytevectors.test: * test-suite/tests/srfi-4.test: Adapt to test using array interfaces instead of generalized-vector interfaces. * doc/ref/api-compound.texi: Remove generalized vector docs. * doc/ref/api-data.texi: * doc/ref/srfi-modules.texi: Adapt.
2012-07-06deprecate struct-vtable-tagAndy Wingo1-0/+17
* libguile/deprecated.c: * libguile/deprecated.h: * libguile/struct.c: * libguile/struct.h: * doc/ref/api-compound.texi: Deprecate struct-vtable-tag.
2012-06-08Fix invalid use of `SCM' as a Boolean.Ludovic Courtès1-2/+2
* libguile/deprecated.c (scm_sym2var): Check `scm_is_true (definep)'.
2012-05-23Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo1-1/+2
This commit removes code that was newly deprecated in stable-2.0. Conflicts: libguile/deprecated.c libguile/deprecated.h libguile/modules.c module/ice-9/boot-9.scm module/ice-9/deprecated.scm
2012-05-23finish deprecating eval closuresAndy Wingo1-0/+79
* libguile/deprecated.h: * libguile/deprecated.c (scm_eval_closure_lookup) (scm_standard_eval_closure, scm_standard_interface_eval_closure) (scm_eval_closure_module): Deprecate these, as they are unused. * libguile/modules.h: * libguile/modules.c: Remove deprecated code. * module/oop/goops/util.scm (top-level-env, top-level-env?): Deprecate. * module/ice-9/deprecated.scm (set-system-module!): Deprecate. (module-eval-closure): Deprecate, by overriding the core definition to return a fresh eval closure. * module/ice-9/boot-9.scm (make-module): Don't set an eval closure on the module. (the-root-module, the-scm-module): Don't call set-system-module!.
2012-05-23deprecate lookup closuresAndy Wingo1-0/+49
* libguile/deprecated.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): * libguile/deprecated.c (scm_lookup_closure_module): (scm_module_lookup_closure): (scm_current_module_lookup_closure): Deprecate this part of the eval closure interface. It was unused internally, after the scm_sym2var refactor. * libguile/eval.h: * libguile/modules.c: * libguile/modules.h: Remove deprecated code. * libguile/goops.c (scm_ensure_accessor): Use scm_module_variable instead of calling the lookup closure. However I'm not sure that this code is used at all.
2012-05-23deprecate scm_sym2varAndy Wingo1-1/+59
* libguile/deprecated.h: * libguile/deprecated.c (scm_sym2var): Deprecate this function. * libguile/modules.h: * libguile/modules.c (scm_module_ensure_local_variable): New public function, replacing scm_sym2var with a true definep, without going through eval closures (which are deprecated). (scm_current_module): Rework to do something sensible before modules are booted. (scm_module_lookup, scm_lookup): Refactor to use scm_module_variable. (scm_module_define, scm_define): Refactor to use scm_module_ensure_local_variable. * libguile/vm-i-system.c (define!): Use scm_define. * libguile/vm.c (resolve_variable): Use scm_module_lookup. * libguile/macros.c (scm_make_syntax_transformer): Use scm_module_variable. * libguile/gdbint.c (gdb_binding): Use scm_define. * doc/ref/api-modules.texi (Accessing Modules from C): Add docs for scm_module_ensure_local_variable.
2012-01-08deprecate SCM_ASRTGOAndy Wingo1-0/+12
* libguile/deprecated.h: Mark scm_immutable_cell and scm_immutable_double_cell as being SCM_DEPRECATED, not SCM_API. Deprecate SCM_ASRTGO. * libguile/deprecated.c (scm_i_deprecated_asrtgo): New support procedure. * doc/ref/api-control.texi (Handling Errors): Remove ASRTGO docs.
2011-10-22Fix compilation of `deprecated.c' with SCM_DEBUG_TYPING_STRICTNESS=2.Ludovic Courtès1-5/+5
* libguile/deprecated.c (init_module_stuff, scm_primitive_make_property): Use `scm_is_false' instead of direct comparison to SCM_BOOL_F'. (maybe_close_port, scm_close_all_ports_except): Use `SCM2PTR' and `PTR2SCM' instead of wild casts.
2011-06-30fix --disable-modules buildAndy Wingo1-1/+9
* configure.ac (HAVE_MODULES): Define HAVE_MODULES iff --enable-modules. * libguile/deprecated.c (scm_dynamic_args_call) * libguile/extensions.c (load_extension): * libguile/init.c (scm_i_init_guile): Use HAVE_MODULES in a few places.
2011-05-26Merge remote-tracking branch 'local-2.0/stable-2.0'Andy Wingo1-0/+22
2011-05-26deprecate scm_immutable_{double_,}cellAndy Wingo1-0/+22
* libguile/inline.h: * libguile/deprecated.h: * libguile/deprecated.c (scm_immutable_cell, scm_immutable_double_cell): Deprecate these, as the GC_STUBBORN API doesn't do anything any more. * libguile/strings.c (scm_i_c_make_symbol): Change the one use of scm_immutable_double_cell to scm_double_cell.
2011-05-13merge strictness branch from 2.0Andy Wingo1-0/+26
2011-05-13deprecate scm_internal_dynamic_windAndy Wingo1-0/+23
* libguile/dynwind.c: * libguile/dynwind.h: * libguile/deprecated.h (scm_t_inner): * libguile/deprecated.c (scm_internal_dynamic_wind): Deprecate, as the scm_dynwind API is better, and this API encourages users to stuff SCM values into pointers.
2011-05-12remove all deprecated codeAndy Wingo1-2546/+0
* libguile/async.c: * libguile/async.h: * libguile/debug.h: * libguile/deprecated.c: * libguile/deprecated.h: * libguile/evalext.h: * libguile/gc-malloc.c: * libguile/gc.h: * libguile/gen-scmconfig.c: * libguile/numbers.c: * libguile/ports.c: * libguile/ports.h: * libguile/procprop.c: * libguile/procprop.h: * libguile/read.c: * libguile/socket.c: * libguile/srfi-4.h: * libguile/strings.c: * libguile/strings.h: * libguile/tags.h: * module/ice-9/boot-9.scm: * module/ice-9/deprecated.scm: Remove all deprecated code. CPP defines that were not previously issuing warnings were changed so that their expansions would indicate the replacement forms to use, e.g. scm_sizet__GONE__REPLACE_WITH__size_t. The two exceptions were SCM_LISTN, which did not produce warnings before, and the string-filter argument order stuff. Drops the initial dirty memory usage of Guile down to 2.8 MB on my machine, from 4.4 MB.
2011-05-01deprecate scm_struct_tableAndy Wingo1-0/+14
* libguile/goops.h: * libguile/goops.c (scm_i_define_class_for_vtable): New internal helper, defines a class for a vtable, relying on the name slot being set correctly. (scm_class_of, create_struct_classes): Use the local vtable-to-class map instead of scm_struct_table. * libguile/struct.h (SCM_STRUCT_TABLE_NAME, SCM_SET_STRUCT_TABLE_NAME) (SCM_STRUCT_TABLE_CLASS, SCM_SET_STRUCT_TABLE_CLASS, scm_struct_table) (scm_struct_create_handle): Deprecate these internals of the map between structs and classes. * libguile/deprecated.h: * libguile/deprecated.c (scm_struct_create_handle): Deprecated code over here now.
2011-05-01deprecated primitive-properties don't get handles from weak hash tablesAndy Wingo1-19/+16
* libguile/deprecated.c (scm_primitive_property_ref) (scm_primitive_property_set_x): Avoid getting handles to elements in a weak hash table, as that's not going to work very well.
2011-05-01deprecate scm_whash APIAndy Wingo1-0/+64
* libguile/deprecated.h: * libguile/deprecated.c (scm_whash_get_handle, SCM_WHASHFOUNDP) (SCM_WHASHREF, SCM_WHASHSET, scm_whash_create_handle) (scm_whash_lookup, scm_whash_insert): Deprecate this API. * libguile/srcprop.c: * libguile/srcprop.h: * libguile/read.c (scm_read_sexp): Use the hashq API instead of the whash API.
2011-03-20Make VM string literals immutable.Ludovic Courtès1-1/+1
* libguile/strings.c (scm_i_make_string, scm_i_make_wide_string): Add `read_only_p' parameter. All callers updated. * libguile/vm-i-loader.c (load_string, load_wide_string): Push read-only strings. * test-suite/tests/strings.test ("literals"): New test prefix.
2011-02-10deprecate primitive propertiesAndy Wingo1-1/+112
* libguile.h: * libguile/Makefile.am: * libguile/deprecated.h: * libguile/deprecated.c: * libguile/init.c: * libguile/properties.c: * libguile/properties.h: Deprecate the "primitive properties" interface. It was only used to implement object properties, and that is no longer the case. * module/ice-9/boot-9.scm (make-object-property): Reimplement just in terms of weak hash tables, and make threadsafe. * NEWS: * doc/ref/api-utility.texi: Update.
2011-02-09fix typos in the manual bits generated from source comments.Ralf Wildenhues1-1/+1
* libguile/bitvectors.c, libguile/chars.c, libguile/deprecated.c, libguile/numbers.c, libguile/random.c, libguile/read.c, libguile/root.c, libguile/srfi-1.c, libguile/srfi-13.c, libguile/srfi-14.c, libguile/uniform.c: Fix typos, add missing newlines.
2010-11-18deprecate cuseridAndy Wingo1-0/+29
* libguile/posix.c: * libguile/posix.h: * libguile/deprecated.h: * libguile/deprecated.c (scm_cuserid): Deprecate cuserid, as it only returns 8 bytes of a user's login. * doc/ref/posix.texi: Remove cuserid from docs.
2010-08-08remove "discouraged" infrastructureAndy Wingo1-1/+27
* libguile/discouraged.h: Remove. * libguile/deprecated.c (scm_internal_select, scm_thread_sleep) (scm_thread_usleep): Deprecate formerly discouraged names. * libguile/eq.h (SCM_EQ_P): * libguile/pairs.h (SCM_NULLP, SCM_NNULLP, SCM_CONSP, SCM_NCONSP): * libguile/boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL): (SCM_NEGATE_BOOL, SCM_BOOL_NOT): Undiscourage these names, because I'm not sure deprecating them will do any good. * libguile.h: * libguile/gen-scmconfig.c: * libguile/numbers.c: * libguile/init.c: * libguile/Makefile.am: * configure.ac: Remove bits that referenced discouraged.h, and dealt with the "discouraging" system.
2010-08-08deprecated all discouraged functionsAndy Wingo1-0/+349
* libguile/Makefile.am: * libguile/discouraged.c: Remove discouraged.c. * libguile/deprecated.c: * libguile/deprecated.h: * libguile/discouraged.h: All functions and declarations moved from discouraged.[ch] to deprecated.[ch], adding deprecation warnings. * libguile/init.c: Remove discouraged init. * libguile/numbers.c (scm_num2float, scm_num2double): Deprecate. * test-suite/standalone/test-num2integral.c: Port to modern API.
2010-07-28Use "pointer" instead of "foreign" when dealing with wrapped pointers.Ludovic Courtès1-2/+2
* libguile/foreign.h (scm_t_foreign_finalizer): Rename to... (scm_t_pointer_finalizer): ... this. (SCM_FOREIGN_P): Rename to... (SCM_POINTER_P): this. (SCM_VALIDATE_FOREIGN): Rename to... (SCM_VALIDATE_POINTER): ... this. (SCM_FOREIGN_HAS_FINALIZER): Rename to... (SCM_POINTER_HAS_FINALIZER): ... this. (scm_take_foreign_pointer): Rename to... (scm_from_pointer): ... this. (scm_foreign_address): Rename to... (scm_pointer_address): ... this. (scm_foreign_to_bytevector): Rename to... (scm_pointer_to_bytevector): ... this. (scm_foreign_set_finalizer_x): Rename to... (scm_set_pointer_finalizer_x): ... this. (scm_bytevector_to_foreign): Rename to... (scm_bytevector_to_pointer): ... this. (scm_i_foreign_print): Rename to... (scm_i_pointer_print): ... this. * libguile/foreign.c: Update accordingly. * libguile/tags.h (scm_tc7_foreign): Rename to... (scm_tc7_pointer): ... this. * libguile/foreign.c, libguile/deprecated.c, libguile/dynl.c, libguile/evalext.c, libguile/gc.c, libguile/goops.c, libguile/gsubr.c, libguile/gsubr.h, libguile/print.c, libguile/snarf.h, libguile/vm-i-system.c, module/system/foreign.scm, test-suite/standalone/test-ffi, test-suite/tests/foreign.test: Update accordingly.
2010-07-26Simplify the (system foreign) API.Ludovic Courtès1-2/+2
Suggested by Neil Jerram. * libguile/foreign.h (SCM_FOREIGN_TYPE, SCM_FOREIGN_VALUE_REF, SCM_FOREIGN_VALUE_SET, SCM_FOREIGN_LEN, SCM_FOREIGN_TYPED_P, SCM_FOREIGN_VALUE_P, SCM_VALIDATE_FOREIGN_VALUE, scm_foreign_set_x, scm_foreign_type): Remove. (scm_foreign_ref): Rename to... (scm_foreign_address): ... this. (scm_take_foreign_pointer): Update. (SCM_FOREIGN_POINTER): Remove CTYPE argument. Update callers. (scm_make_pointer): New declaration. * libguile/foreign.c (scm_to_uintptr, scm_from_uintptr): New macros. (scm_make_pointer): New function. (scm_take_foreign_pointer): Remove TYPE and LEN arguments. Update callers. (scm_foreign_ref): Remove to... (scm_foreign_address): ... this. Remove type-related code. (scm_foreign_set_x): Remove. (scm_foreign_to_bytevector): Change argument order; make LEN argument compulsory. (scm_i_foreign_print): Remove type printing. (unpack): Remove foreign-type checking. * libguile/deprecated.c (scm_dynamic_args_call): Update accordingly. * libguile/dynl.c (scm_dynamic_pointer): Remove the TYPE and LEN arguments; update callers. Update to the new foreign API. * libguile/dynl.h (scm_dynamic_pointer): Update. * libguile/gsubr.c (create_gsubr): Update to the new foreign API. * libguile/gsubr.h (SCM_SUBRF, SCM_SUBR_GENERIC): Ditto. * libguile/snarf.h (SCM_IMMUTABLE_FOREIGN): Ditto. * libguile/vm-i-system.c (subr_call): Ditto. * module/system/foreign.scm (null-pointer?): New procedure. * test-suite/standalone/test-ffi: Update to the new `bytevector->foreign' signature. * test-suite/tests/foreign.test ("null pointer")["null pointer identity", "null-pointer? %null-pointer"]: New tests. ["foreign-set! other-null-pointer", "foreign->bytevector other-null-pointer"]: Remove. ("make-pointer", "foreign<->bytevector"): New test prefixes.
2010-06-19deprecate the-last-stackAndy Wingo1-0/+49
* libguile/backtrace.h (scm_the_last_stack_fluid_var) * libguile/backtrace.c (scm_init_backtrace): No more scm_the_last_stack_fluid_var. The replacement is to resolve `the-last-stack' in (ice-9 stack-catch). (scm_backtrace_with_highlights): Accordingly, instead of backtracing the last stack, backtrace the current stack. * libguile/throw.h: * libguile/throw.c: * libguile/deprecated.h: * libguile/deprecated.c (scm_internal_stack_catch): Deprecate this function. * module/ice-9/save-stack.scm (the-last-stack): Move here from boot-9. * module/ice-9/debug.scm: * module/ice-9/debugger.scm: Use (ice-9 save-stack) for the-last-stack. * module/ice-9/deprecated.scm (the-last-stack): Add deprecated shim.
2010-05-13scm_badargsp is deprecatedAndy Wingo1-0/+21
* libguile/eval.h: * libguile/eval.c: * libguile/deprecated.h * libguile/deprecated.c (scm_badargsp): Deprecate scm_badargsp.
2010-04-02deprecate dynamic-args-call, and update docs some moreAndy Wingo1-0/+40
* libguile/deprecated.h (scm_dynamic_args_call): Deprecate. * libguile/deprecated.c: * libguile/dynl.h: * libguile/dynl.c: * doc/ref/api-foreign.texi: More doc updates.
2010-04-01more fixes to equal? for arraysAndy Wingo1-0/+10
* libguile/array-map.c (array_compare, scm_array_equal_p): Rewrite as something that operates on the generic array handle infrastructure. Based on array->list. (scm_i_array_equal_p): Change the docs, as array-equal? is now the same as equal?, except that it typechecks its args. * doc/ref/api-compound.texi (Array Procedures): Update array-equal? docs. * libguile/deprecated.h: * libguile/deprecated.c (scm_raequal): Deprecate. * libguile/bytevectors.c (scm_bytevector_eq_p): Bugfix: bytevectors are bytevector=? only if their element type is the same. * libguile/eq.c (scm_equal_p): Only dispatch to scm_array_equal_p if both args are arrays (generically). * test-suite/tests/arrays.test ("equal?"): Add some more tests.
2010-02-26deprecate lazy-catchAndy Wingo1-0/+50
* libguile/deprecated.h: * libguile/deprecated.c (scm_internal_lazy_catch, scm_lazy_catch): Deprecate, and print out a nasty warning that people should change to with-throw-handler. * libguile/throw.h: * libguile/throw.c (scm_c_with_throw_handler): Deprecate the use of the lazy_catch_p argument, printing out a nasty warning if someone actually passes 1 as that argument. The combination of the pre-unwind and post-unwind handlers should be sufficient. * test-suite/tests/exceptions.test: Remove lazy-catch tests, as they are deprecated. Two of them fail: * throw/catch: effect of lazy-catch unwinding on throw to another key * throw/catch: repeat of previous test but with lazy-catch Hopefully people are not depending on this behavior, and the warning is sufficiently nasty for people to switch. We will see. * test-suite/tests/eval.test ("promises"): Use with-throw-handler instead of lazy-catch. * doc/ref/api-debug.texi: * doc/ref/api-control.texi: Update to remove references to lazy-catch, folding in the useful bits to with-throw-handler.
2010-01-20Fix `uniform-vector-read!' and `uniform-vector-write'.Ludovic Courtès1-16/+39
* libguile/deprecated.c (scm_uniform_vector_read_x, scm_uniform_vector-write): Account for optional arguments. Make sure the former always returns an integer. * libguile/deprecated.h (scm_uniform_vector_read_x, scm_uniform_vector_write, scm_uniform_array_read_x, scm_uniform_array_write): Mark as `SCM_DEPRECATED'.
2010-01-07better scm_subr_p deprecationAndy Wingo1-0/+7
* libguile/deprecated.h (scm_subr_p): Dispatch instead to scm_i_subr_p so we get link-time and run-time warnings. * libguile/deprecated.c (scm_i_subr_p): Here we call SCM_PRIMITIVE_P.
2010-01-07reimplement srfi-4 vectors on top of bytevectorsAndy Wingo1-50/+213
* libguile/srfi-4.h: * libguile/srfi-4.c (scm_make_srfi_4_vector): New function, exported by (srfi srfi-4 gnu). * libguile/srfi-4.i.c: Removed. * module/srfi/srfi-4.scm: * module/srfi/srfi-4/gnu.scm: Reimplement srfi-4 vectors on top of bytevectors. The implementation is mostly in Scheme now. * test-suite/tests/unif.test: Update to use (srfi srfi-4 gnu). * libguile/bytevectors.c (bytevector_ref_c32, bytevector_ref_c64) (bytevector_set_c32, bytevector_set_c64): Fix some embarrassing bugs. Still need to do an upper bounds check. * libguile/deprecated.h: Remove deprecated array functions: scm_i_arrayp, scm_i_array_ndim, scm_i_array_mem, scm_i_array_v, scm_i_array_base, scm_i_array_dims, and the deprecated macros: SCM_ARRAYP, SCM_ARRAY_NDIM, SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE, SCM_ARRAY_DIMS. * libguile/deprecated.c (scm_uniform_vector_read_x) (scm_uniform_vector_write, scm_uniform_array_read_x) (scm_uniform_array_write): Newly deprecated functions. * libguile/generalized-arrays.c (scm_array_type): Remove the bytevector hack. * libguile/objcodes.c (scm_bytecode_to_objcode, scm_objcode_to_bytecode): Rework to operate on bytevectors, as scm_make_u8vector now causes a module lookup, which can't be done e.g. when loading the VM boot program for psyntax-pp.go on a fresh bootstrap. * libguile/objcodes.h (SCM_F_OBJCODE_IS_BYTEVECTOR): (SCM_OBJCODE_IS_BYTEVECTOR): s/U8VECTOR/BYTEVECTOR/. * module/ice-9/boot-9.scm (the-scm-module): A terrible hack to pull in (srfi srfi-4), as the bindings are primarily there now. We'll worry about this later.
2010-01-05remove the deprecatd scm_make_subr_*Andy Wingo1-33/+1
* libguile/deprecated.h: * libguile/deprecated.c (scm_make_subr, scm_make_subr_with_generic) (scm_make_subr_opt): Remove these functions that were deprecated in 2003, as they explicitly reference subr types.
2009-12-08SCM_CELL in deprecated.cAndy Wingo1-1/+1
* libguile/deprecated.c (scm_smob_free): Fix SCM_CELL macro usage.
2009-12-05further boot cleanupsAndy Wingo1-1/+1
* 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-05remove a bunch of needless scm_permanent_object callsAndy Wingo1-6/+4
* libguile/array-handle.c: * libguile/bytevectors.c: * libguile/deprecated.c: * libguile/eval.c: * libguile/feature.c: * libguile/filesys.c: * libguile/gc.c: * libguile/gdbint.c: * libguile/goops.c: * libguile/instructions.c: * libguile/load.c: * libguile/modules.c: * libguile/numbers.c: * libguile/options.c: * libguile/ports.c: * libguile/scmsigs.c: * libguile/srcprop.c: * libguile/srfi-4.c: * libguile/stacks.c: * libguile/threads.c: * libguile/vm.c: Remove calls to scm_permanent_object, as they are no longer needed with the BDW GC.
2009-12-03implement transcendental sin, cos etc in c; deprecate $sin, $cos, etcAndy Wingo1-0/+45
* libguile/deprecated.h: * libguile/deprecated.c (scm_asinh, scm_acosh, scm_atanh): Deprecate these stand-ins for the C99 asinh, acosh, and atanh functions. Guile is not gnulib. (scm_sys_atan2): Deprecate as well, in favor of scm_atan. * libguile/numbers.h: * libguile/numbers.c (scm_sin, scm_cos, scm_tan) (scm_sinh, scm_cosh, scm_tanh) (scm_asin, scm_acos, scm_atan) (scm_sys_asinh, scm_sys_acosh, scm_sys_atanh): New functions, replacing the combination of dsubrs and boot-9 wrappers with C subrs that handle complex values. The latter three have _sys_ in their names due to the name conflict with the deprecated scm_asinh et al. Remove the $abs, $sin etc "dsubrs". * module/ice-9/boot-9.scm: Remove transcendental functions, as this all happens in C now. * module/ice-9/deprecated.scm: Add aliases for $sin et al. * test-suite/tests/ramap.test ("array-map!"): Adjust "dsubr" tests to use sqrt, not $sqrt. They don't actually test dsubrs now. In the two-source test, I'm pretty sure the dsubr array-map! should have been failing, as indeed it does now; I've changed the test case to expect the failure. I'd still like to know why it was succeeding before.
2009-12-03expt implemented in C, handles complex numbersAndy Wingo1-0/+8
* libguile/numbers.h: * libguile/numbers.c (scm_expt): Rename from scm_sys_expt, and handle the complex cases as well. * libguile/deprecated.h: * libguile/deprecated.c (scm_sys_expt): Add a deprecated shim. * module/ice-9/boot-9.scm (expt): Remove definition, scm_expt does all we need.
2009-12-03remove debug framesAndy Wingo1-8/+0
* libguile/debug.h (scm_t_debug_frame): Remove this type, as it was internal to the old evaluator. (SCM_EVALFRAME, SCM_APPLYFRAME, SCM_VOIDFRAME, SCM_MACROEXPF) (SCM_TAILREC, SCM_TRACED_FRAME, SCM_ARGS_READY, SCM_DOVERFLOW) (SCM_MAX_FRAME_SIZE, SCM_FRAMETYPE) (SCM_EVALFRAMEP, SCM_APPLYFRAMEP, SCM_VOIDFRAMEP, SCM_MACROEXPFP) (SCM_TAILRECP, SCM_TRACED_FRAME_P, SCM_ARGS_READY_P, SCM_OVERFLOWP) (SCM_SET_MACROEXP, SCM_SET_TAILREC, SCM_SET_TRACED_FRAME) (SCM_SET_ARGSREADY, SCM_SET_OVERFLOW) (SCM_CLEAR_MACROEXP, SCM_CLEAR_TRACED_FRAME, SCM_CLEAR_ARGSREADY): Remove macro accessors to scm_t_debug_frame. (SCM_DEBUGOBJP, SCM_DEBUGOBJ_FRAME, SCM_SET_DEBUGOBJ_FRAME): (scm_debug_object_p, scm_make_debugobj): Remove debugobj accessors. (scm_i_unmemoize_expr): Remove unused declaration. * libguile/debug.c (scm_debug_options): No more max limit on frame sizes. (scm_start_stack): Just call out to scm_vm_call_with_new_stack. (scm_debug_object_p, scm_make_debugobj, scm_init_debug): No more debugobj smob type. * libguile/deprecated.h: * libguile/deprecated.c (scm_i_deprecated_last_debug_frame) (scm_last_debug_frame): Remove deprecated debug-frame bits. * libguile/stacks.c (scm_make_stack): Rework this function and its dependents to only walk VM frames. (scm_stack_id): Call out to the holder of the VM frame in question, which should be a VM or a VM continuation, for the stack ID. Currently this bit is stubbed out. (scm_last_stack_frame): Removed. It seems this is mainly useful for a debugger, and we need to rewrite the debugger to work on the Scheme level. * test-suite/tests/continuations.test ("continuations"): Remove test for last-stack-frame. * libguile/continuations.h (struct scm_t_contregs): * libguile/continuations.c (scm_make_continuation): (copy_stack_and_call, scm_i_with_continuation_barrier): No need to save and restore debug frames. * libguile/threads.h (scm_i_thread): Don't track debug frames. (scm_i_last_debug_frame, scm_i_set_last_debug_frame): Remove macro accessors. * libguile/threads.c (guilify_self_1): Don't track debug frames. * libguile/throw.c: No need to track debug frames in a jmpbuf. * libguile/vm-engine.c (vm_engine, VM_PUSH_DEBUG_FRAMES): Don't push debug frames. * libguile/vm.h: * libguile/vm.c (scm_vm_call_with_new_stack): New function. Currently stubbed out though.
2009-12-01formally deprecate trampolinesAndy Wingo1-0/+39
* libguile/eval.c: * libguile/deprecated.h: * libguile/deprecated.c (scm_trampoline_0, scm_trampoline_1) (scm_trampoline_2): Actually deprecate trampolines. * srfi/srfi-1.c: Fix all trampoline uses in srfi-1.c.
2009-12-01remove some deprecated things, undeprecate scm_the_root_module()Andy Wingo1-22/+0
* libguile/deprecated.h * libguile/deprecated.c (SCM_ILOC00, SCM_IDINC, SCM_IDSTMSK) (scm_s_expression, scm_s_test, scm_s_body, scm_s_bindings) (scm_s_variable, scm_s_clauses, scm_s_formals, SCM_EVALIM2) (SCM_EVALIM, SCM_XEVAL, SCM_XEVALCAR): Remove these macros and constants, deprecated in 2003. (scm_the_root_module): Undeprecate, it's actually a useful function, that other parts of the code use. * libguile/modules.h (scm_the_root_module): Undeprecated. * libguile/modules.c (scm_the_root_module): Rename from the_root_module. Use it in the rest of this file.