add special case for (apply values ...)
authorAndy Wingo <wingo@pobox.com>
Sun, 14 Sep 2008 22:04:34 +0000 (00:04 +0200)
committerAndy Wingo <wingo@pobox.com>
Sun, 14 Sep 2008 22:04:34 +0000 (00:04 +0200)
commitef24c01bffb41a9855fe1aea36c4444742aba660
treeeffab1206ed2d78ddfe0b046973662373fad7dd0
parenta222b0fa91fe33461db1c7f8f4370ce6a5db588f
add special case for (apply values ...)

* libguile/vm-engine.c (vm_run): Move nvalues to the top level, to avoid
  (spurious, it seems) gcc warnings about it being used uninitialized.

* libguile/vm-i-system.c (halt, return/values): Adapt to gcc silliness.
  Deindent some of return/values.
  (return/values*): New instruction, does what (apply values . args)
  would do.

* module/language/scheme/translate.scm (custom-transformer-table): Move
  the apply and @apply cases here from inline.scm, because we need some
  more cleverness when dealing with cases like (apply values . args).
  (lookup-apply-transformer): Define an eval transformer for `values',
  turning it into ghil-values*.

* module/system/il/compile.scm (codegen): Compile <ghil-values*> into
  return/values*.

* module/system/il/ghil.scm: Add <ghil-values*> and accessors.
  (ghil-lookup): Add optional argument, define?, which if false tells us
  not to actually cache the binding if it is not found in the toplevel.

* module/system/il/inline.scm: Remove apply clauses.

* module/system/vm/frame.scm (bootstrap-frame?): Update heuristic for
  bootstrap-frame?, as the bootstrap frame is now 5 bytes since it
  accepts multiple values.
libguile/vm-engine.c
libguile/vm-i-system.c
module/language/scheme/translate.scm
module/system/il/compile.scm
module/system/il/ghil.scm
module/system/il/inline.scm
module/system/vm/frame.scm