1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 20:05:32 +02:00

Revert "implement #:predicate" and remove predicate from <lambda-case>

Turns out this was not a very useful idea, and semantically tricky to
boot.

This reverts commit 24bf130fd1, and makes
the following additional changes:

* module/ice-9/optargs.scm (parse-lambda-case, let-optional)
  (let-optional*, let-keywords, let-keywords*):
* module/language/tree-il.scm: (<lambda-case>, parse-tree-il)
  (unparse-tree-il, tree-il->scheme, tree-il-fold,
  make-tree-il-folder)
  (post-order!, pre-order!):
* module/language/tree-il/analyze.scm (analyze-lexicals):
* module/language/tree-il/compile-glil.scm (compile-glil):
* module/language/tree-il/inline.scm (inline!): Remove all traces of
  #:predicate from tree-il.

* module/ice-9/psyntax.scm (build-simple-lambda, build-lambda-case)
  (chi-lambda-case): Adapt to tree-il change.
* module/ice-9/psyntax-pp.scm: Regenerated.

* module/language/brainfuck/compile-tree-il.scm (compile-body):
* module/language/ecmascript/compile-tree-il.scm (comp, comp-body):
* test-suite/tests/tree-il.test: Adapt to tree-il change.

* doc/ref/api-procedures.texi (Case-lambda): Remove mention of
  #:predicate.
This commit is contained in:
Andy Wingo 2009-11-05 10:22:01 +01:00
parent e161c9f85c
commit 1e2a8edb8b
11 changed files with 4598 additions and 4925 deletions

View file

@ -337,14 +337,14 @@
formals)))
`(lambda ()
(lambda-case
((() ,formals #f #f ,(map (lambda (x) (@implv *undefined*)) formals) ,syms #f)
((() ,formals #f #f ,(map (lambda (x) (@implv *undefined*)) formals) ,syms)
,(comp-body e body formals syms))))))
((call/this ,obj ,prop . ,args)
(@impl call/this*
obj
(-> (lambda '()
`(lambda-case
((() #f #f #f () () #f)
((() #f #f #f () ())
(apply ,(@impl pget obj prop) ,@args)))))))
((call (pref ,obj ,prop) ,args)
(comp `(call/this ,(comp obj e)
@ -447,13 +447,13 @@
(-> (letrec '(%loop %continue) (list %loop %continue)
(list (-> (lambda '()
(-> (lambda-case
`((() #f #f #f () () #f)
`((() #f #f #f () ())
,(-> (begin
(comp statement e)
(-> (apply (-> (lexical '%continue %continue)))))))))))
(-> (lambda '()
(-> (lambda-case
`((() #f #f #f () () #f)
`((() #f #f #f () ())
,(-> (if (@impl ->boolean (comp test e))
(-> (apply (-> (lexical '%loop %loop))))
(@implv *undefined*)))))))))
@ -464,7 +464,7 @@
(-> (letrec '(%continue) (list %continue)
(list (-> (lambda '()
(-> (lambda-case
`((() #f #f #f () () #f)
`((() #f #f #f () ())
,(-> (if (@impl ->boolean (comp test e))
(-> (begin (comp statement e)
(-> (apply (-> (lexical '%continue %continue))))))
@ -477,7 +477,7 @@
(-> (letrec '(%continue) (list %continue)
(list (-> (lambda '()
(-> (lambda-case
`((() #f #f #f () () #f)
`((() #f #f #f () ())
,(-> (if (if test
(@impl ->boolean (comp test e))
(comp 'true e))
@ -496,7 +496,7 @@
(list (@impl make-enumerator (comp object e))
(-> (lambda '()
(-> (lambda-case
`((() #f #f #f () () #f)
`((() #f #f #f () ())
(-> (if (@impl ->boolean
(@impl pget
(-> (lexical '%enum %enum))