case-lambda* clauses fail to match if too many positionals
authorAndy Wingo <wingo@pobox.com>
Mon, 14 Jan 2013 10:38:09 +0000 (11:38 +0100)
committerAndy Wingo <wingo@pobox.com>
Mon, 14 Jan 2013 10:38:09 +0000 (11:38 +0100)
commit581f410fbd803721eb750ed8e7d6ec4cc4bcda79
tree7406b3fe4d94dcc8cf651f6f0957ead88dd1bb6a
parent18c5bffe96947ee82a29b115e758d7357cefbbe9
case-lambda* clauses fail to match if too many positionals

* doc/ref/api-procedures.texi (Case-lambda): Expand case-lambda*
  documentation.

* module/ice-9/eval.scm (primitive-eval):
* libguile/eval.c (prepare_boot_closure_env_for_apply): Dispatch to the
  next case-lambda clause if there are too many positionals.

* doc/ref/vm.texi (Function Prologue Instructions):
* libguile/vm-i-system.c (bind-optionals/shuffle-or-br): New
  instruction, like bind-optionals/shuffle but can dispatch to the next
  clause if there are too many positionals.

* module/language/assembly/disassemble.scm (code-annotation):
* module/language/assembly/decompile-bytecode.scm (decode-load-program):
* module/language/assembly/compile-bytecode.scm (compile-bytecode): Add
  case for bind-optionals/shuffle-or-br.
* module/language/glil/compile-assembly.scm (glil->assembly): If there
  is an alternate, use bind-optionals/shuffle-or-br instead of
  bind-optionals/shuffle.

* test-suite/tests/optargs.test ("case-lambda*"): Add tests.
doc/ref/api-procedures.texi
doc/ref/vm.texi
libguile/eval.c
libguile/vm-i-system.c
module/ice-9/eval.scm
module/language/assembly/compile-bytecode.scm
module/language/assembly/decompile-bytecode.scm
module/language/assembly/disassemble.scm
module/language/glil/compile-assembly.scm
test-suite/tests/optargs.test