summaryrefslogtreecommitdiff
path: root/doc/ref
AgeCommit message (Collapse)AuthorFilesLines
2016-04-04Use symbols instead of _IONBF values as args to setvbufAndy Wingo1-7/+7
* libguile/ports.c (scm_setvbuf): Use the symbols `none', `line', and `block' instead of the values `_IONBF', `_IOLBF', and `_IOFBF'. * NEWS: Update. * doc/ref/posix.texi (Ports and File Descriptors): Update setvbuf documentation. * module/ice-9/deprecated.scm (define-deprecated): New helper. (_IONBF, _IOLBF, _IOFBF): Define deprecated values. * benchmark-suite/benchmarks/read.bm ("read"): * benchmark-suite/benchmarks/uniform-vector-read.bm ("uniform-vector-read!"): * libguile/r6rs-ports.c (cbip_fill_input): * module/system/base/types.scm (%ffi-memory-backend): * module/web/client.scm (open-socket-for-uri): * module/web/server/http.scm (http-read): * test-suite/tests/ports.test ("pipe, fdopen, and line buffering"): ("setvbuf"): * test-suite/tests/r6rs-ports.test ("7.2.7 Input Ports"): Update to use non-deprecated interfaces.
2016-02-01Document new VM instructionsAndy Wingo1-26/+205
* doc/ref/vm.texi (Stack Layout): Add a note about unboxed values. (Instruction Set): Update for new instructions.
2016-02-01Update statprof documentation; deprecate `with-statprof'Andy Wingo2-226/+196
* module/statprof.scm: Remove most of the commentary, as it was duplicated in the manual and was getting out of date. (stats): Remove self-secs-per-call and cum-secs-per-call fields as they can be computed from the other fields. (statprof-call-data->stats): Adapt. (statprof-stats-self-secs-per-call): (statprof-stats-cum-secs-per-call): New functions. (statprof-display/flat): Don't print the seconds-per-call fields, as we are no longer stopping the clock around call counters. Anyway these times were quite misleading. (with-statprof): Deprecate. It took its keyword arguments at the beginning; very complicated! Better to use the `statprof' function. (`statprof' was introduced after `with-statprof' and then `with-statprof' was adapted to use it.) * doc/ref/statprof.texi (Statprof): Port this documentation away from the automatically generated text and update it for the new interfaces like #:display-style. * module/system/base/syntax.scm (record-case): Remove comment that referenced with-statprof. Add comment indicating that record-case should be replaced. * doc/ref/scheme-using.texi (Profile Commands): Update to mention keyword arguments and to link to the statprof documentation.
2016-01-31Frame <binding> objects capture frame, can ref value directlyAndy Wingo2-22/+47
* module/system/repl/debug.scm (print-locals): Adapt to frame-binding-ref change. * module/system/vm/frame.scm (<binding>): Add `frame' field. (available-bindings): Capture the frame. (binding-ref, binding-set!): New functions, accessing a local variable value directly from a frame. (frame-binding-ref, frame-binding-set!): Remove. As these are very low-level debugging interfaces introduced in 2.0, never documented, and quite tied to the VM, we feel comfortable making this change. (frame-call-representation): Adapt to available-bindings change. (frame-environment, frame-object-binding): Adapt to binding-ref interface change. * doc/ref/vm.texi (Stack Layout): Mention that slots can be re-used. Update disassembly in example. * doc/ref/api-debug.texi (Frames): Remove documentation for frame-local-ref, frame-local-set!, and frame-num-locals. Replace with documentation for frame-bindings, binding accessors, and binding-ref / binding-set!.
2015-12-01Remove frame-procedureAndy Wingo1-4/+4
* libguile/frames.h: * libguile/frames.c (scm_frame_procedure): Remove. * test-suite/tests/eval.test ("stacks"): Adapt test. * NEWS: Add news item. * doc/ref/api-debug.texi (Frames): Document frame-procedure-name instead of frame-procedure.
2015-12-01VM traps don't match on value of slot 0Andy Wingo1-12/+7
* module/system/vm/traps.scm (frame-matcher): Always match on a procedure's code, instead of the value in slot 0. Prevents confusion with closure-optimized procedures, re-use of slot 0, and untagged values in slot 0. (trap-at-procedure-call, trap-in-procedure) (trap-instructions-in-procedure, trap-at-procedure-ip-in-range) (trap-at-source-location, trap-in-dynamic-extent) (trap-calls-in-dynamic-extent, trap-instructions-in-dynamic-extent): Update to adapt to frame-matcher change and remove #:closure? argument, effectively changing the default behavior to #:closure? #t. * doc/ref/api-debug.texi (Low-Level Traps): Update documentation.
2015-12-01Remove `procedure' repl commandAndy Wingo1-4/+0
* doc/ref/scheme-using.texi (Debug Commands): * module/system/repl/command.scm (procedure): Remove REPL command. Since there is a closure binding and we have improved the ,registers output, this is no longer necessary and by removing it we remove another bogus use of frame-procedure.
2015-10-28VM support for raw slotsAndy Wingo1-0/+4
* libguile/loader.c (scm_find_slot_map_unlocked): Rename from scm_find_dead_slot_map_unlocked. * libguile/vm.c (struct slot_map_cache_entry, struct slot_map_cache) (find_slot_map): Rename, changing "dead_slot" to "slot". (enum slot_desc): New type. (scm_i_vm_mark_stack): Interpret slot maps as having two bits per slot, allowing us to indicate that a slot is live but not a pointer. * module/language/cps/compile-bytecode.scm (compile-function): Adapt to emit-slot-map name change. * module/system/vm/assembler.scm (<asm>): Rename dead-slot-maps field to slot-maps. (emit-slot-map): Rename from emit-dead-slot-map. (link-frame-maps): 2 bits per slot. * module/language/cps/slot-allocation.scm (lookup-slot-map): Rename from lookup-dead-slot-map. (compute-var-representations): New function. (allocate-slots): Adapt to encode two-bit slot representations.
2015-10-28return-values opcode resets the frameAndy Wingo1-3/+4
* libguile/vm-engine.c (return-values): Change to also reset the frame, if nlocals is nonzero. * doc/ref/vm.texi (Procedure Call and Return Instructions): Updated docs. * module/language/cps/compile-bytecode.scm (compile-function): Adapt to call emit-return-values with the right number of arguments.
2015-10-22Small subr-call refactorAndy Wingo1-4/+3
* libguile/gsubr.c (scm_apply_subr): New internal helper. * libguile/vm-engine.c (subr-call): Call out to scm_apply_subr. * doc/ref/vm.texi (subr-call): Don't specify how the foreign pointer is obtained.
2015-10-22Update VM documentation for new stack layoutAndy Wingo1-190/+251
* doc/ref/vm.texi: Update for new stack layout. * module/system/vm/disassembler.scm (code-annotation): Print the frame sizes after alloc-frame, reset-frame, etc to make reading the disassembly easier.
2015-10-21Minor VM documentation updatesAndy Wingo1-7/+9
* doc/ref/vm.texi (Why a VM?, Variables and the VM): Minor updates.
2015-09-18Minor CPS documentation cleanupsAndy Wingo1-48/+58
* doc/ref/compiler.texi (Continuation-Passing Style): Minor cleanups.
2015-09-17Update CPS language documentationAndy Wingo1-154/+353
* doc/ref/compiler.texi (Continuation-Passing Style): Update to latest CPS language.
2015-04-01Replace $letrec with $recAndy Wingo1-47/+67
* module/language/cps.scm ($rec): Replace $letrec with $rec, which is an expression, not a term. This means that the names bound by the letrec appear twice: once in the $rec term, and once in the continuation. This is not very elegant, but the situation is better than it was before. Adapt all callers. * doc/ref/compiler.texi (CPS in Guile): Incomplete documentation updates. I'll update these later when the IL settles down.
2015-02-09NEWS and doc updatesAndy Wingo2-11/+45
* doc/ref/vm.texi: Update for new instructions. * doc/ref/web.texi: Update for URI-reference support. * NEWS: Update.
2015-02-08Document support for URI references.Andy Wingo1-9/+31
* doc/ref/web.texi (URIs): Update for URI reference changes.
2015-01-22Merge commit 'cdcba5b2f6270de808e51b3b933374170611b91d'Andy Wingo1-3/+4
Conflicts: module/statprof.scm
2015-01-22Merge commit '7c433cbbce83bc9f2f9967afba00bbb68e312657'Andy Wingo1-3/+7
Conflicts: meta/Makefile.am
2015-01-22Merge commit '5fac1a7ada362d78f13143acbc0ceca7f2f101de'Andy Wingo1-2/+17
Conflicts: configure.ac doc/ref/libguile-parallel.texi
2015-01-22Merge commit '8cf2a7ba7432d68b9a055d29f18117be70375af9'Andy Wingo3-3/+46
2015-01-22Merge commit '5af307de43e4b65eec7f235b48a8908f2a00f134'Andy Wingo1-2/+6
Conflicts: test-suite/tests/reader.test
2015-01-22Merge commit 'b1451ad859183ae48c624d19ec144306bd2d3e3a'Andy Wingo1-1/+1
2015-01-11statprof: 'statprof' and 'with-statprof' return the code's return values.Ludovic Courtès1-3/+4
* module/statprof.scm (statprof): Return the return values of THUNK. (with-statprof): Adjust docstring accordingly. * test-suite/tests/statprof.test ("return values"): New test. * doc/ref/statprof.texi (Statprof): Adjust accordingly.
2014-12-03doc: Clarify the unit of the 'offset' argument of 'seek'.Ludovic Courtès1-3/+7
Reported in <http://bugs.gnu.org/18520> by David Kastrup <dak@gnu.org>. * doc/ref/api-io.texi (Random Access): Clarify the unit of the 'offset' argument to 'seek'.
2014-12-03Add the 'guild' and 'guile' variables to 'guile-2.0.pc'.Ludovic Courtès1-2/+17
* configure.ac: Remove meta/guile-2.0.pc and meta/guile-2.0-uninstalled.pc from 'AC_CONFIG_FILES'. * meta/Makefile.am (substitute): New variable. (guile-2.0.pc, guile-2.0-uninstalled.pc): New targets. (guile-config, guild): Use $(substitute) instead of duplicated sed script. (CLEANFILES): Add the .pc files. * meta/guile-2.0.pc.in (bindir, guild, guile): New variables. * doc/ref/libguile-parallel.texi (Parallel Installations): Document the 'guild' and 'guile' pkg-config variables.
2014-12-02doc: Tell when 'GUILE_INSTALL_LOCALE' first appeared.Ludovic Courtès1-2/+4
* doc/ref/guile-invoke.texi (Environment Variables): Add footnote about the Guile version where 'GUILE_INSTALL_LOCALE' appeared.
2014-12-02Implement SRFI 28: Basic Format Strings.Chris Jester-Young1-0/+37
* module/srfi/srfi-28.scm: New module. * module/Makefile.am (SRFI_SOURCES): Add srfi/srfi-28.scm. * doc/ref/srfi-modules.texi (SRFI-28): New node.
2014-11-20doc: Clarify behavior of 'select' in the presence of signal interruptions.Ludovic Courtès1-1/+5
Fixes <http://bugs.gnu.org/18988>. Reported by Chris Vine <chris@cvine.freeserve.co.uk>. * libguile/filesys.c (scm_select): Clarify handling of signal interruptions. * doc/ref/posix.texi (Ports and File Descriptors): Adjust accordingly.
2014-10-01read: Accept "\(" in string literals.Mark H Weaver1-2/+6
Suggested by David Kastrup <dak@gnu.org> in <http://bugs.gnu.org/13644>. * libguile/read.c (scm_read_string_like_syntax): Accept "\(" as equivalent to "(". * doc/ref/api-data.texi (String Syntax): Document it. * test-suite/tests/reader.test ("reading"): Add test.
2014-10-01docs: Fix documented return type of 'scm_c_export'.Mark H Weaver1-1/+1
Fixes <http://bugs.gnu.org/17869>. Reported and fixed by Alexei Matveev <alexei.matveev@gmail.com>. * doc/ref/api-modules.texi (Accessing Modules from C): Change documented return type of 'scm_c_export' to 'void' to reflect reality. * THANKS: Add Alexei Matveev to the fixes section.
2014-09-30Merge branch 'stable-2.0'Mark H Weaver6-27/+47
Conflicts: benchmark-suite/benchmarks/ports.bm libguile/async.h libguile/bytevectors.c libguile/foreign.c libguile/gsubr.c libguile/srfi-1.c libguile/vm-engine.h libguile/vm-i-scheme.c module/Makefile.am module/language/tree-il/analyze.scm module/language/tree-il/peval.scm module/scripts/compile.scm module/scripts/disassemble.scm test-suite/tests/asm-to-bytecode.test test-suite/tests/peval.test test-suite/tests/rdelim.test
2014-09-29Add (ice-9 unicode) moduleAndy Wingo1-0/+18
* libguile/unicode.c: * libguile/unicode.h: * test-suite/tests/unicode.test: * module/ice-9/unicode.scm: New files. * module/Makefile.am: * libguile/Makefile.am: * test-suite/Makefile.am: * libguile/init.c: Wire new files into the build. * doc/ref/api-data.texi: Add docs.
2014-09-24doc: Improve description of vector-unfold and vector-unfold-right.Mark H Weaver1-7/+7
* doc/ref/srfi-modules.texi (SRFI-43 Constructors)[vector-unfold]: Improve description. * module/srfi/srfi-43.scm (vector-unfold, vector-unfold-right): Improve docstrings.
2014-09-22Add 'EXIT_SUCCESS' and 'EXIT_FAILURE'.Ludovic Courtès1-2/+8
Suggested by Frank Terbeck <ft@bewatermyfriend.org>. * libguile/posix.c (scm_init_posix): Define 'EXIT_SUCCESS' and 'EXIT_FAILURE'. * doc/ref/posix.texi (Processes): Document them.
2014-09-20Document #:prefix option in use-module clauses.Mark H Weaver1-12/+25
* doc/ref/api-modules.texi (Using Guile Modules): Document #:prefix option.
2014-09-12Add (ice-9 unicode) moduleAndy Wingo1-0/+18
* libguile/unicode.c: * libguile/unicode.h: * test-suite/tests/unicode.test: * module/ice-9/unicode.scm: New files. * module/Makefile.am: * libguile/Makefile.am: * test-suite/Makefile.am: * libguile/init.c: Wire new files into the build. * doc/ref/api-data.texi: Add docs.
2014-08-12doc: "!#" does not need to appear on a line of its own.Ludovic Courtès1-2/+3
* doc/ref/api-evaluation.texi (Block Comments): Remove "which must appear on a line of their own". Reported by David Michael <fedora.dm0@gmail.com>.
2014-08-10Clarify that object-properties cannot be reliably applied to numbers.David Kastrup1-1/+1
* doc/ref/api-utility.texi (Object Properties)[make-object-property]: Clarify that object-properties cannot be reliably applied to numbers. Signed-off-by: David Kastrup <dak@gnu.org>
2014-07-04Fix bit-count* bugAndy Wingo1-1/+1
* libguile/bitvectors.c (scm_bit_count_star): Fix typo introduced in 2005 refactor (!) in which the second arg was erroneously taken from the first arg. * test-suite/tests/bitvectors.test: Add test. * doc/ref/api-compound.texi: Fix doc example for u32vector selector.
2014-06-29Fix bit-count* bugAndy Wingo1-1/+1
* libguile/bitvectors.c (scm_bit_count_star): Fix typo introduced in 2005 refactor (!) in which the second arg was erroneously taken from the first arg. * test-suite/tests/bitvectors.test: Add test. * doc/ref/api-compound.texi: Fix doc example for u32vector selector.
2014-06-06R6RS library documentation fixTaylan Ulrich B1-2/+2
* doc/ref/api-modules.texi (R6RS Libraries): Move 'export' before 'import' in the example library form, as required by R6RS.
2014-06-04Fix typo in `transform-string' doc.Dmitry Bogatov1-1/+1
* doc/ref/texinfo.texi: Fix single typo. Signed-off-by: Dmitry Bogatov <KAction@gnu.org>
2014-05-01Fix inner and outer stack cuts to match on procedure codeAndy Wingo1-27/+27
* doc/ref/api-debug.texi (Stack Capture): Update make-stack docs. * libguile/programs.h: * libguile/programs.c (scm_program_address_range): New internal procedure. * libguile/stacks.c (narrow_stack): Interpret a pair of integers as an address range. If a cut is a procedure, attempt to resolve it to an address range. (scm_make_stack): Update docstring. * module/system/vm/program.scm (program-address-range): New exported procedure. * module/statprof.scm (statprof, gcprof): Use program-address-range to get the outer-cut, for efficiency.
2014-04-28Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo13-868/+811
Conflicts: .gitignore doc/example-smob/Makefile doc/ref/api-smobs.texi doc/ref/libguile-concepts.texi doc/ref/libguile-smobs.texi libguile.h libguile/finalizers.c libguile/finalizers.h libguile/goops.c module/language/tree-il/compile-glil.scm module/oop/goops.scm
2014-04-28Prefer foreign objects over smobs in manualAndy Wingo4-84/+24
* doc/ref/api-memory.texi (Memory Blocks): Recommend against scm_gc_free. Refer to foreign objects instead of smobs. Remove discussion of scm_must_malloc et al. * doc/ref/guile.texi (API Reference): Rename SMOB menu item. * doc/ref/libguile-snarf.texi (Function Snarfing): Update example to not refer to smobs. * doc/ref/tools.texi (How guile-snarf works): Likewise.
2014-04-28Remove SMOB tutorial; update manual.Andy Wingo10-887/+208
* doc/ref/libguile-smobs.texi: Remove; this tutorial is superseded by libguile-foreign-objects. * doc/ref/libguile-foreign-objects.texi: Proofreading. * doc/ref/libguile-program.texi: Update Dia examples to refer to foreign objects. * doc/ref/libguile-concepts.texi (Garbage Collection): Update to accurately describe the BDW-GC, and to avoid reference to mark functions. * doc/ref/guile.texi: Remove libguile-smobs, and reword API menu. * doc/ref/api-utility.texi (Equality): Mention GOOPS instead of SMOBs. * doc/ref/api-smobs.texi (Smobs): Describe as a legacy interface. Exhort readers against the writing of mark functions. * doc/ref/api-foreign-objects.texi (Foreign Objects): Proofreading. * doc/ref/api-control.texi (Catch): Fix ref to point to foreign objects. * doc/ref/Makefile.am: Remove libguile-smobs.texi.
2014-04-28Add foreign object documentationAndy Wingo4-2/+622
* doc/ref/api-foreign-objects.texi: * doc/ref/libguile-foreign-objects.texi: New files. * doc/ref/guile.texi: * doc/ref/Makefile.am: Link new files into docs.
2014-04-26Add interface to disable automatic finalizationAndy Wingo2-2/+53
* libguile/finalizers.h: * libguile/finalizers.c (run_finalizers_async_thunk): Call the new scm_run_finalizers helper. (scm_set_automatic_finalization_enabled, scm_run_finalizers): New functions. (scm_init_finalizers): Only set a finalizer notifier if automatic finalization is enabled. * doc/ref/libguile-smobs.texi (Garbage Collecting Smobs): Add discussion of concurrency. * doc/ref/api-smobs.texi (Smobs): Document new functions.
2014-04-25Merge branch 'stable-2.0'v2.1.0Mark H Weaver6-6/+107
Conflicts: GUILE-VERSION NEWS guile-readline/ice-9/readline.scm libguile/async.c libguile/backtrace.c libguile/deprecated.h libguile/gc-malloc.c libguile/gdbint.c libguile/init.c libguile/ioext.c libguile/mallocs.c libguile/print.c libguile/rw.c libguile/scmsigs.c libguile/script.c libguile/simpos.c libguile/snarf.h libguile/strports.c libguile/threads.c libguile/vm-i-scheme.c libguile/vm-i-system.c module/srfi/srfi-18.scm test-suite/Makefile.am test-suite/standalone/test-num2integral.c