~ubuntu-branches/ubuntu/trusty/mit-scheme/trusty-proposed

« back to all changes in this revision

Viewing changes to src/sf/usiexp.scm

  • Committer: Bazaar Package Importer
  • Author(s): Chris Hanson
  • Date: 2010-03-10 02:00:45 UTC
  • mfrom: (1.1.7 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100310020045-4np1y3ro6sk2oz92
Tags: 9.0.1-1
* New upstream.
* debian/watch: Fix, previous version was broken.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#| -*-Scheme-*-
2
2
 
3
 
$Id: usiexp.scm,v 4.52 2008/08/30 19:55:59 riastradh Exp $
4
 
 
5
3
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
6
4
    1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
7
 
    2006, 2007, 2008 Massachusetts Institute of Technology
 
5
    2006, 2007, 2008, 2009, 2010 Massachusetts Institute of Technology
8
6
 
9
7
This file is part of MIT/GNU Scheme.
10
8
 
353
351
      (make-combination expr block (ucode-primitive cons)
354
352
                        (list (car rest)
355
353
                              (list-expansion-loop #f block (cdr rest))))))
356
 
 
 
354
 
357
355
(define (values-expansion expr operands if-expanded if-not-expanded block)
358
356
  if-not-expanded
359
357
  (if-expanded
375
373
           (let ((variable (variable/make&bind! block 'RECEIVER)))
376
374
             (procedure/make
377
375
              #f block lambda-tag:unnamed (list variable) '() #f
378
 
              (combination/make #f
379
 
                                block
380
 
                                (reference/make #f block variable)
381
 
                                (map (lambda (variable)
382
 
                                       (reference/make #f block variable))
383
 
                                     variables))))))
 
376
              (declaration/make
 
377
               #f
 
378
               ;; The receiver is used only once, and all its operand
 
379
               ;; expressions are effect-free, so integrating here is
 
380
               ;; safe.
 
381
               (declarations/parse block '((INTEGRATE-OPERATOR RECEIVER)))
 
382
               (combination/make #f
 
383
                                 block
 
384
                                 (reference/make #f block variable)
 
385
                                 (map (lambda (variable)
 
386
                                        (reference/make #f block variable))
 
387
                                      variables)))))))
384
388
        operands)))))
385
389
 
386
390
(define (call-with-values-expansion expr operands