flesh out glil support for optional and keyword arguments
authorAndy Wingo <wingo@pobox.com>
Tue, 13 Oct 2009 21:55:58 +0000 (23:55 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 23 Oct 2009 12:51:19 +0000 (14:51 +0200)
commit258344b4db4b9dab1979bbef53606c0cd34b4095
treef4625f246c85741fc2c4265e92b7ba50aea79e89
parent56164a5a6c45a4fba065be2cc9a2539ef5cd2b71
flesh out glil support for optional and keyword arguments

* libguile/vm-i-system.c (bind-rest): Renamed from push-rest-list.
  (reserve-locals): Change so that instead of reserving space for some
  additional number of locals, reserve-locals takes the absolute number
  of locals, including the arguments.

* module/language/glil.scm (<glil-std-prelude>, <glil-opt-prelude>)
  (<glil-kw-prelude>): New GLIL constructs, to replace <glil-arity>.

* module/language/glil/compile-assembly.scm (glil->assembly): Compile
  the new preludes. Some instructions are not yet implemented, though.

* module/language/tree-il/analyze.scm (analyze-lexicals): The nlocs for
  a lambda will now be the total number of locals, including arguments.

* module/language/tree-il/compile-glil.scm (flatten-lambda): Update to
  write the new prelude.

* module/system/vm/program.scm (program-bindings-for-ip): If a given
  index doesn't have a binding at the ip given, don't cons it on the
  resulting list.

* test-suite/tests/tree-il.test: Update for GLIL changes.
libguile/vm-i-system.c
module/language/glil.scm
module/language/glil/compile-assembly.scm
module/language/tree-il/analyze.scm
module/language/tree-il/compile-glil.scm
test-suite/tests/tree-il.test