summaryrefslogtreecommitdiff
path: root/libguile/procprop.h
Commit message (Expand)AuthorAgeFilesLines
* procedure-documentation works on RTL procedures...* libguile/procprop.h: * libguile/procprop.c (scm_procedure_documentation): Move here from procs.c, and to make the logic more similar to that of procedure-name, which allows RTL programs to dispatch to rtl-program-documentation. * libguile/programs.c (scm_i_rtl_program_documentation): * libguile/programs.h: * module/system/vm/program.scm (rtl-program-documentation): New plumbing. * module/system/vm/debug.scm (find-program-docstring): New interface to grovel ELF for a docstring. Andy Wingo2013-06-091-0/+2
* move procedure-name and procedure-source to procprop.c...* libguile/procprop.h: * libguile/procprop.c (scm_procedure_name, scm_procedure_source): Move these functions here, from debug.[ch]. Andy Wingo2013-06-091-1/+3
* Merge remote-tracking branch 'origin/stable-2.0'...Conflicts: configure.ac libguile/fluids.c libguile/gc.c libguile/gc.h libguile/objcodes.c libguile/procprop.c libguile/vm.c module/ice-9/psyntax-pp.scm module/ice-9/psyntax.scm Andy Wingo2011-12-011-0/+2
|\
| * better debuggability for interpreted procedures...* libguile/procprop.c (scm_set_procedure_minimum_arity_x): New function, allows a user to override a function's arity. (scm_i_procedure_arity): Look up in the overrides table first. * libguile/procprop.h: Add scm_set_procedure_minimum_arity_x. * module/ice-9/eval.scm (primitive-eval): Override arity of "general closures". * test-suite/tests/procprop.test ("procedure-arity"): Add tests. Based on a patch from Stefan Israelsson Tampe. Test based on work by Patrick Bernaud. Andy Wingo2011-11-151-0/+2
* | remove all deprecated code...* 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. Andy Wingo2011-05-121-4/+1
|/
* deprecate arity access via (procedure-properties proc 'arity)...* libguile/procprop.h (scm_sym_arity): Deprecate. I didn't move it to deprecated.h though, because that might have some boot implications -- though I didn't check. * libguile/procprop.c (scm_procedure_properties) (scm_set_procedure_properties_x, scm_procedure_property) (scm_set_procedure_property_x): Deprecate access to a procedure's arity via procedure-properties. Users should use procedure-minimum-arity. * module/ice-9/channel.scm (eval): * module/ice-9/session.scm (arity): * module/language/tree-il/analyze.scm (validate-arity): Fix up instances of (procedure-property x 'arity) to use procedure-minimum-arity. Andy Wingo2010-04-171-1/+3
* add procedure_minimum_arity...* libguile/procprop.h: * libguile/procprop.c (scm_procedure_minimum_arity): New public function, will replace (procedure-property foo 'arity). * libguile/programs.c (scm_i_program_arity): Rework to always provide the most permissive arity. Andy Wingo2010-04-171-1/+2
* eval.c closures are now applicable smobs, not tc3s...* libguile/debug.c (scm_procedure_name): Remove a SCM_CLOSUREP case and some dead code. (scm_procedure_module): Remove. This was introduced a few months ago for the hygienic expander, but now it is no longer needed, as the expander keeps track of this information itself. * libguile/debug.h: Remove scm_procedure_module. * libguile/eval.c: Instead of using tc3 closures, define a "boot closure" applicable smob type, and represent closures with that. The advantage is that after eval.scm is compiled, boot closures take up no address space (besides a smob number) in the runtime, and require no special cases in procedure dispatch. * libguile/eval.h: Remove the internal functions scm_i_call_closure_0 and scm_closure_apply, and the public function scm_closure. * libguile/gc.c (scm_storage_prehistory): No tc3_closure displacement registration. (scm_i_tag_name): Remove closure case, and a dead cclo case. * libguile/vm.c (apply_foreign): * libguile/print.c (iprin1): * libguile/procs.c (scm_procedure_p, scm_procedure_documentation); * libguile/evalext.c (scm_self_evaluating_p): * libguile/goops.c (scm_class_of): Remove tc3_closure/tcs_closure cases. * libguile/hash.c (scm_hasher): * libguile/hooks.c (scm_add_hook_x): Use new scm_i_procedure_arity. * libguile/macros.c (macro_print): Print all macros using the same code. (scm_macro_transformer): Return any procedure, not just programs. * libguile/procprop.h: * libguile/procprop.c (scm_i_procedure_arity): Instead of returning a list that the caller has to parse, have the same prototype as scm_i_program_arity. An incompatible change, but it's an internal function anyway. (scm_procedure_properties, scm_set_procedure_properties) (scm_procedure_property, scm_set_procedure_property): Remove closure cases, and use scm_i_program_arity for arity. * libguile/procs.h (SCM_CLOSUREP, SCM_CLOSCAR, SCM_CODE) (SCM_CLOSURE_NUM_REQUIRED_ARGS, SCM_CLOSURE_HAS_REST_ARGS) (SCM_CLOSURE_BODY, SCM_PROCPROPS, SCM_SETPROCPROPS, SCM_ENV) (SCM_TOP_LEVEL): Remove these macros that pertain to boot closures only. Only eval.c should know abut boot closures. * libguile/procs.c (scm_closure_p): Remove this function. There is a simple stub in deprecated.scm now. (scm_thunk_p): Use scm_i_program_arity. * libguile/tags.h (scm_tc3_closure): Remove. Yay, another tc3 to play with! (scm_tcs_closures): Remove. * libguile/validate.h (SCM_VALIDATE_CLOSURE): Remove. * module/ice-9/deprecated.scm (closure?): Add stub. * module/ice-9/documentation.scm (object-documentation) * module/ice-9/session.scm (help-doc, arity) * module/oop/goops.scm (compute-getters-n-setters) * module/oop/goops/describe.scm (describe) * module/system/repl/describe.scm (display-object, display-type): Remove calls to closure?. Andy Wingo2009-12-041-1/+1
* de-nargs struct scm_objcode; procedure-property refactor...* 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. Andy Wingo2009-10-231-4/+4
* 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/* ) Neil Jerram2009-06-171-6/+7
* Add `SCM_INTERNAL' macro, use it.Ludovic Courtès2008-05-311-3/+3
* merge from 1.8 branchKevin Ryde2006-04-171-1/+1
* The FSF has a new address.Marius Vollmer2005-05-231-1/+1
* Changed license terms to the plain LGPL thru-out.Marius Vollmer2003-04-051-35/+11
* Prefixed each each exported symbol with SCM_API.Marius Vollmer2001-11-021-9/+9
* * Renamed header macros to the SCM_<filename>_H format.Dirk Herrmann2001-08-311-7/+9
* Updated copyrightsMikael Djurfeldt2000-06-121-1/+1
* * *.[hc]: add Emacs magic at the end of file, to ensure GNU... indentation style. Michael Livshin2000-03-191-0/+6
* * backtrace.c, debug.c, eval.c, eval.h, gsubr.c, procprop.h,...read.c, srcprop.c, srcprop.h (scm_i_filename, scm_i_line, scm_i_column, scm_i_copy, scm_i_name, scm_i_lambda, scm_i_source, scm_i_more, scm_i_procname, scm_i_dot, scm_i_arrow, scm_i_else, scm_i_unquote, scm_i_uq_splicing, scm_i_apply, scm_i_enter_frame, scm_i_apply_frame, scm_i_exit_frame, scm_i_trace, scm_i_quote, scm_i_begin, scm_i_if, scm_i_and, scm_i_or, scm_i_case, scm_i_cond, scm_i_letstar, scm_i_do, scm_i_quasiquote, scm_i_define, scm_i_letrec, scm_i_let, scm_i_atapply, scm_i_atcall_cc, scm_i_breakpoint): Renamed: Consequently use scm_sym_ as prefix for symbols. Mikael Djurfeldt1999-08-171-1/+1
* * gsubr.c, procprop.h (scm_i_inner_name): Removed.Mikael Djurfeldt1999-07-291-1/+0
* * procprop.c, procprop.h (scm_sym_system_procedure): New symbol....* eval.c, procs.c, procs.h, procprop.c: Renamed getter -> procedure throughout. Mikael Djurfeldt1999-03-121-0/+1
* * procprop.h (scm_i_procedure_arity): Added declaration.Mikael Djurfeldt1998-11-261-5/+6
* * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,...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. Jim Blandy1998-10-191-1/+1
* * procprop.h (scm_sym_arity): New symbol.Mikael Djurfeldt1998-05-041-0/+1
* * procprop.h: Added declaration of scm_i_inner_name....* gsubr.c: New global symbol scm_i_inner_name. * debug.c (scm_procedure_name): Try procedure property `inner-name' if `name' fails. * print.c (scm_iprin1): Use scm_macro_name. * eval.c (scm_m_define): Give names to macros as well; Only the first top-level definition gives a procedure/macro a name. Otherwise confusing names can turn up in backtraces. (SCM_CEVAL): SCM_IM_DEFINE: Set `inner-name' property instead of `name'; Give names to macros as well. * procs.c (scm_closure_p), print.c (scm_iprin1), eval.c (scm_macro_transformer): Use SCM_CLOSUREP instead of scm_closure_p. Mikael Djurfeldt1997-09-111-0/+1
* * Lots of files: New address for FSF.Jim Blandy1997-05-261-3/+3
* * procprop.h: Added declaration of scm_i_name....* gsubr.c: Added global scm_i_name. Added #include "procprop.h". (scm_make_gsubr): Record names of compiled closures. Mikael Djurfeldt1996-10-141-1/+1
* * __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,...arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h, chars.c, chars.h, continuations.c, continuations.h, debug.c, debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c, eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c, filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c, gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h, hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h, kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c, markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h, objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h, ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c, procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h, root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c, simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h, stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h, strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h, struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c, unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c, version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to declare functions with prototypes. (Patch thanks to Marius Vollmer.) Jim Blandy1996-10-141-16/+5
* * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,...continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h, feature.h, filesys.h, fports.h, gc.h, gdbint.h, genio.h, gsubr.h, hash.h, init.h, ioext.h, kw.h, list.h, markers.h, marksweep.h, mbstrings.h, numbers.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h, procprop.h, procs.h, ramap.h, read.h, root.h, sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h, strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h, tag.h, throw.h, unif.h, variable.h, vectors.h, version.h, vports.h, weaks.h: #include "libguile/__scm.h", not <libguile/__scm.h>. This allows 'gcc -MM' to determine which dependencies are within libguile properly. Jim Blandy1996-09-051-1/+1
* Don't install the unwashed masses of Guile header files in the...main #include path; put most of them in a subdirectory called 'libguile'. This avoids naming conflicts between Guile header files and system header files (of which there were a few). * Makefile.in (pkgincludedir): Deleted. (innerincludedir): New variable; this and $(includedir) are enough. (INCLUDE_CFLAGS): Search for headers in "-I$(srcdir)/..". (installed_h_files): Divide this up. Now this variable lists those header files which should go into $(includedir) (i.e. appear directly in the #include path), and ... (inner_h_files): ... this new variable says which files appear in a subdirectory, and are referred to as <libguile/mumble.h>. (h_files): List them both. (install): Create innerincludedir, not pkgincludedir. Put the installed_h_files and inner_h_files in their proper places. (uninstall): Corresponding changes. * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h, continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h, feature.h, fports.h, gc.h, genio.h, gsubr.h, hash.h, init.h, ioext.h, kw.h, libguile.h, list.h, markers.h, marksweep.h, mbstrings.h, numbers.h, options.h, pairs.h, ports.h, posix.h, print.h, procprop.h, procs.h, ramap.h, read.h, root.h, sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h, strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h, tag.h, throw.h, unif.h, variable.h, vectors.h, version.h, vports.h, weaks.h: Find __scm.h in its new location. * __scm.h: Find scmconfig.h and tags.h in their new locations (they're both "inner" files). Jim Blandy1996-09-041-1/+1
* maintainer changed: was lord, now jimb; first importJim Blandy1996-07-251-0/+72