1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-27 21:40:34 +02:00

Merge remote-tracking branch 'local-2.0/stable-2.0'

Conflicts:
	module/ice-9/psyntax-pp.scm
	module/language/tree-il/compile-glil.scm
This commit is contained in:
Andy Wingo 2011-06-18 00:45:19 +02:00
commit 78f0ef20a7
30 changed files with 3077 additions and 2094 deletions

View file

@ -1,5 +1,5 @@
;;;; compiler.test --- tests for the compiler -*- scheme -*-
;;;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
;;;; Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@ -149,3 +149,18 @@
((y) y)
((y z) (list y z)))))))
(not (not (memv 0 (map source:addr s))))))))
(with-test-prefix "case-lambda"
(pass-if "self recursion to different clause"
(equal? (with-output-to-string
(lambda ()
(let ()
(define t
(case-lambda
((x)
(t x 'y))
((x y)
(display (list x y))
(list x y))))
(display (t 'x)))))
"(x y)(x y)")))

View file

@ -474,6 +474,26 @@
(program () (std-prelude 0 0 #f) (label _)
(const 2) (call null? 1) (call return 1))))
(with-test-prefix "values"
(assert-tree-il->glil
(primcall values
(primcall values (const 1) (const 2)))
(program () (std-prelude 0 0 #f) (label _)
(const 1) (call return 1)))
(assert-tree-il->glil
(primcall values
(primcall values (const 1) (const 2))
(const 3))
(program () (std-prelude 0 0 #f) (label _)
(const 1) (const 3) (call return/values 2)))
(assert-tree-il->glil
(primcall +
(primcall values (const 1) (const 2)))
(program () (std-prelude 0 0 #f) (label _)
(const 1) (call return 1))))
;; FIXME: binding info for or-hacked locals might bork the disassembler,
;; and could be tightened in any case
(with-test-prefix "the or hack"