mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +02:00
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.
This commit is contained in:
parent
a222b0fa91
commit
ef24c01bff
7 changed files with 115 additions and 57 deletions
|
@ -198,12 +198,3 @@
|
|||
(x) x
|
||||
(x y) (cons x y)
|
||||
(x y . rest) (cons x (cons* y . rest)))
|
||||
|
||||
(define-inline apply (proc . args)
|
||||
(apply proc . args))
|
||||
|
||||
;; From ice-9/r4rs.scm; actually not that bad of a strategy for handling
|
||||
;; the (apply apply ...) case
|
||||
|
||||
(define-inline @apply (proc . args)
|
||||
(apply proc . args))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue