mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 11:10:21 +02:00
more work towards compiling and interpreting keyword args
* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bumparoo * libguile/vm-i-system.c (push-rest, bind-rest): Logically there are actually two rest binders -- one that pops, conses, and pushes, and one that pops, conses, and local-sets. The latter is used on keyword arguments, because the keyword arguments themselves have been shuffled up on the stack. Renumber ops again. * module/language/tree-il/compile-glil.scm (flatten): Attempt to handle compilation of lambda-case with keyword arguments. Might need some help. * module/ice-9/psyntax.scm (build-lambda-case): An attempt to handle the interpreted case correctly. This might need a couple iterations, but at least it looks like the compile-glil code. * module/ice-9/psyntax-pp.scm: Regenerated. * module/language/glil.scm (<glil>): Rename "rest?" to "rest" in <glil-opt-prelude> and <glil-kw-prelude>, as it is no longer a simple boolean, but if true is an integer: the index of the local variable to which the rest should be bound. * module/language/glil/compile-assembly.scm (glil->assembly): Adapt to "rest" vs "rest?". In the keyword case, use "bind-rest" instead of "push-rest". * test-suite/tests/tree-il.test: Update for opt-prelude change.
This commit is contained in:
parent
7e01997e88
commit
899d37a6cf
8 changed files with 2373 additions and 2197 deletions
|
@ -349,7 +349,7 @@
|
|||
(lambda-case ((() #f x #f (y) #f) (const 2))
|
||||
#f))
|
||||
(program () (std-prelude 0 0 #f) (label _)
|
||||
(program () (opt-prelude 0 0 #t 1 #f)
|
||||
(program () (opt-prelude 0 0 0 1 #f)
|
||||
(bind (x #f 0)) (label _)
|
||||
(const 2) (call return 1)
|
||||
(unbind))
|
||||
|
@ -360,7 +360,7 @@
|
|||
(lambda-case (((x) #f x1 #f (y y1) #f) (const 2))
|
||||
#f))
|
||||
(program () (std-prelude 0 0 #f) (label _)
|
||||
(program () (opt-prelude 1 0 #t 2 #f)
|
||||
(program () (opt-prelude 1 0 1 2 #f)
|
||||
(bind (x #f 0) (x1 #f 1)) (label _)
|
||||
(const 2) (call return 1)
|
||||
(unbind))
|
||||
|
@ -371,7 +371,7 @@
|
|||
(lambda-case (((x) #f x1 #f (y y1) #f) (lexical x y))
|
||||
#f))
|
||||
(program () (std-prelude 0 0 #f) (label _)
|
||||
(program () (opt-prelude 1 0 #t 2 #f)
|
||||
(program () (opt-prelude 1 0 1 2 #f)
|
||||
(bind (x #f 0) (x1 #f 1)) (label _)
|
||||
(lexical #t #f ref 0) (call return 1)
|
||||
(unbind))
|
||||
|
@ -382,7 +382,7 @@
|
|||
(lambda-case (((x) #f x1 #f (y y1) #f) (lexical x1 y1))
|
||||
#f))
|
||||
(program () (std-prelude 0 0 #f) (label _)
|
||||
(program () (opt-prelude 1 0 #t 2 #f)
|
||||
(program () (opt-prelude 1 0 1 2 #f)
|
||||
(bind (x #f 0) (x1 #f 1)) (label _)
|
||||
(lexical #t #f ref 1) (call return 1)
|
||||
(unbind))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue