finish support for optional & keyword args; update ecmascript compiler
authorAndy Wingo <wingo@pobox.com>
Sat, 17 Oct 2009 15:23:09 +0000 (17:23 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 23 Oct 2009 13:10:25 +0000 (15:10 +0200)
commit7e01997e88c54216678271de36b1c2088377492d
treeb8f9817abd25a3b2802367b1f115548f8c2202fc
parent8753fd537c4eadf7495f4ba867def99e77246dfc
finish support for optional & keyword args; update ecmascript compiler

* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump.
* libguile/vm-i-system.c (br-if-nargs-ne, br-if-args-lt)
  (br-if-nargs-gt): New instructions, for use by different lambda cases.
  (bind-optionals, bind-optionals/shuffle, bind-kwargs): New
  instructions, for binding optional and keyword arguments. Renumber
  other ops.

* module/language/ecmascript/compile-tree-il.scm (comp, comp-body):
  Update for new tree-il. Use the new optional argument mechanism
  instead of emulating it with rest arguments.

* module/language/glil/compile-assembly.scm (glil->assembly): Tweaks for
  optional and keyword argument compilation.

* module/language/tree-il.scm (parse-tree-il, unparse-tree-il): Make the
  else case optional, in the s-expression serialization of tree-il.

* module/language/tree-il/compile-glil.scm (flatten): Handle all of the
  lambda-case capabilities.
libguile/_scm.h
libguile/vm-engine.c
libguile/vm-i-system.c
module/language/ecmascript/compile-tree-il.scm
module/language/glil/compile-assembly.scm
module/language/tree-il.scm
module/language/tree-il/compile-glil.scm