Convert branchable primitives into binary operations only.
authorMark H Weaver <mhw@netris.org>
Tue, 13 Aug 2013 13:03:23 +0000 (09:03 -0400)
committerAndy Wingo <wingo@pobox.com>
Sat, 24 Aug 2013 13:18:32 +0000 (15:18 +0200)
commit62d3430cb618e8d45b0e72d195fdee6e2550ea91
treec48951a5bef280cde24ea02c3d1c763d0ea39f63
parent453acfacf408fafe0712f8796e06241d236d011a
Convert branchable primitives into binary operations only.

* module/language/tree-il/primitives.scm (maybe-simplify-to-eq): Wrap
  within another lambda, binding the primitive name.  If there are less
  than two arguments, expand to constant #t.  If there are more than two
  arguments, convert into a conjunction of binary applications.
  (expand-chained-comparisons): New procedure.
  (*primitive-expand-table*): Add entries for (< <= = >= > eq?).
module/language/tree-il/primitives.scm