loop detection in the house
authorAndy Wingo <wingo@pobox.com>
Thu, 6 Aug 2009 15:46:38 +0000 (17:46 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 6 Aug 2009 15:46:38 +0000 (17:46 +0200)
commit9b29d6079184d2d92fef5a1b7eba79f39fa3ef82
tree03ecb217709780061b92a06c7154c068e693c8c6
parent80af1168751e59a3ee5c4a79febb2da23d36112d
loop detection in the house

* libguile/vm-i-scheme.c (vector-ref, vector-set): Sync registers if we
  call out to C.

* module/language/tree-il/compile-glil.scm (flatten-lambda): Add an
  extra argument, the self-label, which should be the gensym under which
  the procedure is bound in a <fix> expression.
  (flatten): If we see a call to a lexical ref to the self-label in a
  tail position, rename and goto instead of goto/args, which will tear
  down the frame -- or will, in the future. It's a primitive form of
  loop detection.

* module/language/tree-il/primitives.scm (zero?): Expand to (= x 0).
libguile/vm-i-scheme.c
module/language/tree-il/compile-glil.scm
module/language/tree-il/primitives.scm