steps on the way to have the callee check the number of arguments
authorAndy Wingo <wingo@pobox.com>
Sun, 27 Sep 2009 22:16:56 +0000 (18:16 -0400)
committerAndy Wingo <wingo@pobox.com>
Fri, 23 Oct 2009 12:51:17 +0000 (14:51 +0200)
commit1e2a8c266d720a5dca97a96e5cde860a9d934ad6
tree01dfd6714e8afaa0213ea75ec9b751092c9b7f45
parent04c68c039194f33d5bd7e8b1f21eba7c8bd6adbe
steps on the way to have the callee check the number of arguments

* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump.

* libguile/vm-i-system.c (assert-nargs-ee, assert-nargs-ge)
  (push-rest-list): New instructions, which for now don't actually do
  anything. Renumber the rest of the ops in this file.

* module/language/glil.scm (<glil-arity>): New GLIL type, an entity that
  checks the number of args for a block, optionally consing a rest list,
  and either branching or erroring if the arity doesn't match.

* module/language/glil/compile-assembly.scm (glil->assembly): Compile
  <glil-arity> to assembly. Some of these VM ops are not implemented --
  notably the branching case.

* module/language/tree-il/compile-glil.scm (flatten-lambda): Emit
  <glil-arity>.

* test-suite/tests/tree-il.test: Update.
libguile/_scm.h
libguile/vm-i-system.c
module/language/glil.scm
module/language/glil/compile-assembly.scm
module/language/tree-il/compile-glil.scm
test-suite/tests/tree-il.test