~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to src/cmp/cmpmulti.lsp

  • Committer: Bazaar Package Importer
  • Author(s): Albin Tonnerre
  • Date: 2008-06-20 18:00:19 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080620180019-7fbz1ln5444vtkkr
Tags: 0.9j-20080306-2ubuntu1
* Enabled unicode support. (Closes: LP #123530)
* Modify Maintainer value to match the DebianMaintainerField specification.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;;;;  -*- Mode: Lisp; Syntax: Common-Lisp; Package: C -*-
 
2
;;;;
1
3
;;;;  Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya.
2
4
;;;;  Copyright (c) 1990, Giuseppe Attardi.
3
5
;;;;
29
31
   (t
30
32
    (c1expr
31
33
     (let ((function (gensym))
32
 
           (nargs (gensym)))
33
 
     `(with-stack
34
 
       (let* ((,function ,(first args))
35
 
              (,nargs  (+ ,@(loop for i in (rest args)
36
 
                                  collect `(stack-push-values ,i)))))
37
 
         (declare (fixnum ,nargs))
38
 
         (apply-from-stack ,nargs ,function))))))))
 
34
           (frame (gensym)))
 
35
     `(with-stack ,frame
 
36
       (let* ((,function ,(first args)))
 
37
         ,@(loop for i in (rest args)
 
38
              collect `(stack-push-values ,frame ,i))
 
39
         (si::apply-from-stack-frame ,frame ,function))))))))
39
40
 
40
41
(defun c1multiple-value-prog1 (args)
41
42
  (check-args-number 'MULTIPLE-VALUE-PROG1 args 1)
42
 
  (c1expr (let ((l (gensym)))
43
 
            `(with-stack
44
 
              (let ((,l (stack-push-values ,(first args))))
45
 
                (declare (fixnum ,l))
46
 
                ,@(rest args)
47
 
                (stack-pop ,l))))))
 
43
  (c1expr (let ((frame (gensym)))
 
44
            `(with-stack ,frame
 
45
               (stack-push-values ,frame ,(first args))
 
46
               ,@(rest args)
 
47
               (stack-pop ,frame)))))
48
48
)
49
49
 
50
50
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;