bpt/guile.git
14 years agoguile-config depends on config.status
Andy Wingo [Tue, 15 Dec 2009 09:57:59 +0000 (10:57 +0100)]
guile-config depends on config.status

* meta/Makefile.am (guile-config): Depend on config.status, so that if
  $prefix changes, guile-config gets rebuilt.

14 years agoin the load path, look in library-dir before site-dir
Andy Wingo [Tue, 15 Dec 2009 09:49:22 +0000 (10:49 +0100)]
in the load path, look in library-dir before site-dir

* libguile/load.c (scm_init_load_path): Search first in Guile's
  version-specific path (the library path), *then* in the site dir. This
  should allow us to import some of Guile-lib's modules into Guile,
  perhaps customizing them with Guile-version-specific foo, without
  accidentally falling back to system-installed guile-lib in the
  sitedir. Also should reduce the number of stats by half, in the common
  case.

14 years agopsyntax's labels and marks now unique over a read/write boundary
Andy Wingo [Sun, 20 Dec 2009 14:29:09 +0000 (15:29 +0100)]
psyntax's labels and marks now unique over a read/write boundary

* module/ice-9/psyntax.scm (gen-label, new-mark): Labels and marks need
  to be unique across read/write boundaries -- it's not sufficient for
  them to simply be unique within a process by virtue of (string #\i)
  constructing a new object. This used to mostly work before, because
  the collapsing of duplicate constants didn't catch many syntax-object
  cases -- but for some reason the attached test case brings out the
  problem. So switch to use gensyms. Potentially more costly, but it's
  what upstream psyntax does now.

  This bug took me fully two days to figure out.

* module/ice-9/psyntax-pp.scm: Regenerated.

* test-suite/tests/syncase.test ("serializable labels and marks"): Add
  test case.

14 years agoDocument need for pkg-config to build Guile
Neil Jerram [Sat, 19 Dec 2009 22:37:24 +0000 (22:37 +0000)]
Document need for pkg-config to build Guile

* README: Say that ./configure needs pkg-config; why; and how to work
  around it.

14 years agoUpdate and simplify statement about RnRS support
Neil Jerram [Fri, 18 Dec 2009 01:11:40 +0000 (01:11 +0000)]
Update and simplify statement about RnRS support

* doc/ref/scheme-intro.texi (Guile Scheme): Mention R6RS as well as
  R5RS.  Simplify text.

14 years agomake the use of the 5-argument @xref command consistent
Brian Gough [Tue, 15 Dec 2009 10:28:49 +0000 (10:28 +0000)]
make the use of the 5-argument @xref command consistent

A few of the @xref references to external manuals in the documentation
are using an old 4-argument form that produces an undefined reference
in the printed manual.  The following patch makes them consistent with
the 5-argument @xrefs used elsewhere in the manual.

--
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/

>From 6ca0417830dc5a98699a15808591dc1f2a90dfac Mon Sep 17 00:00:00 2001
From: Brian Gough <bjg@gnu.org>
Date: Mon, 14 Dec 2009 21:34:59 +0000
Subject: [PATCH] make the use of the 5-argument @xref command consistent
 when referring to other manuals.

14 years agoAllow more characters in coding system names in Emacs-style declarations.
Ken Raeburn [Mon, 16 Nov 2009 17:16:05 +0000 (12:16 -0500)]
Allow more characters in coding system names in Emacs-style declarations.

* libguile/read.c (scm_i_scan_for_encoding): Allow more punctuation
  symbols in coding system names.

14 years agomore typo fixes
Brian Gough [Tue, 15 Dec 2009 10:16:14 +0000 (10:16 +0000)]
more typo fixes

More spelling corrections and fixes for doubled words (e.g. "the the")

--
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/

>From 7be02beedc739c32cce2c8ec8f4ac814c994a13f Mon Sep 17 00:00:00 2001
From: Brian Gough <bjg@gnu.org>
Date: Mon, 14 Dec 2009 22:06:22 +0000
Subject: [PATCH] fix various documentation typos (spelling & doubled words)

14 years agotypo fix
Brian Gough [Tue, 15 Dec 2009 10:14:48 +0000 (10:14 +0000)]
typo fix

Correction for garbled sentence.

--
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/

>From f819b597a46ad4ed23597e5a81d1acab46f15147 Mon Sep 17 00:00:00 2001
From: Brian Gough <bjg@gnu.org>
Date: Mon, 14 Dec 2009 20:04:34 +0000
Subject: [PATCH] typo fix

14 years agoadded brief introduction about SLIB
Brian Gough [Tue, 15 Dec 2009 10:12:07 +0000 (10:12 +0000)]
added brief introduction about SLIB

This patch adds a short introduction to the SLIB section of the manual
with a link to the SLIB homepage.

--
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/

>From 60548b6e039bf57694b7841996cfda011cb8a4bf Mon Sep 17 00:00:00 2001
From: Brian Gough <bjg@gnu.org>
Date: Mon, 14 Dec 2009 20:49:27 +0000
Subject: [PATCH] added brief introduction about SLIB

14 years agoHash Table examples - hashq takes different number of arguments
Brian Gough [Mon, 14 Dec 2009 22:19:32 +0000 (22:19 +0000)]
Hash Table examples - hashq takes different number of arguments

In the "Hash Tables Example" in the manual, hashq needs 2 arguments
instead of 1 (patch below).  I've updated the hash table output as
well to match the current version.

--
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/

>From fdb6101d2e064620746ebfc9f9cd28bbdd2470e8 Mon Sep 17 00:00:00 2001
From: Brian Gough <bjg@gnu.org>
Date: Mon, 14 Dec 2009 19:59:32 +0000
Subject: [PATCH] update docs for Hash Table Examples
 hashq now takes two arguments
 order of elements in hash table is different now

14 years agoreplace ascii figures with scalable ps/pdf versions.
Brian Gough [Wed, 9 Dec 2009 18:04:42 +0000 (18:04 +0000)]
replace ascii figures with scalable ps/pdf versions.

use ascii figures in HTML output, to work around deficiency in makeinfo
where images are not copied to target directory.

14 years agouse explicit ./scriptname to help novice users
Brian Gough [Wed, 9 Dec 2009 17:59:59 +0000 (17:59 +0000)]
use explicit ./scriptname to help novice users

14 years agouse correct url to ftp.gnu.org
Brian Gough [Wed, 9 Dec 2009 17:53:08 +0000 (17:53 +0000)]
use correct url to ftp.gnu.org

14 years agoBump version number for 1.9.6.
Ludovic Courtès [Tue, 15 Dec 2009 22:45:37 +0000 (23:45 +0100)]
Bump version number for 1.9.6.

* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.

14 years agoRemove unneeded #include <assert.h>.
Ludovic Courtès [Tue, 15 Dec 2009 19:20:38 +0000 (20:20 +0100)]
Remove unneeded #include <assert.h>.

* libguile/backtrace.c, libguile/eval.c, libguile/gc.c,
  libguile/goops.c, libguile/memoize.c, libguile/threads.c,
  libguile/uniform.c, libguile/vm.c,
  test-suite/standalone/test-conversion.c,
  test-suite/standalone/test-list.c: Don't include <assert.h>.

14 years agoUse Gnulib's `sys_stat' module; update Gnulib.
Ludovic Courtès [Tue, 15 Dec 2009 19:14:02 +0000 (20:14 +0100)]
Use Gnulib's `sys_stat' module; update Gnulib.

* .x-sc_prohibit_S_IS_definition: New file.

* m4/gnulib-cache.m4: Add `sys_stat'.

* libguile/filesys.c: Remove `S_IS*' macro definitions for Ultrix and
  MinGW.

14 years agoRemove obsolete test-suite makefile snippets.
Ludovic Courtès [Tue, 15 Dec 2009 18:23:08 +0000 (19:23 +0100)]
Remove obsolete test-suite makefile snippets.

* test-suite/Makefile.am (SCM_TESTS_DIRS): Remove.
  (dist-hook): Remove target.

14 years agoDisable thread-local storage on Solaris 8.
Ludovic Courtès [Tue, 15 Dec 2009 18:22:19 +0000 (19:22 +0100)]
Disable thread-local storage on Solaris 8.

* acinclude.m4 (GUILE_THREAD_LOCAL_STORAGE): Special-case `*solaris2.8'.

14 years agoChange the Elisp compiler from GPLv2+ to LGPLv3+.
Ludovic Courtès [Tue, 15 Dec 2009 18:10:48 +0000 (19:10 +0100)]
Change the Elisp compiler from GPLv2+ to LGPLv3+.

* module/language/elisp/bindings.scm, module/language/elisp/lexer.scm,
  module/language/elisp/parser.scm, module/language/elisp/runtime.scm,
  module/language/elisp/runtime/function-slot.scm,
  module/language/elisp/runtime/macro-slot.scm,
  module/language/elisp/runtime/value-slot.scm: Switch from GPLv2+ to
  LGPLv3+; fix copyright year.

14 years agoUse portable shell in `meta/uninstalled-env'.
Ludovic Courtès [Tue, 15 Dec 2009 00:11:01 +0000 (01:11 +0100)]
Use portable shell in `meta/uninstalled-env'.

* meta/uninstalled-env.in: Don't use the `-q' and `-E' options, which are
  specific to GNU grep.  Don't set-and-export environment variables at
  once since this is a GNU Bash extension.

14 years agoUse the right `grep' command.
Ludovic Courtès [Tue, 15 Dec 2009 00:00:36 +0000 (01:00 +0100)]
Use the right `grep' command.

* libguile/Makefile.am (.c.i): Use $(GREP), not `grep'.
  (check_signals, check_errnos): Use $(EGREP), not `egrep'.

14 years agoRemove GNU Make-specific function call.
Ludovic Courtès [Mon, 14 Dec 2009 23:59:14 +0000 (00:59 +0100)]
Remove GNU Make-specific function call.

* libguile/Makefile.am (c-tokenize.$(OBJEXT)): Remove use of GNU Make's
  `filter-out' function.

14 years agoRemove extraneous semicolon after `SCM_ARRAY_IMPLEMENTATION' & co.
Ludovic Courtès [Mon, 14 Dec 2009 23:53:13 +0000 (00:53 +0100)]
Remove extraneous semicolon after `SCM_ARRAY_IMPLEMENTATION' & co.

* libguile/bitvectors.c, libguile/srfi-4.c, libguile/strings.c,
  libguile/vectors.c: Remove extraneous semicolon after
  `SCM_ARRAY_IMPLEMENTATION' and `SCM_VECTOR_IMPLEMENTATION'
  invocations.

14 years agoRemove extraneous functions from `AC_REPLACE_FUNCS'.
Ludovic Courtès [Mon, 14 Dec 2009 23:45:14 +0000 (00:45 +0100)]
Remove extraneous functions from `AC_REPLACE_FUNCS'.

* configure.ac: Remove `inet_aton' and `putenv' from `AC_REPLACE_FUNCS'.

14 years agoAvoid `SCM_UNPACK ()' in constant expressions.
Ludovic Courtès [Mon, 14 Dec 2009 23:43:32 +0000 (00:43 +0100)]
Avoid `SCM_UNPACK ()' in constant expressions.

They made Sun C 5.8 emit a warning such as:

  line 71: warning: dead part of constant expression is nonconstant

* libguile/print.c (scm_print_opts): Don't use `SCM_UNPACK ()' here.

* libguile/read.c (scm_read_opts): Likewise.

14 years agoRemove `return' from `void' function.
Ludovic Courtès [Mon, 14 Dec 2009 23:38:50 +0000 (00:38 +0100)]
Remove `return' from `void' function.

* libguile/print.c (scm_print_symbol_name): Remove `return' statement.

14 years agoDon't use GCC zero-length arrays.
Ludovic Courtès [Mon, 14 Dec 2009 22:11:47 +0000 (23:11 +0100)]
Don't use GCC zero-length arrays.

* libguile/frames.c, libguile/objcodes.c, libguile/programs.c,
  libguile/vm-engine.c, libguile/vm-i-system.c, libguile/vm.c: Use
  `SCM_C_OBJCODE_BASE ()' instead of accessing the `base' field of
  `struct scm_objcode'.

* libguile/objcodes.h (struct scm_objcode)[base]: Remove.

14 years agoRemove uses of the non-standard `__FUNCTION__'.
Ludovic Courtès [Mon, 14 Dec 2009 14:21:54 +0000 (15:21 +0100)]
Remove uses of the non-standard `__FUNCTION__'.

* libguile/gc.c (scm_gc_sweep): Replace `__FUNCTION__' by `FUNC_NAME'.

* libguile/read.c (scm_read_r6rs_block_comment): Likewise.

14 years agoexpose frame-previous, once again
Andy Wingo [Mon, 14 Dec 2009 23:20:47 +0000 (00:20 +0100)]
expose frame-previous, once again

* libguile/frames.h:
* libguile/frames.c (scm_frame_previous): Rename from scm_c_frame_prev,
  and expose to Scheme. Skip boot frames.

* libguile/stacks.c (stack_depth, narrow_stack, scm_make_stack)
  (scm_stack_ref): Adjust for scm_frame_previous skipping boot frames.

14 years agoFix test environment issue with ltdl from Libtool 2.2.6b.
Ludovic Courtès [Mon, 14 Dec 2009 09:59:25 +0000 (10:59 +0100)]
Fix test environment issue with ltdl from Libtool 2.2.6b.

Earlier versions of ltdl would look for extensions under $PWD; this
behavior changed in 2.2.6b.

* test-suite/standalone/Makefile.am (TESTS_ENVIRONMENT): Define
  $builddir.

* test-suite/standalone/test-asmobs: Specify the full path to
  `libtest-asmobs', using $builddir.

* test-suite/standalone/test-extensions: Likewise.

14 years agomore NEWS updates
Andy Wingo [Sun, 13 Dec 2009 19:18:50 +0000 (20:18 +0100)]
more NEWS updates

* NEWS: Update some more.

14 years agoprimitive-eval passes first N args on stack directly, not via apply
Andy Wingo [Sun, 13 Dec 2009 16:05:10 +0000 (17:05 +0100)]
primitive-eval passes first N args on stack directly, not via apply

* libguile/memoize.c (MAKMEMO_CALL): Memoize in the number of arguments
  at the call site.
  (memoize, scm_m_cond, memoize_named_let, unmemoize):
* libguile/eval.c (eval): Adapt to changes in call memoization.

* module/ice-9/eval.scm (primitive-eval): For calls, pass the first N
  arguments directly on the stack, and only the rest as a consed
  argument list to apply. Currently N is 4.

14 years agointerpreted closures cons less.
Andy Wingo [Sun, 13 Dec 2009 15:18:39 +0000 (16:18 +0100)]
interpreted closures cons less.

* module/ice-9/eval.scm (primitive-eval): When making a closure with N
  formals, actuall return a closure with N formals, if N is less than
  *max-static-argument-count*, which currently is 8. If N is greater
  than 8, do the arg-parsing loop as we did before. Requires some
  macrology, but should reduce unnecessary consing for interpreted
  closures.

* test-suite/tests/goops.test:
* test-suite/tests/hooks.test: Now that checks like (thunk? foo) are
  going to work as a for interpreted code, remove some (throw
  'unresolved).

14 years agocommit draft of NEWS
Andy Wingo [Fri, 11 Dec 2009 23:10:14 +0000 (00:10 +0100)]
commit draft of NEWS

14 years agolame tweak to the inliner
Andy Wingo [Fri, 11 Dec 2009 20:51:02 +0000 (21:51 +0100)]
lame tweak to the inliner

* module/language/tree-il/inline.scm: Tweak to avoid a (if #t #t #f).
  Yes, it's lame.

14 years agoprepare NEWS for 1.9.6
Andy Wingo [Fri, 11 Dec 2009 17:17:01 +0000 (18:17 +0100)]
prepare NEWS for 1.9.6

* NEWS: Prepare NEWS for 1.9.6.

14 years agoTweak the "unused modules are removed" test.
Ludovic Courtès [Fri, 11 Dec 2009 22:27:47 +0000 (23:27 +0100)]
Tweak the "unused modules are removed" test.

* test-suite/tests/gc.test ("gc")["unused modules are removed"]: Add
  loop to clean up stale references from the stack.

14 years agoSRFI-1: Use the built-in optional argument support.
Ludovic Courtès [Fri, 11 Dec 2009 14:20:12 +0000 (15:20 +0100)]
SRFI-1: Use the built-in optional argument support.

* module/srfi/srfi-1.scm (iota, unfold, unfold-right, alist-delete,
  alist-delete!): Use `define*' and optional arguments instead of rest
  arguments.

14 years agoFix expansion of `(+ 1 x)'.
Ludovic Courtès [Fri, 11 Dec 2009 13:56:49 +0000 (14:56 +0100)]
Fix expansion of `(+ 1 x)'.

* module/language/tree-il/primitives.scm (+): Fix typo.

14 years agoTypo.
Ludovic Courtès [Fri, 11 Dec 2009 13:32:34 +0000 (14:32 +0100)]
Typo.

* test-suite/Makefile.am (SCM_TESTS): Fix typos:
  `.text' -> `.test'.

14 years agoSRFI-9: Make accessors inlinable.
Ludovic Courtès [Sun, 6 Dec 2009 22:15:18 +0000 (23:15 +0100)]
SRFI-9: Make accessors inlinable.

* module/srfi/srfi-9.scm (define-inlinable): New macro.
  (define-record-type): Use it.

14 years agoSRFI-9: Reimplement in terms of structs, using `syntax-case'.
Ludovic Courtès [Sun, 6 Dec 2009 00:00:04 +0000 (01:00 +0100)]
SRFI-9: Reimplement in terms of structs, using `syntax-case'.

* module/srfi/srfi-9.scm (define-record-type): Rewrite to use raw
  structs instead of records.  Use `syntax-case' instead of
  `define-macro'.

14 years agoAdd struct & vector benchmarks.
Ludovic Courtès [Fri, 11 Dec 2009 11:58:06 +0000 (12:58 +0100)]
Add struct & vector benchmarks.

* benchmark-suite/benchmarks/structs.bm,
  benchmark-suite/benchmarks/vectors.bm: New files.

* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add.

* benchmark-suite/benchmarks/bytevectors.bm: Fix copyright.

14 years agoAdd opcodes for `struct?', `struct-vtable', and `make-struct'.
Ludovic Courtès [Fri, 11 Dec 2009 11:44:29 +0000 (12:44 +0100)]
Add opcodes for `struct?', `struct-vtable', and `make-struct'.

* libguile/vm-engine.c (VM_NAME)[vm_error_not_a_struct]: New label.

* libguile/vm-i-scheme.c (VM_VALIDATE_STRUCT): New macro.
  (struct_p, struct_vtable, make_struct): New instructions.

* module/language/tree-il/compile-glil.scm (*primcall-ops*): Add
  `struct?', `struct-vtable', and `make-struct'.

* module/language/tree-il/primitives.scm (*interesting-primitive-names*,
  *effect-free-primitives*): Likewise.

14 years agovm no longer measures bogoclock or times, relies on os for that
Andy Wingo [Fri, 11 Dec 2009 11:38:47 +0000 (12:38 +0100)]
vm no longer measures bogoclock or times, relies on os for that

* libguile/vm.h (struct scm_vm): Remove "time" and "clock" members. The
  time was bogusly measured, and the "clock" measured instructions
  retired, which is not a very useful measurement, and it was causing
  lots of memory accesses. Not that I have done a proper profile,
  though...
  (scm_vm_stats): Remove this procedure, which provided access to "time"
  and "clock".

* libguile/vm.c:
* libguile/vm-engine.h:
* libguile/vm-engine.c:
* libguile/vm-i-system.c: Adapt to scm_vm changes and scm_vm_stats
  removal.

* module/system/repl/command.scm:
* module/system/vm/vm.scm: Adapt to vm-stats removal by removing
  vm-stats from <repl>.

14 years agoinline calls to (memv foo CONSTANT-LIST)
Andy Wingo [Fri, 11 Dec 2009 11:20:55 +0000 (12:20 +0100)]
inline calls to (memv foo CONSTANT-LIST)

* module/language/tree-il/primitives.scm
  (*interesting-primitive-names*): Recognize memv and memq as well.

* module/language/tree-il/inline.scm (inline!): Inline calls to memq and
  memv where the list is a constant.

14 years agorename <conditional> then and else to consequent and alternate
Andy Wingo [Fri, 11 Dec 2009 11:00:27 +0000 (12:00 +0100)]
rename <conditional> then and else to consequent and alternate

* module/language/tree-il.scm (<tree-il>): Rename the "then" and "else"
  clauses of <conditional> to "consequent" and "alternate". More
  verbose, yes, but that way we avoid unexpected behavior with "else".
  (parse-tree-il, unparse-tree-il, tree-il->scheme, tree-il-fold):
  (make-tree-il-folder, post-order!, pre-order!)
* module/language/tree-il/analyze.scm (analyze-lexicals):
* module/language/tree-il/compile-glil.scm (flatten):
* module/language/tree-il/fix-letrec.scm (simple-expression?): Update
  callers.

14 years agorename lambda-case-else to lambda-case-alternate
Andy Wingo [Fri, 11 Dec 2009 10:49:14 +0000 (11:49 +0100)]
rename lambda-case-else to lambda-case-alternate

* module/language/tree-il.scm (<tree-il>): Rename the "else" field of
  <lambda-case> to "alternate". Conflicts less with the "else" keyword
  as used by case, cond, record-case, pmatch, etc.
  (parse-tree-il, unparse-tree-il, tree-il->scheme, tree-il-fold)
  (make-tree-il-folder, post-order!, pre-order!): Adapt traversal
  operators for <lambda-case> change.

* module/language/tree-il/analyze.scm (analyze-lexicals)
  (validate-arity):
* module/language/tree-il/compile-glil.scm (flatten):
* module/language/tree-il/inline.scm (inline!): Adapt for <lambda-case>
  change.

14 years agovm: handle interrupts on backwards jumps
Andy Wingo [Fri, 11 Dec 2009 10:17:03 +0000 (11:17 +0100)]
vm: handle interrupts on backwards jumps

* libguile/vm-i-system.c (BR, br): Handle interrupts on backwards jumps,
  so we can Ctrl-C an endless loop.

14 years agoless overhead for handling interrupts in the vm
Andy Wingo [Fri, 11 Dec 2009 10:15:12 +0000 (11:15 +0100)]
less overhead for handling interrupts in the vm

* libguile/__scm.h (SCM_ASYNC_TICK): Add some branch prediction.
  (SCM_ASYNC_TICK_WITH_CODE): New helper for when BUILDING_LIBGUILE,
  runs code only if we're going to call async_click().
* libguile/vm-engine.h (VM_HANDLE_INTERRUPTS): New helper, uses
  SCM_ASYNC_TICK_WITH_CODE to only save regs if we'll handle an
  interrupt.
* libguile/vm-i-system.c (call, goto/args, return): use
  VM_HANDLE_INTERRUPTS.

14 years agoadd partial support for tail patterns in syntax-rules/syntax-case
Andreas Rottmann [Fri, 11 Dec 2009 09:51:05 +0000 (10:51 +0100)]
add partial support for tail patterns in syntax-rules/syntax-case

I've prepared a patch that adds partial support for tail patterns.
Things like the the SRFI-34 `guard' macro from [0] are supported, but
you still can't combine dotted patterns with tail patterns, e.g.

(syntax-rules (else)
  ((foo bar ... (else something) . rest)
   <TEMPLATE-HERE>))

will *not* work; there's the issue that one can't just transcribe
the implementation of this feature from the latest version of psyntax,
as I've done for non-dotted tail patterns, as it's implemented using a
dotted pattern like the above. Alas!

[0] <http://article.gmane.org/gmane.lisp.guile.devel/9442>

* module/ice-9/psyntax.scm (syntax-case, $sc-dispatch): Add support for
  tail patterns, transcribed from the latest psyntax.

* module/ice-9/psyntax-pp.scm: Regenerated.

* test-suite/tests/syncase.test: Add tests for tail patterns.

14 years agomerge from master to elisp
Andy Wingo [Fri, 11 Dec 2009 09:21:31 +0000 (10:21 +0100)]
merge from master to elisp

* module/language/elisp/compile-tree-il.scm: Update for changes to
  tree-il (lambda-case, mainly).

* module/language/elisp/spec.scm: Update GPL version to 3. Update reader
  for new taking a port and environment argument.

* libguile/_scm.h: Bump objcode version.

* libguile/vm-i-system.c: Fix conflicts.

* module/Makefile.am: Fix conflicts, and add elisp modules to the build.

14 years agoadd ice-9/quasisyntax.scm to NOCOMP_SOURCES
Andy Wingo [Thu, 10 Dec 2009 20:43:47 +0000 (21:43 +0100)]
add ice-9/quasisyntax.scm to NOCOMP_SOURCES

* module/Makefile.am (NOCOMP_SOURCES): Add quasisyntax.scm.

14 years agofix emission of meta procedures
Andy Wingo [Thu, 10 Dec 2009 19:26:54 +0000 (20:26 +0100)]
fix emission of meta procedures

* module/language/glil/compile-assembly.scm: Fix the check for when to
  emit a "meta" procedure. Fixes
  http://thread.gmane.org/gmane.lisp.guile.user/7469/focus=7470.

14 years agoif we have no eval.go, load no .go
Andy Wingo [Thu, 10 Dec 2009 19:26:13 +0000 (20:26 +0100)]
if we have no eval.go, load no .go

* libguile/load.c (scm_init_eval_in_scheme): If we have no eval.go, null
  out the load-compiled path so that we load no compiled code. Prevents
  partially compiled Guile from turning tail-calls into stack-munching
  calls.

14 years agoadd gbt macro to gdbinit, and fix a bug in program-arity
Andy Wingo [Thu, 10 Dec 2009 15:03:23 +0000 (16:03 +0100)]
add gbt macro to gdbinit, and fix a bug in program-arity

* gdbinit: Add gbt macro, to make a Guile backtrace whenever you want.
* module/system/vm/program.scm (program-arity): If ip is #f, just take
  the first arity.

14 years agofix arbiter compilation with the generic codepath
Andy Wingo [Wed, 9 Dec 2009 09:21:31 +0000 (10:21 +0100)]
fix arbiter compilation with the generic codepath

* libguile/arbiters.c (scm_try_arbiter, scm_release_arbiter): Fix for
  the generic case; not sure why it wasn't working.

14 years agofix FUNC_NAME of scm_memoize_variable_access_x
Andy Wingo [Wed, 9 Dec 2009 09:07:04 +0000 (10:07 +0100)]
fix FUNC_NAME of scm_memoize_variable_access_x

* libguile/memoize.c (scm_memoize_variable_access_x): Fix FUNC_NAME
  definition.

14 years agoadd SCM_SMOB_TYPE_BITS and SCM_SMOB_TYPE_MASK
Andy Wingo [Tue, 8 Dec 2009 21:53:21 +0000 (22:53 +0100)]
add SCM_SMOB_TYPE_BITS and SCM_SMOB_TYPE_MASK

* libguile/smob.h (SCM_SMOB_TYPE_BITS, SCM_SMOB_TYPE_MASK): New macros,
  for when you want to identify a SMOB by type and mask.

* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/srfi-4.c: Use the new macros.

14 years agofix SCM_CELL macro usage.
Andy Wingo [Tue, 8 Dec 2009 20:59:42 +0000 (21:59 +0100)]
fix SCM_CELL macro usage.

* libguile/vm.h (SCM_VM_CONT_DATA): Fix SCM_CELL macro usage.

14 years agoSCM_CELL in throw.c
Andy Wingo [Tue, 8 Dec 2009 20:59:01 +0000 (21:59 +0100)]
SCM_CELL in throw.c

* libguile/throw.c (JBACTIVE, ACTIVATEJB, DEACTIVATEJB, JBJMPBUF)
  (SETJBJMPBUF, SCM_JBPREUNWIND, SCM_SETJBPREUNWIND)
  (pre_unwind_data_print, scm_ithrow): Fix SCM_CELL macro usage.

14 years agoSCM_VALIDATE_SMOB uses SCM_SMOB_PREDICATE
Andy Wingo [Tue, 8 Dec 2009 20:55:20 +0000 (21:55 +0100)]
SCM_VALIDATE_SMOB uses SCM_SMOB_PREDICATE

* libguile/validate.h (SCM_VALIDATE_SMOB): Change to use
  SCM_SMOB_PREDICATE instead of SCM_TYP16_PREDICATE.

14 years agoSCM_CELL in srfi-4.c
Andy Wingo [Tue, 8 Dec 2009 20:54:27 +0000 (21:54 +0100)]
SCM_CELL in srfi-4.c

* libguile/srfi-4.c (SCM_UVEC_TYPE, SCM_UVEC_LENGTH, SCM_UVEC_BASE): Fix
  SCM_CELL macro usage.

14 years agoSCM_CELL in srcprop.c
Andy Wingo [Tue, 8 Dec 2009 20:53:15 +0000 (21:53 +0100)]
SCM_CELL in srcprop.c

* libguile/srcprop.c (SRCPROPPOS, SRCPROPCOPY, SRCPROPALIST)
  (SETSRCPROPPOS, SETSRCPROPCOPY, SETSRCPROPALIST): Fix erroneous
  SCM_CELL macro usage.

14 years agouse the new public metatables from struct.c
Andy Wingo [Tue, 8 Dec 2009 20:52:15 +0000 (21:52 +0100)]
use the new public metatables from struct.c

* libguile/procs.c (scm_init_procs): No need to lookup the
  applicable-struct-with-setter vtable, as it is now exported.

14 years agoscm_i_alloc_struct does not take a "what" arg
Andy Wingo [Tue, 8 Dec 2009 20:50:40 +0000 (21:50 +0100)]
scm_i_alloc_struct does not take a "what" arg

* libguile/struct.h:
* libguile/struct.c (scm_i_alloc_struct): Change to not take a "what"
  argument. Callers changed.

14 years agoreserve a vtable flag for smobs.
Andy Wingo [Tue, 8 Dec 2009 20:48:33 +0000 (21:48 +0100)]
reserve a vtable flag for smobs.

* libguile/struct.h (SCM_VTABLE_FLAG_SMOB_0): Reserve a vtable flag for
  smobs.

14 years agoadd vtable finalizer and printer setter macros
Andy Wingo [Tue, 8 Dec 2009 20:47:47 +0000 (21:47 +0100)]
add vtable finalizer and printer setter macros

* libguile/struct.h (SCM_VTABLE_INSTANCE_FINALIZER): Use DATA_REF, not
  SLOT_REF.
  (SCM_SET_VTABLE_INSTANCE_FINALIZER, SCM_SET_VTABLE_INSTANCE_PRINTER):
  New accessor macros.

14 years agomake some applicable struct vtable-vtable public to C
Andy Wingo [Tue, 8 Dec 2009 20:46:47 +0000 (21:46 +0100)]
make some applicable struct vtable-vtable public to C

* libguile/struct.h (scm_standard_vtable_vtable)
  (scm_applicable_struct_vtable_vtable)
  (scm_applicable_struct_with_setter_vtable_vtable)
* libguile/struct.c: Make these stock meta-tables public to C.

14 years agoSCM_CELL in modules.c
Andy Wingo [Tue, 8 Dec 2009 20:41:48 +0000 (21:41 +0100)]
SCM_CELL in modules.c

* libguile/modules.c (SCM_F_EVAL_CLOSURE_INTERFACE)
  (SCM_EVAL_CLOSURE_INTERFACE_P, scm_standard_interface_eval_closure):
  Fix to not use SCM_CELL macros.

14 years agoinitialize smobs after structs
Andy Wingo [Tue, 8 Dec 2009 20:38:51 +0000 (21:38 +0100)]
initialize smobs after structs

* libguile/init.c (scm_i_init_guile): Move SMOB prehistory after structs
  init. No effect for now.

14 years agoSCM_CELL in guardians.c
Andy Wingo [Tue, 8 Dec 2009 20:37:25 +0000 (21:37 +0100)]
SCM_CELL in guardians.c

* libguile/guardians.c (GUARDIAN_DATA): Fix SCM_CELL macro usage.

14 years agoSCM_CELL in filesys.[ch]
Andy Wingo [Tue, 8 Dec 2009 20:31:42 +0000 (21:31 +0100)]
SCM_CELL in filesys.[ch]

* libguile/filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P)
* libguile/filesys.c (scm_readdir, scm_rewinddir, scm_closedir)
  (scm_dir_print, scm_dir_free): Fix SCM_CELL macro usage.

14 years agoSCM_CELL in deprecated.c
Andy Wingo [Tue, 8 Dec 2009 20:28:34 +0000 (21:28 +0100)]
SCM_CELL in deprecated.c

* libguile/deprecated.c (scm_smob_free): Fix SCM_CELL macro usage.

14 years agofix SCM_CELL macro usage in continuations.[ch]
Andy Wingo [Tue, 8 Dec 2009 20:27:26 +0000 (21:27 +0100)]
fix SCM_CELL macro usage in continuations.[ch]

* libguile/continuations.h (SCM_CONTREGS):
* libguile/continuations.c (continuation_print): Fix SCM_CELL macro
  usage.

14 years agofix SCM_CELL_* macro usage in async.c
Andy Wingo [Tue, 8 Dec 2009 20:25:31 +0000 (21:25 +0100)]
fix SCM_CELL_* macro usage in async.c

* libguile/async.c (ASYNC_GOT_IT, SET_ASYNC_GOT_IT, ASYNC_THUNK): Fix
  SCM_CELL_* macro usage.

14 years agofix SCM_CELL_* macro usage in arbiters.c
Andy Wingo [Tue, 8 Dec 2009 20:23:25 +0000 (21:23 +0100)]
fix SCM_CELL_* macro usage in arbiters.c

* libguile/arbiters.c (scm_try_arbiter, scm_release_arbiter): Fix
  erroneous SCM_CELL_* macro usage.

14 years agofix erroneous SCM_CELL_* usage in arrays.[ch]
Andy Wingo [Tue, 8 Dec 2009 20:21:37 +0000 (21:21 +0100)]
fix erroneous SCM_CELL_* usage in arrays.[ch]

* libguile/arrays.h (SCM_I_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_NDIM):
  (SCM_I_ARRAY_CONTP, SCM_I_ARRAY_MEM):
* libguile/arrays.c (SCM_SET_ARRAY_CONTIGUOUS_FLAG):
  (SCM_CLR_ARRAY_CONTIGUOUS_FLAG): Fix macros to use SCM_SMOB macros
  instead of SCM_CELL macros.

14 years agoclean up smob macro implementation
Andy Wingo [Tue, 8 Dec 2009 21:14:26 +0000 (22:14 +0100)]
clean up smob macro implementation

* libguile/smob.h: Regularize the SCM_SMOB macros, and make them all go
  through some generic SMOB accessor macros.

* libguile/smob.c (scm_i_set_smob_flags): Remove, as it is unused.

14 years agoadd scm_c_make_struct[v]
Andy Wingo [Mon, 7 Dec 2009 10:14:01 +0000 (11:14 +0100)]
add scm_c_make_struct[v]

* libguile/struct.h (scm_c_make_struct, scm_c_make_structv): New
  functions with which you can make a struct without consing a rest
  list.

* libguile/struct.c (scm_struct_init): Refactor to take an array of init
  values, not a list.
  (scm_make_struct, scm_make_vtable_vtable): Pull the rest arg out into
  a list and pass it down to the new array-taking functions.

* libguile/memoize.c: Remove a neeless #include <alloca>.

14 years agoprocedures-with-setters implemented in terms of structs
Andy Wingo [Mon, 7 Dec 2009 08:56:58 +0000 (09:56 +0100)]
procedures-with-setters implemented in terms of structs

* libguile/tags.h (scm_tc7_pws): No more.

* libguile/procs.c (scm_procedure_with_setter_p)
  (scm_make_procedure_with_setter, scm_procedure, scm_setter): Implement
  procedures-with-setters in terms of applicable structs with setters.

* libguile/procs.h: Remove a big, outdated comment, and the deprecated
  macros.

* libguile/deprecated.h (SCM_PROCEDURE_WITH_SETTER_P, SCM_PROCEDURE)
  (SCM_SETTER): Deprecate these. SCM_PROCEDURE and SCM_SETTER are bad
  names.

* libguile/evalext.c (scm_self_evaluating_p):
* libguile/gc.c (scm_i_tag_name):
* libguile/goops.c: (scm_class_of):
* libguile/print.c (iprin1):
* libguile/procprop.c (scm_i_procedure_arity):
* libguile/procs.c (scm_procedure_p):
* libguile/debug.c (scm_procedure_source): Remove a tc7_pws case.

* libguile/goops.h:
* libguile/goops.c (scm_class_procedure_with_setter): Remove this class;
  it is subsumed by applicable_struct_with_setter.

* libguile/struct.h: Update a comment.

* libguile/vm-i-system.c (call, goto/args, mv-call): Remove PWS cases.

14 years agostructs are alive early in guile's boot
Andy Wingo [Sat, 5 Dec 2009 11:47:58 +0000 (12:47 +0100)]
structs are alive early in guile's boot

* libguile/init.c (scm_i_init_guile): Reorder deps so structs are
  initialized early in the boot process.

14 years agomore annotations to scm_i_init_guile
Andy Wingo [Sat, 5 Dec 2009 11:06:16 +0000 (12:06 +0100)]
more annotations to scm_i_init_guile

* libguile/init.c (scm_i_init_guile): Annotate things that need smobs.

14 years agodecruftify scm_sys_protects
Andy Wingo [Sat, 5 Dec 2009 11:38:32 +0000 (12:38 +0100)]
decruftify scm_sys_protects

* libguile/root.h
* libguile/root.c (scm_sys_protects): It used to be that for some reason
  we'd define a special array of "protected" values. This was a little
  silly, always, but with the BDW GC it's completely unnecessary. Also
  many of these variables were unused, and none of them were good API.
  So remove this array, and either eliminate, make static, or make
  internal the various values.

* libguile/snarf.h: No need to generate calls to scm_permanent_object.

* guile-readline/readline.c (scm_init_readline): No need to call
  scm_permanent_object.

* libguile/array-map.c (ramap, rafe): Remove the dubious nullvect
  optimizations.

* libguile/async.c (scm_init_async): No need to init scm_asyncs, it is
  no more.

* libguile/eval.c (scm_init_eval): No need to init scm_listofnull, it is
  no more.

* libguile/gc.c: Make scm_protects a static var.
  (scm_storage_prehistory): Change the sanity check to use the address
  of protects.
  (scm_init_gc_protect_object): No need to clear the scm_sys_protects,
  as it is no more.

* libguile/keywords.c: Make the keyword obarray a static var.
* libguile/numbers.c: Make flo0 a static var.
* libguile/objprop.c: Make object_whash a static var.
* libguile/properties.c: Make properties_whash a static var.

* libguile/srcprop.h:
* libguile/srcprop.c: Make scm_source_whash a global with internal
  linkage.

* libguile/strings.h:
* libguile/strings.c: Make scm_nullstr a global with internal linkage.

* libguile/vectors.c (scm_init_vectors): No need to init scm_nullvect,
  it's unused.

14 years agofurther boot cleanups
Andy Wingo [Sat, 5 Dec 2009 10:50:21 +0000 (11:50 +0100)]
further boot cleanups

* 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.

14 years agomore boot cleanup
Andy Wingo [Sat, 5 Dec 2009 10:43:20 +0000 (11:43 +0100)]
more boot cleanup

* libguile/bytevectors.c (scm_bootstrap_bytevectors): Remove a call to
  scm_gc_protect_object.

* libguile/gc.h:
* libguile/gc.c (scm_init_gc_protect_object): Rename from
  scm_init_storage, and just return void. Make the GC boot procs have
  internal linkage.

* libguile/init.c: Adapt to the name change.

14 years agoremove a bunch of needless scm_permanent_object calls
Andy Wingo [Sat, 5 Dec 2009 10:30:09 +0000 (11:30 +0100)]
remove a bunch of needless scm_permanent_object calls

* 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.

14 years agosome scm_i_init_guile cleanups
Andy Wingo [Sat, 5 Dec 2009 10:16:54 +0000 (11:16 +0100)]
some scm_i_init_guile cleanups

* libguile/init.c (scm_i_init_guile): Since hash tables are tc7 objects,
  things that depend on hash tables no longer depend on smobs, so move
  smob_prehistory up a bit. No more struct_prehistory.

* libguile/struct.h:
* libguile/struct.c (scm_struct_prehistory): Remove empty function.

14 years agoremove scm_ports_prehistory
Andy Wingo [Sat, 5 Dec 2009 10:10:11 +0000 (11:10 +0100)]
remove scm_ports_prehistory

* libguile/ports.h:
* libguile/ports.c (scm_ports_prehistory): Remove this function. Just
  initialize global vars to NULL/0 instead of needing a prehistory
  function.

14 years agoadd printer for dynamic-states
Andy Wingo [Sat, 5 Dec 2009 09:55:37 +0000 (10:55 +0100)]
add printer for dynamic-states

* libguile/fluids.c:
* libguile/fluids.h:
* libguile/print.c: Add dynamic-state printing infrastructure.

14 years agofluids are tc7 objects
Andy Wingo [Sat, 5 Dec 2009 09:52:18 +0000 (10:52 +0100)]
fluids are tc7 objects

If you're wondering what I'm doing, I'm trying to eventually reimplement
smobs in terms of structs, so that applicable smobs can just follow the
applicable struct dispatch path. But to do that I have to get structs
initialized before things that use smobs, which means transforming a
bunch of smobby things to tc7 things. But this transformation is good
for performance anyway, and we currently have a glut of unused tc7s,
so here we go...

* libguile/tags.h (scm_tc7_fluid, scm_tc7_dynamic_state): Fluids (and
  dynamic states) now have tc7s.

* libguile/fluids.h: Remove scm_fluids_prehistory, and add internal
  scm_i_fluid_print. Update a comment.

* libguile/fluids.c: Update for tc7 representation. Also remove the next
  pointers while we're at it, as they aren't used in the new BDW GC.

* libguile/eq.c (scm_equal_p): Remove the hashtable case. Hashtables
  could never be equal? before, I don't see why to add stubs doing the
  same thing now.

* libguile/print.c (iprin1):
* libguile/gc.c (scm_i_tag_name):
* libguile/evalext.c (scm_self_evaluating_p): Add fluid and
  dynamic_state cases.

* libguile/goops.h: Remove scm_class_hashtable; it will be static.
* libguile/goops.c: Make <hashtable> static, and add <fluid> and
  <dynamic-state> classes.

* libguile/hashtab.h:
* libguile/hashtab.c: Remove scm_i_hashtable_equal_p.

* libguile/init.c (scm_i_init_guile): Remove call to fluids_prehistory.

14 years agohash tables have a tc7
Andy Wingo [Sat, 5 Dec 2009 09:07:07 +0000 (10:07 +0100)]
hash tables have a tc7

* libguile/tags.h (scm_tc7_hashtable): Allocate a tc7 for hashtables.

* libguile/hashtab.h: Adjust macros accordingly.
  (scm_i_hashtable_print, scm_i_hashtable_equal_p): New internal
  functions.
  (scm_hashtab_prehistory): Remove, no more need for this.

* libguile/hashtab.c (scm_hash_fn_remove_x): Fix a longstanding bug.
  (make_hash_table): Adapt to the new hash table representation.

* libguile/eq.c (scm_equal_p)
* libguile/evalext.c (scm_self_evaluating_p)
* libguile/print.c (iprin1)
* libguile/gc.c (scm_i_tag_name): Add some tc7_hashtab cases.

* libguile/init.c: Remove unused environments init functions. Remove
  call to hashtab_prehistory.

* libguile/goops.h (scm_class_hashtable)
* libguile/goops.c (scm_class_of, create_standard_classes): Have to
  make a class for hash tables manually, because they aren't smobs any
  more.

14 years agoeval.c closures are now applicable smobs, not tc3s
Andy Wingo [Fri, 4 Dec 2009 18:20:11 +0000 (19:20 +0100)]
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?.

14 years agoremove cxrs
Andy Wingo [Fri, 4 Dec 2009 15:39:34 +0000 (16:39 +0100)]
remove cxrs

* libguile/pairs.h:
* libguile/pairs.c: Previously scm_cdadr et al were implemented as
  #defines that called scm_i_chase_pairs, and the Scheme-exposed
  functions themselves were cxr subrs, which got special help in the
  interpreter. Since now the special help is unnecessary (because the
  compiler inlines and expands calls to car, cdadr, etc), the complexity
  is a loss. So just implement cdadr etc using normal functions. There's
  an advantage too, in that the compiler can unroll the cxring, reducing
  branches.

* libguile/tags.h (scm_tc7_cxr): Remove this tag.
  (scm_tcs_subrs): Now there's only one kind of subr, yay!

* libguile/debug.c (scm_procedure_name)
* libguile/evalext.c (scm_self_evaluating_p)
* libguile/gc.c (scm_i_tag_name)
* libguile/goops.c (scm_class_of)
* libguile/hash.c (scm_hasher)
* libguile/print.c (iprin1)
* libguile/procprop.c (scm_i_procedure_arity)
* libguile/procs.c (scm_procedure_p, scm_subr_p)
  (scm_make_procedure_with_setter)
* libguile/vm.c (apply_foreign): Remove cxr cases. Replace uses of
  scm_tcs_subrs with scm_tc7_gsubr.

14 years agoremove rpsubrs
Andy Wingo [Fri, 4 Dec 2009 12:05:00 +0000 (13:05 +0100)]
remove rpsubrs

* libguile/tags.h: Remove rpsubrs (I chose to interpret the terse name
  as "recursive predicate subrs"). Just use gsubrs with rest arguments,
  or do a fold yourself.

* libguile/array-map.c (scm_i_array_equal_p): Do the comparison in
  order, why not.

* libguile/chars.c:
* libguile/eq.c:
* libguile/numbers.c:
* libguile/strorder.c: Add 0,2,1 gsubr wrappers for rpsubrs like eq?, <,
  etc.

* libguile/goops.c (scm_class_of)
* libguile/procprop.c (scm_i_procedure_arity)
* libguile/procs.c (scm_thunk_p)
* libguile/vm.c (apply_foreign): Remove rpsubr cases.

* test-suite/tests/numbers.test ("=", "<"): Turn a couple xfails into
  passes.

14 years agoremove asubrs
Andy Wingo [Thu, 3 Dec 2009 16:05:14 +0000 (17:05 +0100)]
remove asubrs

* libguile/tags.h (scm_tcs_subrs, scm_tc7_asubr): Remove definitions.

* libguile/goops.c (scm_class_of)
* libguile/procprop.c (scm_i_procedure_arity)
* libguile/procs.c (scm_thunk_p)
* libguile/vm.c (apply_foreign): Remove cases for asubrs.

* libguile/array-map.c: Gut all of the optimizations, because there are
  no more asubrs, soon won't be rpsubrs, and all of this should happen
  on the Scheme level, ideally.

14 years agospeed up scm_call_N for non-programs
Andy Wingo [Thu, 3 Dec 2009 14:58:43 +0000 (15:58 +0100)]
speed up scm_call_N for non-programs

* libguile/eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3): All
  of these should dispatch through the VM, without consing.

14 years agosimplify apply_foreign
Andy Wingo [Thu, 3 Dec 2009 14:55:54 +0000 (15:55 +0100)]
simplify apply_foreign

* libguile/vm.c (apply_foreign): Simplify.

14 years ago+, -, min, lcm, gcd now documented
Andy Wingo [Sun, 6 Sep 2009 15:28:23 +0000 (17:28 +0200)]
+, -, min, lcm, gcd now documented

* test-suite/tests/numbers.test: Change some xfail documented? tests to
  passes.