Neil Jerram [Tue, 12 Oct 2010 22:41:41 +0000 (23:41 +0100)]
Two very small edits
* doc/ref/goops.texi (User-defined classes): Remove brackets around
`formally', for better flow.
(Creating Instances): Lengthen hyphen.
Neil Jerram [Tue, 12 Oct 2010 22:40:01 +0000 (23:40 +0100)]
Edit `Generic Functions and Accessors'
* doc/ref/goops.texi (Generic Function Internals): Moved to MOP section
at end of chapter.
(Basic Generic Function Creation): Flattened into parent, and text
simplified.
(Extending Primitives): Renamed from `Extending Guiles Primitives';
removed `generic-capability?', which is no longer available;
simplified a bit.
(Merging Generics): New subsection for the material about merging;
text simplified a bit.
Ludovic Courtès [Tue, 12 Oct 2010 20:57:08 +0000 (22:57 +0200)]
Allocate complex numbers in contiguous pointer-less memory.
* libguile/numbers.h (SCM_COMPLEX_MEM): Remove.
(SCM_COMPLEX_REAL): Change to just fetch the `real' field of the
pointed-to `scm_t_complex'.
(SCM_COMPLEX_IMAG): Likewise.
(scm_t_complex)[type, pad]: New fields.
* libguile/numbers.c (scm_c_make_rectangular): Allocate the whole
complex contiguously, with `scm_gc_malloc_pointerless'.
Ludovic Courtès [Tue, 12 Oct 2010 20:00:28 +0000 (22:00 +0200)]
Allocate inexact numbers in pointer-less memory.
* libguile/numbers.c (scm_from_double): Use `scm_gc_malloc_pointerless'
instead of `scm_double_cell'.
Ludovic Courtès [Tue, 12 Oct 2010 19:59:53 +0000 (21:59 +0200)]
Placate `-Wformat'.
* module/scripts/compile.scm (fail): Use a fancy format string instead
of a non-literal one.
Andy Wingo [Tue, 12 Oct 2010 20:27:01 +0000 (22:27 +0200)]
update NEWS for 1.9.13
* NEWS: Update for 1.9.13.
Neil Jerram [Tue, 12 Oct 2010 19:00:21 +0000 (20:00 +0100)]
Add TeX form of jao's name
* doc/ref/scheme-using.texi: Add TeX equivalent for José.
Andy Wingo [Tue, 12 Oct 2010 11:58:39 +0000 (13:58 +0200)]
fold old news items into main news body
* NEWS: Fold 1.9.12 items into the main body.
Andy Wingo [Tue, 12 Oct 2010 11:24:46 +0000 (13:24 +0200)]
,frame and related commands handle for-trap? appropriately
* module/system/repl/debug.scm (print-frame): Add #:next-source? arg,
for when print-frame should use frame-next-source instead of
frame-source.
(print-frames): Add #:for-trap? arg. If true, the 0th frame should be
printed with frame-next-source.
* module/system/repl/command.scm (define-stack-command): Introduce
for-trap? into the lexical env.
(backtrace, up, down, frame): Update to do the right thing regarding
#:for-trap?.
Andy Wingo [Tue, 12 Oct 2010 11:11:40 +0000 (13:11 +0200)]
don't warn for (format #t fmt) -- format string actually named fmt
* module/language/tree-il/analyze.scm (format-analysis): Don't warn on
non-literal format string if the format string is a lexical ref to a
variable named "fmt". A slight hack, but effective :)
* module/system/repl/command.scm (display-stat): Rename the format
string to "fmt".
Andy Wingo [Tue, 12 Oct 2010 11:09:48 +0000 (13:09 +0200)]
debug has for-trap? field
* module/system/repl/debug.scm (<debug>): New field, `for-trap?'. True
if the stack is for a trap, and thus the top frame should use
frame-next-source instead of frame-source.
* module/system/repl/command.scm (repl-pop-continuation-resumer)
(repl-next-resumer):
* module/system/repl/error-handling.scm (call-with-error-handling):
Update callers.
Andy Wingo [Tue, 12 Oct 2010 11:01:10 +0000 (13:01 +0200)]
remove gds docs, telling users instead to use geiser and paredit
* doc/ref/scheme-using.texi (Using Guile in Emacs): Remove GDS docs, as
we don't have GDS any more. Instead of surveying the field, be
opinionated and tell users what to use: Geiser and Paredit.
Andy Wingo [Tue, 12 Oct 2010 10:58:36 +0000 (12:58 +0200)]
minor doc fixups
* doc/ref/scheme-scripts.texi (Invoking Guile): Some typos.
* doc/ref/tour.texi (Running Guile Scripts): More typos and PDF
improvements.
* doc/ref/scheme-using.texi (Readline, Value History): Minor rewording.
(Help Commands): Minor fixup.
Andy Wingo [Mon, 11 Oct 2010 21:53:40 +0000 (23:53 +0200)]
add --listen docs
* doc/ref/scheme-scripts.texi (Invoking Guile): Add --listen
documentation.
Andy Wingo [Mon, 11 Oct 2010 21:32:30 +0000 (23:32 +0200)]
preface contributors tweaks
* doc/ref/preface.texi (Contributors): A couple tweaks
Andy Wingo [Mon, 11 Oct 2010 20:50:55 +0000 (22:50 +0200)]
update preface.texi contributors
* doc/ref/preface.texi (Contributors): Rewrite and update.
Ludovic Courtès [Mon, 11 Oct 2010 13:38:06 +0000 (15:38 +0200)]
Allow arbitrary code in ASSOC procedures for weak hash tables (bug #29616).
* libguile/hashtab.c (struct t_assoc_args, do_weak_bucket_assoc):
Remove.
(struct t_fixup_args): New type.
(do_weak_bucket_fixup): New function.
(weak_bucket_assoc): Use it. Keep strong references to BUCKET's
entries in STRONG_REFS. Call ASSOC once the alloc lock has been
released. This fixes bug #29616.
* test-suite/tests/weaks.test ("assoc can do anything"): New test.
Ludovic Courtès [Mon, 11 Oct 2010 13:14:55 +0000 (15:14 +0200)]
Fix a bug in weak hash table bucket fixup.
* libguile/hashtab.c (scm_fixup_weak_alist): Keep the value of PREV
unchanged after a nullified pair is deleted; this fixes a bug whereby
if several successive nullified pairs were encountered, not all of them
would be removed, and the assertion in `weak_bucket_assoc' would be
hit. In addition, remove the `scm_is_pair (pair)' test.
Ludovic Courtès [Sun, 10 Oct 2010 17:09:20 +0000 (19:09 +0200)]
Fix typo.
* module/system/repl/command.scm (repl-pop-continuation-resumer): Remove
extraneous argument to `format'.
Ludovic Courtès [Sun, 10 Oct 2010 17:08:11 +0000 (19:08 +0200)]
Add warnings for obvious syntax errors in format strings.
* module/language/tree-il/analyze.scm (&syntax-error): New variable.
(format-string-argument-count): Throw to &SYNTAX-ERROR when a syntax
error in a format string is encountered.
(format-analysis): Catch &SYNTAX-ERROR and convert as a warning of the
appropriate type.
* module/system/base/message.scm (%warning-types)[format]: Handle
`syntax-error' warnings.
* test-suite/tests/tree-il.test
("warnings")["conditionals"]("unterminated", "unexpected ~;",
"unexpected ~]"): New tests.
["unterminated ~{...~}"]: New test.
Ludovic Courtès [Sun, 10 Oct 2010 16:10:18 +0000 (18:10 +0200)]
Add new `format' warnings.
* module/language/tree-il/analyze.scm (format-analysis): Add new
sub-warnings: `wrong-port', `wrong-format-string',
`non-literal-format-string', and `wrong-num-args'.
* module/system/base/message.scm (%warning-types)[format]: Handle
them.
* test-suite/tests/tree-il.test ("warnings")["wrong port arg",
"wrong format string", "non-literal format string",
"wrong number of args"]: New tests.
Ludovic Courtès [Sun, 10 Oct 2010 15:13:36 +0000 (17:13 +0200)]
Compile with `-Wformat'.
* am/guilec (GUILE_WARNINGS): Add `-Wformat'.
Ludovic Courtès [Sun, 10 Oct 2010 15:13:21 +0000 (17:13 +0200)]
Implement fancy format string analysis.
* module/language/tree-il/analyze.scm (format-string-argument-count):
Return two values, the minimum and maximum number of arguments.
Add support for most of `format' escapes, including conditionals.
(format-analysis): Adjust accordingly.
* module/system/base/message.scm (%warning-types)[format]: Take two
arguments, MIN and MAX, instead of EXPECTED. Display warning
accordingly.
* test-suite/tests/tree-il.test ("warnings")["format"]("~%, ~~, ~&, ~t,
~_, and ~\\n", "~{...~}", "~{...~}, too many args", "~@{...~}",
"~@{...~}, too few args", "~(...~)", "~v", "~v:@y", "~*", "~?",
"complex 1", "complex 2", "complex 3"): New tests.
("conditionals"): New test prefix.
Ludovic Courtès [Sat, 9 Oct 2010 16:06:36 +0000 (18:06 +0200)]
Escape newlines from format strings in warnings.
* module/system/base/message.scm (%warning-types)[format]: Escape
newlines from FMT.
Andy Wingo [Sun, 10 Oct 2010 10:56:53 +0000 (12:56 +0200)]
add --listen command line argument.
* libguile/script.c (scm_shell_usage, scm_compile_shell_switches): Add a
--listen argument to spawn a REPL server, possibly specifying the port
or path to listen on. The goal is for this to be the default way to
allow debugging via Emacs or simply using netcat.
Andy Wingo [Sun, 10 Oct 2010 10:15:34 +0000 (12:15 +0200)]
add (system repl server)
* module/system/repl/server.scm: New module, listens on a socket for
connections, then serves repls to those sockets.
* module/Makefile.am: Add repl server.
Andy Wingo [Sun, 10 Oct 2010 10:13:04 +0000 (12:13 +0200)]
fix segfaults when closing the current input port
* libguile/ports.c (scm_char_ready_p, scm_peek_char, scm_unread_char)
(scm_unread_string): Always validate the port, even in the case that
we get it the default current-input-port. Otherwise the following
causes a segfault:
(begin (close-port (current-input-port)) (peek-char))
Andy Wingo [Sun, 10 Oct 2010 09:49:50 +0000 (11:49 +0200)]
readline repl-reader falls back to boot-9 definition for other ports
* guile-readline/ice-9/readline.scm (readline-repl-reader): Pull
definition out of activate-readline. If the current input port is not
the readline port, fall back to the boot-9 repl reader.
(activate-readline): Adapt.
Andy Wingo [Sun, 10 Oct 2010 09:24:29 +0000 (11:24 +0200)]
interrupted syscalls run asyncs before throwing syserror
* libguile/error.c (scm_syserror, scm_syserror_msg): Run pending pending
asyncs before throwing the error, as one of the asyncs might be a
signal handler. But there is unfortunately a race here, as noted in a
comment.
Andy Wingo [Fri, 8 Oct 2010 17:27:45 +0000 (19:27 +0200)]
further repl tweaks
* module/system/repl/error-handling.scm (error-string): Refactor a
little.
(call-with-error-handling): Ensure a trailing newline when printing
the error-msg.
* module/system/repl/repl.scm (run-repl): We don't know the name of the
meta-command here.
Ludovic Courtès [Fri, 8 Oct 2010 13:24:15 +0000 (15:24 +0200)]
Improve pretty-printing of tree-il objects.
* module/language/tree-il.scm (print-tree-il): Print the AST with ~S
instead of ~A.
Ludovic Courtès [Fri, 8 Oct 2010 14:25:32 +0000 (16:25 +0200)]
Add `-Wformat'.
* module/language/tree-il/analyze.scm (format-string-argument-count):
New procedure.
(format-analysis): New tree analysis.
* module/language/tree-il/compile-glil.scm (%warning-passes): Add
`format'.
* module/system/base/message.scm (%warning-types): Add `format'.
* test-suite/tests/tree-il.test (%opts-w-format): New variable.
("warnings")["format"]: New test prefix.
* doc/ref/api-evaluation.texi (Compilation): Mention `format' warnings.
Ludovic Courtès [Fri, 8 Oct 2010 11:50:24 +0000 (13:50 +0200)]
Fixlets for REPL error handling.
* module/system/repl/error-handling.scm (error-string): Don't call
`display-error' when STACK is empty.
(call-with-error-handling): Display ERROR-MSG instead of using
`format', since ERROR-MSG may contain `format' escapes.
* module/system/repl/repl.scm (run-repl): Add missing argument to
`format'.
Ludovic Courtès [Fri, 8 Oct 2010 11:48:02 +0000 (13:48 +0200)]
SRFI-1: Rewrite `split-at' and `split-at!' in Scheme.
This partially reverts commit
bb560b9c16893f762699ba5a3109c8367fff8dfc
(Tue Mar 15 2005).
* module/srfi/srfi-1.scm (out-of-range, split-at, split-at!): New
procedures.
* libguile/srfi-1.c (scm_srfi1_split_at, scm_srfi1_split_at_x): Remove.
* libguile/srfi-1.h (scm_srfi1_split_at, scm_srfi1_split_at_x): Ditto.
Ludovic Courtès [Fri, 8 Oct 2010 09:03:51 +0000 (11:03 +0200)]
SRFI-1: Rewrite `filter-map' in Scheme.
This partially reverts commit
c16359466bcc3f2ebf6d750c069f787f629fc625
(Thu Mar 17 2005).
* libguile/srfi-1.c (scm_srfi1_filter_map): Remove.
* libguile/srfi-1.h (scm_srfi1_filter_map): Ditto.
* module/srfi/srfi-1.scm (filter-map): New procedure.
Ludovic Courtès [Fri, 8 Oct 2010 08:43:59 +0000 (10:43 +0200)]
SRFI-1: Make `fold-right' tail-recursive.
* module/srfi/srfi-1.scm (fold-right): Make tail-recursive.
* test-suite/tests/srfi-1.test ("fold-right"): New test prefix.
Ludovic Courtès [Fri, 8 Oct 2010 08:23:52 +0000 (10:23 +0200)]
SRFI-1: Make `unfold' tail-recursive (fix bug #30071).
* module/srfi/srfi-1.scm (unfold): Make tail-recursive, following a
suggestion by Szavai Gyula.
* test-suite/tests/srfi-1.test ("unfold"): New test prefix.
Ludovic Courtès [Fri, 8 Oct 2010 07:49:12 +0000 (09:49 +0200)]
Register `scm_init_r6rs_ports' as an extension.
* libguile/r6rs-ports.c (scm_register_r6rs_ports): New function.
* libguile/r6rs-ports.h (scm_register_r6rs_ports): New declaration.
* libguile/init.c (scm_i_init_guile): Call it.
Ludovic Courtès [Fri, 8 Oct 2010 07:46:39 +0000 (09:46 +0200)]
Always run at least the ASCII regexp tests.
* test-suite/tests/regexp.test (with-ascii-or-latin1-locale): New macro.
("regexp-quote"): Use it instead of `with-latin1-locale'.
Andy Wingo [Fri, 8 Oct 2010 10:29:54 +0000 (12:29 +0200)]
fix a bug in `finish'
* module/system/repl/command.scm (repl-pop-continuation-resumer)
(finish): Fix a bug printing return values.
Andy Wingo [Fri, 8 Oct 2010 10:23:34 +0000 (12:23 +0200)]
stepping traps use frame-next-source, not frame-source
* module/system/vm/trap-state.scm (add-ephemeral-stepping-trap!): Use
frame-next-source in stepping traps.
Andy Wingo [Fri, 8 Oct 2010 10:21:20 +0000 (12:21 +0200)]
add program-sources-pre-retire to core and define frame-next-source
* libguile/programs.h:
* libguile/programs.c (scm_program_source): Add an optional arg, the
sources table to traverse. Defaults to the result of
scm_program_sources.
* module/system/vm/program.scm (program-sources-pre-retire): Move
definition here from (system vm traps), and export.
* module/system/vm/traps.scm: Adapt.
* module/system/vm/frame.scm (frame-next-source): New exported binding,
returns the source line corresponding to the next instruction instead
of the previous instruction.
Andy Wingo [Fri, 8 Oct 2010 09:53:59 +0000 (11:53 +0200)]
fix error in frame-return-values
* module/system/vm/frame.scm (frame-return-values): Fix off-by-one
error.
Andy Wingo [Fri, 8 Oct 2010 09:52:38 +0000 (11:52 +0200)]
fix tracing of mv returns
* module/system/vm/trace.scm (print-return): Fix multiple-value-return
printing.
Andy Wingo [Fri, 8 Oct 2010 09:43:15 +0000 (11:43 +0200)]
more inlining in psyntax
* module/ice-9/psyntax.scm (make-wrap, wrap-marks, wrap-subst): Use
identifier syntax here too.
* module/ice-9/psyntax-pp.scm: Regenerated.
Andy Wingo [Fri, 8 Oct 2010 09:30:17 +0000 (11:30 +0200)]
inline symbol? and vector? to opcodes, and a psyntax inlining tweak
* libguile/vm-i-scheme.c (symbol?, vector?): New
instructions. Renumbered the rest.
* libguile/vm-i-system.c: Renumber instructions.
* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump.
* module/ice-9/psyntax.scm (binding-type, binding-value): Define using
macros so that we inline to car and cdr opcodes. Oh, for an inliner :)
* module/language/tree-il/compile-glil.scm (*primcall-ops*)
* module/language/tree-il/primitives.scm
(*interesting-primitive-names*, *effect-free-primitives*)
(*effect+exception-free-primitives*): Add symbol? and vector?
inlines.
Andy Wingo [Fri, 8 Oct 2010 09:13:19 +0000 (11:13 +0200)]
add repl debugging command docs
* doc/ref/scheme-using.texi (Debug Commands): Add docs for new debugging
commands (break, step, registers, etc).
Andy Wingo [Fri, 8 Oct 2010 08:54:03 +0000 (10:54 +0200)]
proof-reading fixen in api-debug
* doc/ref/api-debug.texi (Trap States, High-Level Traps): A couple of
proof-reading fixes.
Andy Wingo [Thu, 7 Oct 2010 22:00:16 +0000 (00:00 +0200)]
finish traps documentation
* doc/ref/api-debug.texi (Low-Level Traps, Tracing Traps, Trap States):
Add notes on using modules.
(High-Level Traps): Combine "Trap Handlers" and "Setting Traps"
here. Flesh out docs.
Andy Wingo [Thu, 7 Oct 2010 20:57:07 +0000 (22:57 +0200)]
remove old debugging examples from api-debug
* doc/ref/api-debug.texi (Debugging Examples): Remove section, as the
tracing bits are adequately covered in tracing, and the breakpoints
and such will get covered in the debugging meta-commands section.
Andy Wingo [Thu, 7 Oct 2010 20:50:33 +0000 (22:50 +0200)]
document trap states
* module/system/vm/trap-state.scm: Export add-trap!.
* doc/ref/api-debug.texi (Trap States): Document.
Andy Wingo [Thu, 7 Oct 2010 20:27:00 +0000 (22:27 +0200)]
document tracing traps
* doc/ref/api-debug.texi (Tracing Traps): Document the traps.
Andy Wingo [Thu, 7 Oct 2010 20:15:35 +0000 (22:15 +0200)]
finish documenting low-level traps, other api-debug.texi fixes
* doc/ref/api-debug.texi (Stack Capture): Rename from "Capturing the
Stack or Innermost Stack Frame". Move start-stack docs here.
(Frames): Document accessors for fp, sp, ip, et al.
(Source Properties): Raise to a subsection.
(VM Hooks): Add notes about the VM trace level within hook firing.
(Low-Level Traps): Flesh out.
Andy Wingo [Thu, 7 Oct 2010 11:06:57 +0000 (13:06 +0200)]
update traps documentation (unfinished)
* doc/ref/Makefile.am:
* doc/ref/guile.texi:
* doc/ref/scheme-debugging.texi: Remove scheme-debugging.texi, which
only described tracing. Tracing documentation is now in
api-debugging.
* doc/ref/scheme-using.texi (Evaluating Scheme Code): Remove reference
to source traps, as that section is going away.
* doc/ref/api-modules.texi (Included Guile Modules): Remove reference to
Tracing. This section is a little silly, anyway...
* doc/ref/api-evaluation.texi (VM Behaviour): Remove section, it is in
api-debugging now.
* doc/ref/api-debug.texi (Stacks, Frames): Rename sections from
"Examining the Stack" and "Examining Stack Frames", respectively.
(Traps): Update for current API. A big and not-quite-finished update.
Andy Wingo [Thu, 7 Oct 2010 10:56:43 +0000 (12:56 +0200)]
update docs regarding --debug
* doc/ref/scheme-scripts.texi (Invoking Guile): Update docs on --debug.
Andy Wingo [Thu, 7 Oct 2010 10:55:37 +0000 (12:55 +0200)]
rename vm-trace to call-with-trace
* module/system/vm/trace.scm (print-application, print-return): Change
to add more whitespace, as (ice-9 debug) did.
(call-with-trace): Rename from vm-trace, and make the vm a keyword
argument.
* module/system/repl/command.scm: Don't autoload (system vm profile).
(trace): Update for call-with-trace name change.
Andy Wingo [Wed, 6 Oct 2010 19:19:49 +0000 (21:19 +0200)]
update (system repl debug) todo
* module/system/repl/debug.scm: Update todo.
Andy Wingo [Wed, 6 Oct 2010 19:19:08 +0000 (21:19 +0200)]
add ,step ,stepi ,next and ,nexti
* module/system/vm/traps.scm (trap-matching-instructions): New trap,
just installs a next hook and runs the handler when a predicate
succeeds.
* module/system/vm/trap-state.scm (add-ephemeral-stepping-trap!): New
procedure, uses trap-matching-instructions with an appropriate
predicate to handle step, stepi, next, and nexti repl metacommands.
* module/system/repl/command.scm (step, step-instruction, next)
(next-instruction): New repl debugger commands.
Andy Wingo [Wed, 6 Oct 2010 19:17:06 +0000 (21:17 +0200)]
cleanups to ,finish
* module/system/repl/command.scm (repl-pop-continuation-resumer): Factor
out of finish.
(finish): Adapt.
* module/system/vm/trap-state.scm (add-ephemeral-trap-at-frame-finish!):
Rename to add "ephemeral" to the name.
* module/system/vm/traps.scm (trap-calls-to-procedure): Remove unused
#:width kwarg.
Andy Wingo [Wed, 6 Oct 2010 08:24:45 +0000 (10:24 +0200)]
build guile-readline/ after module/
* Makefile.am (SUBDIRS): Build module/ before guile-readline/. Reformat.
Andy Wingo [Tue, 5 Oct 2010 19:53:58 +0000 (21:53 +0200)]
add ,finish repl meta-command
* module/system/repl/command.scm (finish): New REPL meta command. Uses
fancy prompt stuff.
Andy Wingo [Tue, 5 Oct 2010 19:53:29 +0000 (21:53 +0200)]
(system vm trap-state): add-trap-at-frame-finish!
* module/system/vm/traps.scm: Fix a comment.
* module/system/vm/trap-state.scm (<trap-state>): Add next-ephemeral-idx
slot.
(wrapper-at-index): Use eqv? instead of = to avoid type errors in user
inputs.
(next-ephemeral-index!, ephemeral-handler-for-index): New functions,
allocate ephemeral trap ids for functions to be called only once.
(add-trap-at-frame-finish!): New export, traps when a frame finishes.
Andy Wingo [Tue, 5 Oct 2010 19:51:44 +0000 (21:51 +0200)]
(system vm frame): frame-return-values
* module/system/vm/frame.scm (frame-return-values): New exported
function, gives the return values for a frame.
* module/system/vm/trace.scm: Remove frame-return-values from here.
Andy Wingo [Tue, 5 Oct 2010 19:50:57 +0000 (21:50 +0200)]
debug-trap-handler ephemeral trap enhancement
* module/system/repl/error-handling.scm (call-with-error-handling): If
the given index is false, assume this was an ephemeral trap, and don't
print a welcome message or reference the trap by index.
Andy Wingo [Tue, 5 Oct 2010 19:49:13 +0000 (21:49 +0200)]
(system repl debug): add frame->stack-vector
* module/system/repl/debug.scm (frame->stack-vector): New public
function.
Andy Wingo [Tue, 5 Oct 2010 19:48:27 +0000 (21:48 +0200)]
fix embarrassing error preventing ,del from working
* module/system/vm/trap-state.scm (remove-trap-wrapper!): Oops, fix
newbie error regarding delq and mutation.
Andy Wingo [Tue, 5 Oct 2010 17:58:13 +0000 (19:58 +0200)]
system repl repl comments
* module/system/repl/repl.scm (meta-reader): Add a comment about peek,
read, and the EOF object.
Andy Wingo [Tue, 5 Oct 2010 17:55:37 +0000 (19:55 +0200)]
bugfixes and simplifications to ice-9 buffered-input.
* module/ice-9/buffered-input.scm (make-buffered-input-port): Simplify,
and fix one case in which we would buffer the EOF object.
Andy Wingo [Tue, 5 Oct 2010 17:38:21 +0000 (19:38 +0200)]
guile-readline slight modernization
* guile-readline/Makefile.am: Update to use am/guilec.
* guile-readline/ice-9/readline.scm (activate-readline): Update to use a
lambda*.
Andy Wingo [Mon, 4 Oct 2010 20:54:41 +0000 (22:54 +0200)]
Revert "repl.scm next-char needed to read EOF from port"
Actually peek-char => EOF does not guarantee that read-char => EOF. I
don't know what to do about this.
This reverts commit
6e1dccc42f9ec81e04524ccc0956c692ee423576.
Neil Jerram [Sun, 3 Oct 2010 22:22:03 +0000 (23:22 +0100)]
Edit section on generic functions
* doc/ref/goops.texi (Generic Functions and Accessors): Renamed from
`Creating Generic Functions'. Explain what an accessor is.
(Basic Generic Function Creation): Clarify the point of the text
about generics having short names.
Neil Jerram [Sun, 3 Oct 2010 22:20:17 +0000 (23:20 +0100)]
Edit section on slot access
* doc/ref/goops.texi (Instance Slots): Remove a little verbosity.
(Class Slots): Correct one `slot-missing' to `slot-unbound'.
Neil Jerram [Sun, 3 Oct 2010 22:17:54 +0000 (23:17 +0100)]
Typeset Ludo's name correctly
* doc/ref/history.texi (A Scheme of Many Maintainers): Add
TeX-specific version of `Courtès'.
Andy Wingo [Sun, 3 Oct 2010 21:09:32 +0000 (23:09 +0200)]
avoid some double-breaks in trap-at-procedure-ip-in-range
* module/system/vm/traps.scm (trap-at-procedure-ip-in-range): Rework not
to call the handler when returning to a frame that was already
entered. So now breaking at foo.scm:1234 doesn't break when returning
to that line.
Andy Wingo [Sun, 3 Oct 2010 21:08:27 +0000 (23:08 +0200)]
repl.scm next-char needed to read EOF from port
* module/system/repl/repl.scm (next-char): Actually read off the EOF if
we got one. Interesting, this.
Andreas Rottmann [Sun, 3 Oct 2010 19:54:22 +0000 (21:54 +0200)]
Add implementation of SRFI 45
* module/srfi/srfi-45.scm: New file, containing the reference implementation of
SRFI 45, slightly adapted to use SRFI-9.
* module/Makefile.am (SRFI_SOURCES): Added srfi/srfi-45.scm.
* test-suite/tests/srfi-45.test: New file.
* test-suite/Makefile.am (SCM_TESTS): Add tests/srfi-45.test.
* doc/ref/srfi-modules.texi (SRFI-45): New node and subsection;
essentially a shortended transcript of the SRFI-45 specification.
Michael Gran [Sat, 2 Oct 2010 21:29:14 +0000 (14:29 -0700)]
Add v1.8.x backward compatiblity to GUILE_SITE_DIR
* meta/guile.m4 (GUILE_SITE_DIR): use pkgdatadir if no sitedir
Andy Wingo [Sun, 3 Oct 2010 10:18:14 +0000 (12:18 +0200)]
srfi-67 #:replace work
* module/srfi/srfi-67.scm (string-compare, string-compare-ci): #:replace
these bindings.
Andreas Rottmann [Sun, 3 Oct 2010 10:14:21 +0000 (12:14 +0200)]
Add implementation of SRFI-67
* module/srfi/srfi-67/compare.scm: New file; reference implementation of
SRFI 67.
* module/srfi/srfi-67.scm: New module; includes the refernce
implementation.
* module/Makefile.am (SRFI_SOURCES): Add srfi/srfi-67.scm.
(NOCOMP_SOURCES): Add srfi/srfi-67/compare.scm.
* test-suite/tests/srfi-67.test: New file.
* test-suite/Makefile.am (SCM_TESTS): Add tests/srfi-67.test.
Andreas Rottmann [Sun, 3 Oct 2010 10:06:38 +0000 (12:06 +0200)]
Add implementation of SRFI 42
* module/srfi/srfi-42/ec.scm: New file; reference implementation of
SRFI 42.
* module/srfi/srfi-42.scm: New file; module for SRFI 42.
* module/Makefile.am (SRFI_SOURCES): Add srfi/srfi-42.scm.
(NOCOMP_SOURCES): Add srfi/srfi-42/ec.scm.
* test-suite/tests/srfi-42.test: New file; test suite for SRFI 42.
* test-suite/Makefile.am: SCM_TESTS: Add tests/srfi-42.test.
Andreas Rottmann [Sun, 3 Oct 2010 09:55:24 +0000 (11:55 +0200)]
Reference original specification in SRFI 27 documentation
* doc/ref/srfi-modules.texi (SRFI-27): Link to the original
specification of SRFI-27.
Andy Wingo [Sun, 3 Oct 2010 09:12:36 +0000 (11:12 +0200)]
bugfixen in source breakpoints and in-procedure traps
* module/system/vm/traps.scm (trap-in-procedure): If we are
(re-)entering the procedure from a return, call the enter-proc with
the returnee, not the returner.
(in-range?): Tighten up a bit.
(program-sources-before-retire): New helper, like program-sources but
indexed before instructions are retired instead of after.
(program-sources-by-line): Use program-sources-before-retire so that
we can break on instructions by source line *before* those
instructions are executed.
Neil Jerram [Sat, 2 Oct 2010 15:24:14 +0000 (16:24 +0100)]
Flatten `Miscellaneous Functions'
* doc/ref/goops.texi (Miscellaneous Functions): Delete this container
section, and promote its subsections.
Neil Jerram [Sat, 2 Oct 2010 15:12:32 +0000 (16:12 +0100)]
Customizing Instance Creation to metaobject protocol section
* doc/ref/goops.texi (Customizing Instance Creation): Moved from
`Creating Instances' to `The Metaobject Protocol'.
* doc/ref/goops.texi (Basic Instance Creation): Flattened into parent
`Creating Instances', refs updated accordingly.
Neil Jerram [Sat, 2 Oct 2010 15:10:56 +0000 (16:10 +0100)]
Remove goops-version, which is no longer defined
* doc/ref/goops.texi (Administrative Functions): Removed.
* module/oop/goops.scm (oop): Don't export `goops-version'.
Neil Jerram [Sat, 2 Oct 2010 14:39:14 +0000 (15:39 +0100)]
Remove doc of STKlos compatibility
As module/oop/goops/stklos.scm, the available compatibility is
superficial only, so it isn't worth documenting.
* doc/ref/goops.texi (STKlos Compatibility): Removed.
Neil Jerram [Sat, 2 Oct 2010 14:36:46 +0000 (15:36 +0100)]
Continue separating simple and more complex GOOPS doc
* doc/ref/goops.texi (Defining New Classes): Move `Class Definition
Internals' and `Customizing Class Definition' notes to the
metaobject protocol section.
Andy Wingo [Fri, 1 Oct 2010 16:25:44 +0000 (18:25 +0200)]
source breakpoints accept user line numbers
* module/system/vm/trap-state.scm (add-trap-at-source-location!):
* module/system/vm/traps.scm (trap-at-source-location): Rename "line"
argument to "user-line", indicating that the line is one-based instead
of zero-based. Decrement the line before handing off to
source-closures-or-procedures and source->ip-range.
Andy Wingo [Fri, 1 Oct 2010 16:15:23 +0000 (18:15 +0200)]
add source:line-for-user, returning a 1-indexed line number
* module/system/vm/program.scm (source:line-for-user): New exported
procedure, returns a 1-indexed line, suitable for presentation to a
user.
(write-program): Use source:line-for-user when making fallback names.
* module/system/vm/coverage.scm (coverage-data->lcov):
* module/language/assembly/disassemble.scm (source->string):
* module/system/repl/debug.scm (print-frame): Use source:line-for-user.
Andy Wingo [Fri, 1 Oct 2010 15:26:41 +0000 (17:26 +0200)]
api-debug tweak
* doc/ref/api-debug.texi (Debug Options): Fix wording.
Andy Wingo [Fri, 1 Oct 2010 15:11:25 +0000 (17:11 +0200)]
update api-debug.texi discussion of stack overflow
* doc/ref/api-debug.texi (Debug Options): Update stack overflow
discussion.
Andy Wingo [Fri, 1 Oct 2010 14:47:39 +0000 (16:47 +0200)]
c stack overflow checked for, once more
* libguile/stackchk.h: Include private-options.h if we are building
guile.
* libguile/vm.c (scm_c_vm_run): Check for C stack overflow before
entering the engine.
Andy Wingo [Fri, 1 Oct 2010 14:36:34 +0000 (16:36 +0200)]
scm_report_stack_overflow eventually resets scm_stack_checking_enabled_p
* libguile/stackchk.c (scm_report_stack_overflow): Surround in a
dynwind, so that scm_stack_checking_enabled_p is reset when the error
throws.
Neil Jerram [Thu, 30 Sep 2010 23:11:18 +0000 (00:11 +0100)]
Fix typo in configure.ac
Fixes an error when running ./configure:
./configure: line 31873: text: command not found
* configure.ac: Change "text" to "test", in libltdl-related code.
Andy Wingo [Fri, 1 Oct 2010 11:17:44 +0000 (13:17 +0200)]
deprecate turn-on-debugging, it is obsolete
* libguile/script.c (scm_compile_shell_switches): Don't generate calls
to turn-on-debugging.
* module/ice-9/boot-9.scm (turn-on-debugging): Remove.
* module/ice-9/deprecated.scm (turn-on-debugging): Add deprecated shim.
Andy Wingo [Fri, 1 Oct 2010 11:11:51 +0000 (13:11 +0200)]
scm_debug_opts to debug.c, backtrace on by default, scm_*_opts internal linkage
* libguile/eval.c:
* libguile/debug.c (scm_debug_opts): Move here, from eval.c. Change
SCM_BACKTRACE_P to 1, initially.
* libguile/private-options.h: Make all options vars private.
Andy Wingo [Fri, 1 Oct 2010 11:03:08 +0000 (13:03 +0200)]
document call-with-error-handling
* doc/ref/api-debug.texi (Pre-Unwind Debugging): Document
call-with-error-handling.
Andy Wingo [Fri, 1 Oct 2010 10:49:16 +0000 (12:49 +0200)]
api-debug.texi refactors
* doc/ref/api-debug.texi (Programmatic Error Handling): Rename from
"Debug on Error". Reorganize subsections according to when the error
is handled.
* doc/ref/api-options.texi: Adapt xref.
Andy Wingo [Fri, 1 Oct 2010 09:54:38 +0000 (11:54 +0200)]
update tour.texi
* doc/ref/tour.texi (Using the Guile Module System): Remove "in flux"
language. Update examples to use #:export instead of (export ...).
Andy Wingo [Fri, 1 Oct 2010 09:47:53 +0000 (11:47 +0200)]
finish cleaning out api-options.texi
* doc/ref/api-debug.texi (Debug on Error): Move debug options here (for
now). Leave debug-options-interface undocumented.
* doc/ref/api-options.texi (Runtime Options): Remove debug options. Link
to the sections where the options documentation is now. Update the
options example transcript.