* 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.
* 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!.
* 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.
* 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.
* 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.
* 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.
This reverts commit 2d4da30fde.
This Gnulib update was causing failures related to timezones in
stime.c. I tried to fix it by adopting the time_rz module from gnulib
but that then caused other failures. We can try again later.
* 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.
* 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.
* 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.
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'.
* 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.
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.
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.
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.
* 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>
* 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.
* 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.
* 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.
* 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.
* doc/example-smob/: Remove example. It's smaller than it used to be in
Guile 1.8, and with foreign objects there's practically nothing
interesting to test.
* doc/oldfmt.c: Remove this hoary thing.
* doc/README:
* doc/Makefile.am: Update.
* 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.
* 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.